You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turning this into a separate ticket to make it more clear what's been worked on since I started on #16518
Context
As mentioned in the parent ticket, we had a few assumptions about what was and wasn't possible about our WebSocket (WS) and Server-Sent Event (SSE) communication, and these ended up being wrong. Namely, we thought there was no good way to fix the root problem of the UI locking up when multiple tabs are opened, and the best we could do is create a UX band-aid to help direct users from hitting these edge cases.
It turns out, this is a problem that only exists with the Server-Sent Events protocol. Even on HTTP/1.1, all modern browsers support proper duplexing for socket connections. So naturally, if SSEs have the problem, and WSs don't, we can switch everything over to WebSockets.
Concerns
As of right now, the Coder SDK exposes a lot of Server-Sent Event concerns and types as public exports. We can't have any breaking API changes, so the best we can do is officially deprecate this functionality, and add documentation nudging people to favor WebSockets.
Tasks
Add OneWayWebSocket function that automatically handles upgrading an HTTP connection to WS, and handles all concurrency concerns
Add (non-flaky, concurrent) tests for OneWayWebSocket
Mark all previous SSE-based API routes as deprecated
Add new API routes that are WebSocket-based
The text was updated successfully, but these errors were encountered:
Tests are mostly done – there's just one case left that needs to be finished up . I'm running into a situation where the test output is +95% right, but some unexpected characters are getting added as bookends. It's fully possible that this is the correct behavior, and that there's parts of the WS protocol that I'm missing, but I need to verify that
Even with all the existing API endpoints still existing and being untouched, I'm running into test suite failures. If finishing up my new tests doesn't fix that, I'll need to see else needs to be addressed
Turning this into a separate ticket to make it more clear what's been worked on since I started on #16518
Context
As mentioned in the parent ticket, we had a few assumptions about what was and wasn't possible about our WebSocket (WS) and Server-Sent Event (SSE) communication, and these ended up being wrong. Namely, we thought there was no good way to fix the root problem of the UI locking up when multiple tabs are opened, and the best we could do is create a UX band-aid to help direct users from hitting these edge cases.
It turns out, this is a problem that only exists with the Server-Sent Events protocol. Even on HTTP/1.1, all modern browsers support proper duplexing for socket connections. So naturally, if SSEs have the problem, and WSs don't, we can switch everything over to WebSockets.
Concerns
Tasks
OneWayWebSocket
function that automatically handles upgrading an HTTP connection to WS, and handles all concurrency concernsOneWayWebSocket
The text was updated successfully, but these errors were encountered: