-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket for UI interactive refreshing #25661
Comments
I think this issue exists already, the original even has a bounty if I remember correctly. |
I couldn't find it earlier. If it exists, I'll add my comment there instead. |
Ping @kdumontnu as I believe he was the one who put the bounty on it |
This is the one with the bounty but we talk about a general refreshing. |
We need a pub/sub abstract layer to replace |
For distributed gitea setups a pub/sub mechanism is indeed necessary so that events originating on gitea instance 1 can propagate to clients connected on instance 2. Often this is done through redis, which would then make it a hard dependency, at least for distributed setups. |
For single and default configuration, we can have a memory pub/sub implementation based on golang channel and a disk implementation. |
linking #2287 |
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:
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.
The text was updated successfully, but these errors were encountered: