4 ms·
This is a little bit of a tangent but I sure love working with Websockets. It really feels like Websockets are what HTTP should've been. Asynchronous realtime c
by 0xy 6y ago
This is a little bit of a tangent but I sure love working with Websockets. It really feels like Websockets are what HTTP should've been. Asynchronous realtime communication.
When things happen on the site and it's shown to the customer immediately via WS, it's just a delightful experience.
- gmfawcett 6y agoIn its day, I don't think HTTP would ever have escaped orbit if it had been designed as a stateful protocol, like Websockets.
- Jach 6y agoWeb goes round and round. ActiveX, Java applets, and Flash all supported sockets. It is nice that we can have them now without such things, but it's not like they're only a boon with no tradeoffs.
- luhn 6y agoimo, Server-Sent Events are the better solution for realtime updates. Sometimes you need the stateful bidirectional protocol WebSockets offer, but most of the time HTTP for RPC and SSE for streaming updates gets you where you need to go with standard HTTP, no special protocols.
- yencabulator 6y agoThere's one scenario where websockets win: When you don't want your client-to-server calls to get reordered in-flight. Unfortunately the browser javascript "fetch API" still doesn't implement streaming request bodies. If it did, websockets would be obsolete.