4 ms·
Pretty much. In this case, WebSockets is simpler to implement than HTTP2; it's closer to raw TCP, you just send and receive raw packets... It's objectively simp
by jongjong 2y ago
Pretty much. In this case, WebSockets is simpler to implement than HTTP2; it's closer to raw TCP, you just send and receive raw packets... It's objectively simpler, more efficient and more flexible.
It's a tough sell to convince me that a protocol which was designed primarily for resource transfer via a strict, stateless request-response mode of interaction, with server push tacked on top as an afterthought is simpler than something which was built from the ground up to be bidirectional.
- bobmcnamara 2y agoI fixed a few bugs in a WebSocket client and was blown away by the things they do to trick old proxies into not screwing it all up.
- fenesiistvan 2y agoI would be interested in those tricks
- bobmcnamara 2y agoA big one is 'masking' all client requests that a proxy can't effectively cache the response since the request always changes. The RFC explains it: https://datatracker.ietf.org/doc/html/rfc6455#section-5.3 https://datatracker.ietf.org/doc/html/rfc6455#section-5.3
- AtlasBarfed 2y agoAren't websockets the only way to some sort of actual multi-core and threaded code in JavaScript, or is it still subject to the single background thread limitation and it just runs like node does?
- nothrabannosir 2y agoDo you mean web workers? https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...