Open
Description
Feature Description
Currently we have Server-Sent-Events aka. EventSource
for a few things but it's too unreliable because browser enforce a 6 connection limit per browser window and I think our implementation also has a number of unresolved bugs.
We should therefore switch EventSource to Websockets. From what I gather, suitable modules are:
- https://github.com/olahol/melody convenient high-level API, but builds on top of deprecated gorilla/websocket
- https://github.com/gobwas/ws slightly less convenient medium-level API
- https://github.com/gorilla/websocket deprecated very low-level API
For the frontend side, I recommend SharedWorker similar to this that can communicate "events" that are simple JSON messages to all open tabs. Could initially also be done on main thread because workers are a very hard to debug in browsers.