2 ms·
I mostly agree with this - right tool for right job. > They are mostly useful for things where high frequency bi-directional communication is required such as
by bob1029 5y ago
I mostly agree with this - right tool for right job.
> They are mostly useful for things where high frequency bi-directional communication is required such as syncing multiple cursors, player positions/actions in realtime games and visual co-editing such as figma.
This is the only use case for websocket I have personally found - streaming user input to the server. Anything that goes server->client can just be some variant of fetch that is invoked as needed.
In my use cases, I stream player mouse events (via pointer lock API) over the socket. Depending on the browser/os/mouse, this can be hundreds per second.