ModelServer notification loop #124
Replies: 1 comment 4 replies
-
I did something quite similar to avoid sending concurrent updates. I used v4 from node-uuid lib to generate the uuid, then set a property named "commandUuid"
So yes, you can absolutely customize it this way if you want to. In case it wouldn't work, this may mean I forgot about a customization I made on the model server, so please, let me know and I'll look for it. But I think that's all of it. About the loop, there are basically 2 possible approaches for a client :
The 1st approach works best if you expect your commands to have complex side-effects you do not fully know about in your client. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
currently we're testing of the connection of a Language Server and the Model Server. The Language Server is currently connected to the Model Server in 2 ways:
we've noticed that when the Language Server sends an edit/update command to the Model Server, it immediately also receives the same change notification via WebSocket connection. We wouldn't like to have that notification back since the LS is already aware of it.
By taking a look to the ModelServer implementation it seems that this behavior is correct because there is no identification of the WS clients.
Is there something planned to avoid this unnecessary "notification loops". Do you think is something that could be adapted on our ModelServer implementation?
So far I think that each change request sent to the ModelServer could include an UUID that can be later returned as part of the change notification via WS. So the different WS client can decide whether to react on that change based on the returned UUID.
Would this be feasible?
Another question is, do other Model Server clients (i.e. Theia model server or GLSP) manage this loops?
Kind regards.
Beta Was this translation helpful? Give feedback.
All reactions