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

Make Client Side Websocket Requests Asynchronous #1386

Open
srimanachanta opened this issue Aug 2, 2024 · 2 comments
Open

Make Client Side Websocket Requests Asynchronous #1386

srimanachanta opened this issue Aug 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@srimanachanta
Copy link
Member

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.

@srimanachanta srimanachanta added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 2, 2024
@mcm001
Copy link
Contributor

mcm001 commented Aug 2, 2024

Mom can we have HTTP requests?

No, we have HTTP requests at home

HTTP at home:

@Alextopher
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants