Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All users in a channel should converge to have all messages eventually (ideally, soon) #9

Open
holmesworcester opened this issue Oct 16, 2020 · 0 comments

Comments

@holmesworcester
Copy link
Contributor

holmesworcester commented Oct 16, 2020

We want to make sure everyone in a channel is eventually in sync. We should be aggressive about this!

We should create edge cases to try to break sync. (e.g., network gets split, morning crew talks and go offline, evening crew appears, as soon as two from both are online they should sync.)

One approach:

  1. every message includes HEAD of repo. If HEAD shows that user has more messages than you, you git fetch. Git fetch retries if that user is busy with exponential backoff.
  2. If you see someone with a HEAD behind you, you reply in a hidden message with your HEAD.
  3. Users send a special message on join to the channel so others can see they are online. This announces their HEAD. If their head is behind, they'll get replies with a later HEAD, which will trigger fetch.
@holmesworcester holmesworcester added this to the backlog milestone Oct 16, 2020
@holmesworcester holmesworcester changed the title All users in a channel should have all messages eventually (ideally, soon) All users in a channel should converge to have all messages eventually (ideally, soon) Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant