Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Sometimes move or add operations get lost #342

Open
planger opened this issue Aug 12, 2019 · 2 comments
Open

Sometimes move or add operations get lost #342

planger opened this issue Aug 12, 2019 · 2 comments
Labels
server A issue that is heavily affecting the server part (Java)

Comments

@planger
Copy link
Collaborator

planger commented Aug 12, 2019

I suspect that this is a concurrency issue. If multiple operation requests are sent from the client to the server within a short period of time, the second one might be started before the first one finished, so that the update that is sent back to the client after the second operation doesn't contain the side-effects of the first operation. But this is just a guess, I haven't analyzed it.

In any case, I think it makes sense to have a queue on the server so that we process incoming requests in fifo style making sure that we don't run an operation before the previous operation has been finished.
I think the simplest fix would be to synchronize the operation handlers on the model state object. The more thorough change would be introducing a request queue, but I guess this is not necessary for now, since synchronization on the model state object would suffice. What do you think?

@planger planger added the server A issue that is heavily affecting the server part (Java) label Aug 12, 2019
@planger
Copy link
Collaborator Author

planger commented Aug 12, 2019

Might be related to #327

@tortmayr
Copy link
Collaborator

Synchronization on the model state object sounds reasonable to me. I don't think that a full-fledged request queue is necessary for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
server A issue that is heavily affecting the server part (Java)
Projects
None yet
Development

No branches or pull requests

2 participants