4 ms·
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, the
by ricardobeat 2y ago
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).
- koakuma-chan 2y ago> games, anything with real time two-way interactivity No need for WebSockets there as well. Check out WebTransport.
- hntrl 2y agoIt 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_API https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_...
- almostnormal 2y ago"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!
- misiek08 2y agoYour projects require holistic and craft solutions. Simple, working ways are the wrong path!
- apitman 2y agoWebTransport is great but it's not in safari yet.
- motorest 2y ago> 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?
- koakuma-chan 2y ago> Isn't WebTransport basically WebSockets reimplemented in HTTP/3? No.
- motorest 2y ago> 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 https://github.com/w3c/webtransport/blob/main/explainer.md
- koakuma-chan 2y agoWhere 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.
- lttlrck 2y agoHe said "basically" which should be interpreted as "roughly"? Then it seems his assert is roughly correct?
- koakuma-chan 2y agoMaybe? 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.
- Horusiath 2y agoLast time I've checked none of the common reverse proxy servers (most importantly nginx) supported WebTransport.