-
Notifications
You must be signed in to change notification settings - Fork 10
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
Replication limiter #15
Conversation
adds repl manager as dep. Integrate dominic's changes. Add latest commit number for rep manager trying mess with logging. adds more logging so painful dkfjdsaflkjfdslkjfdsalk Maybe? dfk remove logging use latest rep manager. pass priority to replication manager use latest rep manager.
About to start using this branch in Patchwork. I'll let ya'll know how it goes. |
01dd1b9
to
739ba54
Compare
sorry @pietgeursen, made a bit of a mess of the commit history trying to get master merged in (and the merge conflicts properly resolved). |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
Anything I can do to help this along, or are you waiting from feedback from @staltz and @dominictarr? |
I think this is part of a project that was cancelled, so I'm not sure that this code in this state is currently reflecting a fully functional code state that we want to include into master branch. I'm inclined to archiving this PR for future reference once we resume this work. |
Cool, I would love to merge these improvements but if the PR isn't going to get merged then I'd prefer to just close it. I'm going to close both this and ssbc/ssb-friends#11, please re-open and/or ping me if I've done something rude/wrong. ❤️ |
if I recall correctly, this was intended to fix a problem with cpu usage, or slow syncing, but once it was ready it turned out it wasn't the problem - the problem was indexing. |
Motivation:
manyverse needs the ability to limit the number or peers being replicated to improve performance of the app. This PR integrates the ssb-replication-limiter module I've written to help solve that problem.
Changes in this PR:
getPeerAheadBy
that the limiter can use to find out how far ahead a remote peer's feed is. The limiter uses this value to decide whether or not to change modes.request
method fromebt.request (feedId, enableReplication)
toebt.request (feedId, enableReplication, [priority])
so the limiter can prioritise who to replicate first. See this PR for the changes to ssb-friends.request
function from the module. This wasn't done previously, I assume this was a bug because currently we're hooking thesbot.request
function and it hasn't been needed.Using
request(<feedId>, **false**)
to pause replication.Dominic said that using request like this might cause problems with eventual consistency. See this issue for more context.
Until ebt has a better pause feature I'm hoping we can use
request
like this.