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

Add request-response transactions #20

Closed
planger opened this issue Nov 7, 2019 · 1 comment
Closed

Add request-response transactions #20

planger opened this issue Nov 7, 2019 · 1 comment

Comments

@planger
Copy link
Member

planger commented Nov 7, 2019

When a client invokes an operation, we typically have the following interaction scheme, if client-side layout is switched on:

C --> S: ExecuteOperationAction
   |
C <-- S: ComputeBoundsAction
   |
C --> S: ComputedBoundsAction
   |
C <-- S: UpdateModelAction

If the client invokes multiple operations in a short time, it may happen that the second operation invocation is sent before the UpdateModelAction from the first operation has arrived. This may lead to strange behavior in the diagram, as it may seem to the user that the second, third, ... action is undone. This is because the "visual feedback" of a ChangeBoundsAction (client-side local move) is first applied on the client and is then reset by the UpdateModelAction sent by the server before it is applied again by a following UpdateModelAction.

A possible approach could be introducing an action queue on the server and waiting for the ComputedBoundsAction from the client before a next incoming action (if it is an operation) is processed. This queue would ensure that the operations are not processed before the entire interaction scheme is completed. However, it may not be sufficient to avoid resetting and reapplying the actions caused by multiple ChangeBoundsActions that lead to sequential UpdateModelActions. Therefore, we may have to batch those operations (skipping the UpdateModelAction).

@planger
Copy link
Member Author

planger commented Nov 7, 2019

This issue might be but not necessarily is related to eclipsesource/graphical-lsp#342 and eclipsesource/graphical-lsp#327.

@tortmayr tortmayr transferred this issue from eclipse-glsp/glsp-server Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants