|
|
|
|
|
by skrebbel
432 days ago
|
|
> I don't believe that HTTP streaming was designed with this pattern in mind > server-sent events are a simpler solution Fwiw Server-Sent Events are a protocol on top of HTTP Streaming. In fact I'm somewhat surprised that the article doesn't mention it, instead rolling their own SSE alternative that looks (to my non-expert eyes) like a lower level version of the same thing. It seems a bit weird to me to use chunks as a package boundary, I'd worry that that has weird edge cases (eg won't large responses be split into multiple chunks?) |
|
Websockets requires almost a completely new L7 stack and tons of special configuration to handle Upgrade, text or data frames, etc. And once you're out of "HTTP mode" you now have to implement the primitive mechanics of basically everything yourself, like auth, redirects, sessions, etc.
It's why I originally made Tiny SSE which is a purpose-built SSE server written in Rust and programmable with Lua.
https://tinysse.com
https://github.com/benwilber/tinysse