Webtransport / QUIC for Phoenix channels?

Does Phoenix have any plans to support channels with the new protocol coming up Webtransport / QUIC ? Seems like it would be great for liveview on lossy wireless connections.

I think this would require a new Phoenix pub/sub adapter but not sure.

5 Likes

QUIC is HTTP/2 replacement.

Channels just upgrade from HTTP/1 to Websockets.

I am not entirely sure CUIC will be used for sockets.

Before webtransport becomes supported we’d first need webserver libraries supporting http/3 (in a stable manner). It would need a new Phoenix.Socket.Transport to support channels, but phoenix pubsub would be unaffected.

3 Likes

Webtransport has very similar functionality to websockets but uses UDP/QUIC instead of TCP. Uni/Bi-directional multiplexed channels etc. Also reliable (tcp like) or unreliable (udp like) transport. Seems really cool imo

1 Like

That’s not correct. HTTP/3 is HTTP/2 replacement, QUIC is just yet another transport protocol. HTTP is L7 protocol while QUIC is L4.5-ish protocol. Completely different layers.

1 Like

Yeah, because QUIC is SCTP replacement ha-ha. QUIC is almost 100% like SCTP over UDP

1 Like

Hey I just replied QUICly, without much thought.

3 Likes

Well I’m not that technical yet with Elixir but it would be super cool to get a new Phoenix.Socket.Transport adapter for Webtransport.

Imagine the reliablilty of liveview apps from your phone. I would also think it relevant to the phoenix mobile stuff they’ve been experimenting with.

1 Like

Likely the first thing I’m planning on tackling in Bandit post-1.0 is QUIC support (with HTTP/3 / WebTransport support in Bandit coming soon thereafter). I’m expecting my first work to begin on this maybe March 2023, with some sort of early (QUIC) demo maybe later that summer. Absolutely no promises though.

16 Likes

The recent work in Phoenix 1.7 to factor out WebSocket support via the WebSock library was written with the intent of also support WebTransport when the time comes. Phoenix itself shouldn’t need to change for such support to land - it’s entirely on the underlying server to implement (see my last about Bandit’s plans for this)

7 Likes

I should have read about WebTransport.

“Webtransport is designed as a ‘QUIC-native’ client-server communication protocol to replace websockets. You can think of it like websockets but better (faster handshake, it reuses the http2 / QUIC connection, and you can relax websocket’s reliability & ordering constraints). Or you can think of it as WebRTC, except way simpler for the 95% case where you want to communicate server/client.”

This is an, eye opening, excerpt I took from Ycombinator.

This is awesome.

1 Like

If anyone can do it its you Mat! Watching your ElixirConf 2021 video now on Bandit. Also shout out from T-Dot as well :stuck_out_tongue:

2 Likes