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
Labels
server
A issue that is heavily affecting the server part (Java)
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?
The text was updated successfully, but these errors were encountered: