Hacker News new | past | comments | ask | show | jobs | submit login

So it’s websockets, only instead of the Web server needing to handle the protocol upgrade, you just piggyback on HTTP with an in-band protocol.

I’m not sure this makes sense in 2024. Pretty much every web server supports websockets at this point, and so do all of the browsers. You can easily impose the constraint on your code that communication through a websocket is mono-directional. And the capability to broadcast a message to all subscribers is going to be deceptively complex, no matter how you broadcast it.






Yes most servers support websockets. But unfortunately most proxies and firewalls do not, especially in big company networks. Suggesting my users to use SSEs for my database replication stream solved most of their problems. Also setting up a SSE endpoint is like 5 lines of code. WebSockets instead require much more and you also have to do things like pings etc to ensure that it automatically reconnects. SEEs with the JavaScript EventSource API have all you need build in:

https://rxdb.info/articles/websockets-sse-polling-webrtc-web...


SSE also works well on HTTP/3 whereas web sockets still don’t.

I don't see much point in WebSockets for HTTP/3. WebTransport will cover everything you would need it for an more.

That might very well be but the future is not today.

But why add it to HTTP/3 at all? HTTP/1.1 hijacking is a pretty simple process. I suspect HTTP/3 would be significantly more complicated. I'm not sure that effort is worth it when WebTransport will make it obselete.

It was added to HTTP/2 as well and there is an RFC. (Though a lot of servers don’t support it even on HTTP/2)

My point is mostly that SSE works well and is supported and that has A meaningful benefit today.


To have multiple independent websocket streams, without ordering requirements between streams.

going slightly off the tangent here, does FaaS cloud providers like AWS, CloudFlare, and etc support SSEs?

Last time I checked, they don't really support it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: