Skip to content
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

Add support for a connection oriented WebSocketConnector #308

Open
notthetup opened this issue Apr 3, 2024 · 0 comments
Open

Add support for a connection oriented WebSocketConnector #308

notthetup opened this issue Apr 3, 2024 · 0 comments

Comments

@notthetup
Copy link
Collaborator

notthetup commented Apr 3, 2024

The current implementation of the WebSocketConnector is a "Hub-style" connector, where it collects all incoming WebSockets connections and streams a single input stream to the single ConnectionHandler.

This is very useful in the case of WebShell where the final consume (ShellAgent) can only consume/generate a single stream so the stream has to be replicated to all the WebSocket clients.

However, with the API side of things, this causes an issue since multiple users could be connected to the same MasterContainer but the MasterContainer will treat them all as a single user since it only sees a single ConnectionHandler. This causes the browser-based fjåge Gateways to be unable to perform the wantsMessagesFor action.

The downside of not supporting this action is the browser-based fjåge Gateways get a ton of unwanted messages which affects performance especially over slower connections.

We should add support for a WebSocketConnector like the TCPConnector that can be spawned on a new connection and independently manage the connection to a single WebSocket client. We can keep the current functionality of WebSocketConnector and rename as WebSocketHubConnector since it is similar to the TCPHubConnector

@notthetup notthetup changed the title Add support for a connection oriented WebSocket connector Add support for a connection oriented WebSocketConnector Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant