All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
34.06k stars 3.88k forks source link

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

Open amanape opened 2 months ago

amanape commented 2 months ago

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 commented 2 months ago

Related #1451

rbren commented 2 months ago

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?

amanape commented 2 months ago

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

tobitege commented 2 months ago

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

github-actions[bot] commented 4 weeks ago

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.