-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Open
Labels
topic/uiChange the appearance of the Gitea UIChange the appearance of the Gitea UItype/featureCompletely new functionality. Can only be merged if feature freeze is not active.Completely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
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.
lifeofguenter and corpix
Metadata
Metadata
Assignees
Labels
topic/uiChange the appearance of the Gitea UIChange the appearance of the Gitea UItype/featureCompletely new functionality. Can only be merged if feature freeze is not active.Completely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
delvh commentedon Jul 3, 2023
I think this issue exists already, the original even has a bounty if I remember correctly.
silverwind commentedon Jul 4, 2023
I couldn't find it earlier. If it exists, I'll add my comment there instead.
techknowlogick commentedon Jul 4, 2023
Ping @kdumontnu as I believe he was the one who put the bounty on it
KN4CK3R commentedon Jul 4, 2023
This is the one with the bounty but we talk about a general refreshing.
lunny commentedon Jul 4, 2023
We need a pub/sub abstract layer to replace
modules/eventsource
as backend of the websocket server side.silverwind commentedon Jul 4, 2023
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.
lunny commentedon Jul 4, 2023
For single and default configuration, we can have a memory pub/sub implementation based on golang channel and a disk implementation.
anbraten commentedon Jan 16, 2024
linking #2287
Subscribe
andFollow
#28908karanysingh commentedon Apr 9, 2025
Is this still open?