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

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.




imo, 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.


There'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.


In its day, I don't think HTTP would ever have escaped orbit if it had been designed as a stateful protocol, like Websockets.


Web 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.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: