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

WebSocket request/response model #9

Closed
ekuiter opened this issue Sep 18, 2018 · 1 comment
Closed

WebSocket request/response model #9

ekuiter opened this issue Sep 18, 2018 · 1 comment
Labels
client enhancement New feature or request server

Comments

@ekuiter
Copy link
Owner

ekuiter commented Sep 18, 2018

Right now, the server receives WebSocket messages from the client and may answer these (usuall with the updated feature model), but requests and responses are not linked in any way. Of course, this is the intended use of WebSockets. Still, sometimes a client-server model like this would be useful, especially for error handling.

For example: If the user wants to rename a feature, but the name is invalid (e.g., already used), the server currently answers with an error message that is not traceable to the request, so the client has to show the error message out of context (not in the feature renaming dialog, but in a generic "error messages" area). If the client could trace the response (error message) to the request (feature rename), the dialog could stay open and attach the error message to the input field. This is a less annoying user experience.

As this pattern will occur more often (with error messages, of course, and maybe only with error messages), we should solve this generally (most likely by introducing a TCP-like sequence number). We may then promisify requests on the client (e.g., sendMessage(...).then(handleRes, handleErr)) and handle errors in the local editing context.

@ekuiter
Copy link
Owner Author

ekuiter commented Feb 20, 2019

This is not needed now that we have the Clojure kernel. For regular operations, no error message will need to be returned (instead, conflict resolution information is sent). Elsewhere, we can just use global error messages. The complexity is not worth it.

@ekuiter ekuiter closed this as completed Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client enhancement New feature or request server
Projects
None yet
Development

No branches or pull requests

1 participant