Lecture2Gether
Lecture2Gether copied to clipboard
Sync-issue: Receiving states in different order
I think, currently it is not guaranteed, that all state-messages arrive at all clients in the same order (as discovered in #76). This could result in synchronization issues, since the ground truth of the server is broken and clients could be in different states.
To maintain the servers ground truth, the backend could add some sort of ID or counter to the state message, before propagating it to all clients.
The backend adds the server time when the state update is received. This functions as the ground truth. I don't know if the frontend checks these timestamps (in short: drops the states that have older timestamps than its current state).