Skip to content

Use deltas for sharing data in party sessions #109

@marcodejongh

Description

@marcodejongh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions