Currently the board.init event is used to start a user session by sending full board history from server to client. I propose that we
Store the full history in localStorage or indexedDB
Assign a serverSerialNumber attribute to events
At session start, only request and transmit events with a greater serial than latest in local history
Local events stored to local history only after a serverSerialNumber is received so that they can be inserted into the common timeline
Additional opportunities
In offline mode, the non-synced local events can also be stored but must not be mixed with the common timeline (because they don't have a serverSerialNumber yet)
The latest board snapshot can also be stored locally (and on the server) if it appears that recalculating from full history becomes too heavy
We may even consider not having a server-side snapshot of the board in memory, as it's not really needed. The only reason to have one is to validate that actions from clients are applicable and constitute a consistent timeline that results to a valid board state. If we trust the clients, we may skip this.
Currently the board.init event is used to start a user session by sending full board history from server to client. I propose that we
Additional opportunities