-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Currently boardsesh sync its complete queue state whenever a queue state change is made, this works mostly okay with a small number of users. But above 4 starts to create issues. Also each peer connects to every other peer meaning that the current protocol is very noisey.
Syncing the whole state is a naive implementation, and instead we should move to syncing model where only the state deltas are synced. Ie when a user adds climb X we only send "Added climb X" relevant information.
Later we might need to figure out conflict resolution too, but I would leave that out of scope for now. To deal with the noiseyness, we should only send updates to the host and then have the host propagate from there to the other peers. To do this we do need ro sync the other peers from the host down, in case the host goed fown. If the host goes down to ne of the existing peers becomes the host, to do this we'd require periodic health status messages.
- sync state changes onky from peer to host and from host back to other peers
- Implement health messages, and automatic host swithcinf if host goes down
- refactor from syncing full state changes over to deltas