OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Open a new event stream / channel dedicated for error messages, notifications, and related data

Open amanape opened this issue 1 year ago • 6 comments

Summary Create a new event stream / channel in the form of another WebSocket connection or message queue that is dedicated for sharing non-agent related data. Things like error messages, loading indicators, and other notifications of the sort could benefit from a separate channel as it would be sent quickly and without blocking the main event stream (or the other way around)

Motivation We need to find a way to push certain message in the backend that are not being sent to the UI in an efficient manner that does not slow down the main event. For example, an error that is thrown and its details (missing API Key), loading indicators (pulling docker image), and so on

Technical Design Unlike the current event stream, this channel does not have to be bi-directional. As for the actual implementation, the options are another WebSocket path or a message queue-like setup where we can publish and subscribe to the different events

Alternatives to Consider

Additional context

amanape avatar Sep 05 '24 08:09 amanape

Related #1451

amanape avatar Sep 05 '24 08:09 amanape

Hmm I'm not sure we need a new websocket or EventStream here. Instead, I'd like to figure out why errors aren't propagating immediately over the current WS/ES--is there some reason that they're getting blocked?

rbren avatar Sep 05 '24 13:09 rbren

From our earlier discussion on Slack, we could change the issue to focus on pushing any and all relevant errors or build indicators to the frontend first and then see how well it handles and what changes we can make to the event stream

amanape avatar Sep 05 '24 18:09 amanape

@rbren - the EventStreamRuntime is single-task currently, iirc, and our traffic isn't async yet.

tobitege avatar Sep 05 '24 18:09 tobitege

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Oct 07 '24 02:10 github-actions[bot]

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 14 '24 01:11 github-actions[bot]

I think this has been solved with the status messages, so I'm closing it. Please feel free to reopen @amanape if you don't think it's fixed.

enyst avatar Nov 14 '24 02:11 enyst