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
Currently, websocket changes sent from the UI to the backend are just assumed to be successful, instead, the backend should return a WebsocketReponse struct similar to an HTTP response. By doing this, we can make sure that websocket-based changes are suspenseful.
To implement this we need to make the backend echo back a WebsocketReponse object back to the UI which has an async promise waiting for this message. Multiple requests can be handled by including the request handler within the response so the promise can determine the intended response. Also means that the API for this can be abstracted well for both the frontend and backend.
The text was updated successfully, but these errors were encountered:
I wonder if you could go into a bit more detail about what kind of improvements we'd see from this. Will this somehow communicate errors or just communicate the network delay to the user?
Currently, websocket changes sent from the UI to the backend are just assumed to be successful, instead, the backend should return a
WebsocketReponse
struct similar to an HTTP response. By doing this, we can make sure that websocket-based changes are suspenseful.To implement this we need to make the backend echo back a
WebsocketReponse
object back to the UI which has an async promise waiting for this message. Multiple requests can be handled by including the request handler within the response so the promise can determine the intended response. Also means that the API for this can be abstracted well for both the frontend and backend.The text was updated successfully, but these errors were encountered: