News for hackers. Stuff that matters.
Re:You might not need WebSockets by ricardobeat on Friday April 11, 2025 @09:02PM (#43660350)
That’s basically RPC over WS.

This article conflates a lot of different topics. If your WebSocket connection can be easily replaced with SSE+POST requests, then yeah you don’t need WebSockets. That doesn’t mean there aren’t a ton of very valid use cases (games, anything with real time two-way interactivity).

Re:You might not need WebSockets by koakuma-chan on Friday April 11, 2025 @09:25PM (#43660480)
> games, anything with real time two-way interactivity

No need for WebSockets there as well. Check out WebTransport.

Re:You might not need WebSockets by hntrl on Friday April 11, 2025 @09:30PM (#43660503)
It even has mention as being the spiritual successor to WebSocket for certain cases in mdn docs:

https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_...

Re:You might not need WebSockets by almostnormal on Saturday April 12, 2025 @01:08AM (#43661533)
"if your application requires a non-standard custom solution, then you should use the WebTransport API"

That's a pretty convincing use-case. Why use something standard if it can be non-standard custom instead!

Re:You might not need WebSockets by misiek08 on Saturday April 12, 2025 @08:05AM (#43663682)
Your projects require holistic and craft solutions. Simple, working ways are the wrong path!
Re:You might not need WebSockets by apitman on Friday April 11, 2025 @09:36PM (#43660548)
WebTransport is great but it's not in safari yet.
Re:You might not need WebSockets by motorest on Saturday April 12, 2025 @01:27AM (#43661588)
> No need for WebSockets there as well. Check out WebTransport.

Isn't WebTransport basically WebSockets reimplemented in HTTP/3? What point where you trying to make?

Re:You might not need WebSockets by koakuma-chan on Saturday April 12, 2025 @06:13AM (#43663054)
> Isn't WebTransport basically WebSockets reimplemented in HTTP/3?

No.

Re:You might not need WebSockets by motorest on Saturday April 12, 2025 @07:15AM (#43663414)
> No.

Thanks for your insight.

It seems you need to urgently reach out to the people working on WebTransport. You seem to know better and their documentation contradicts and refutes your assertion.

https://github.com/w3c/webtransport/blob/main/explainer.md

Re:You might not need WebSockets by koakuma-chan on Saturday April 12, 2025 @07:38AM (#43663528)
Where does that document say that WebTransport is just WebSockets over HTTP/3? The only thing in common is that both features provide reliable bi-directional streams, but WebTransport also supports unreliable streams and a bunch of other things. Please read the docs. There is also RFC 9220 Bootstrapping WebSockets with HTTP/3, which is literally WebSockets over HTTP/3.
Re:You might not need WebSockets by lttlrck on Saturday April 12, 2025 @03:03PM (#43667068)
He said "basically" which should be interpreted as "roughly"? Then it seems his assert is roughly correct?
Re:You might not need WebSockets by koakuma-chan on Saturday April 12, 2025 @11:09PM (#43669758)
Maybe? Isn't WebSockets basically TCP? Roughly? I wrote that WebSockets provide reliable bi-directional streams, but it actually doesn't. It implements message framing. WebTransport also doesn't support "unreliable streams", it's actually called "datagrams". WebTransport doesn't even have to be used over HTTP/3 per the latest spec, so is it basically WebSockets reimplemented in HTTP/3? No.
Re:You might not need WebSockets by motorest on Sunday April 13, 2025 @01:31AM (#43670320)
> (...) but WebTransport also supports unreliable streams and a bunch of other things.

If you take some time to learn about WebTransport, you will eventually notice that if you remove HTTP/3 from if you remove each and every single feature that WebTransport touts as changes/improvements over WebSockets.

Re:You might not need WebSockets by Horusiath on Saturday April 12, 2025 @01:58AM (#43661730)
Last time I've checked none of the common reverse proxy servers (most importantly nginx) supported WebTransport.