For the last one, we have an asteroids game where ship positions stream over QUIC datagrams instead of a regular connection, powered by WebTransport.
The neat part is how little it takes: an HTTP/3 connection, a writable stream for position updates sent 20 times a second, and a separate reliable stream for things like deaths and scores. No retransmission queue holding up movement when a packet drops β the next update arrives and renders.
Move your ship, and it appears on the other screen almost instantly. Get hit, and the game state updates reliably
Built a writing co-pilot that streams Claude continuations directly into your document β word by word, inline after your cursor, powered by Server-Sent Events.
The interesting part is how little it takes: a POST to register the prompt, an EventSource on the client, and tokens arriving over a plain HTTP stream. No WebSocket handshake, no framework, nothing persistent between sessions.
Hit Tab to continue, Esc to throw it away. The AI text sits highlighted until you decide.
#sse
Built this today with raw WebSockets (no https://t.co/7O3GBoXtjx).
Two users. One shared buffer. Changes sync instantly β no polling, no refresh, no lag.
Up next: building something with Server-Sent Events to feel the difference
#LearningInPublic
WebSockets vs Server-Sent Events vs WebTransport β which one to choose:
WebSockets β full-duplex over TCP. The go-to for chat, collaboration, anything bidirectional. 100% browser support, mature ecosystem.
SSE β server pushes only, but don't sleep on it. Built-in reconnection, runs over plain HTTP/2, and it's what powers AI response streaming. Wildly underrated.
WebTransport β the new kid. QUIC over UDP, no head-of-line blocking, unreliable datagrams for games. Chrome/Edge/Firefox only for now (sorry Safari users).
Rule of thumb:
β’ Server pushing data only β SSE
β’ Bidirectional comms β WebSockets
β’ Low-latency games/media β WebTransport
Over the next few days, I'm building one app for each real-time web communication protocol.
Three protocols. Three apps.
Follow along π