-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
first pass at provide many mechanism #2011
Conversation
The new code also does a lot better job of distributing providers, i couldnt get the same test i wrote for my new code to pass using the old code, so i had to change the |
@@ -48,4 +48,7 @@ type Routing interface { | |||
|
|||
// Provide provides the key to the network | |||
Provide(context.Context, key.Key) error | |||
|
|||
// Provide multiple keys to the network at the same time, sharing RPCs | |||
ProvideMany(context.Context, []key.Key) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder if that should be a key channel, to allow providing from a single dag in one call, and then do the stack thing this way
reminder: kademlia is an algorithm designed and proved to scale to very large numbers with logarithmic complexity, and it is designed around the concept of an iterative (and concurrent) query that gets closer to a distance target. this changeset goes against that. think about it like this: it is critical to consider a lot of peers every time (routing tables will get large, hundreds of peers) and pick only the best towards the goal based on the most current information (priority queue), which will come as a result as the query's messages return peers.[0] the large constant factor problems we see now in our small networks are much more due to our own problems in:
important in this kind of algorithmic change to reason through why your approach here is giving you such better numbers, plot out what nodes are getting requested instead, and come up with an algorithmic argument as to why the model still holds (i strongly suspect it does not). |
[0]in fact, one thing to try that may get the same or even better speed up is:
|
next, ok := pmreq.getNextTarget() | ||
if ok { | ||
result.closerPeers = []peer.PeerInfo{{ID: next}} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is breaking assumptions as to how the query runner is meant to work. this should be returning a set of closer peers found through this one peer, not the next best through everyone. instead, the entire query runner should be sampling from everyone found -- see #2011 (comment)
68b9745
to
b0a8591
Compare
cf514d8
to
3224ae0
Compare
License: MIT Signed-off-by: Thomas Gardner <tmg@fastmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
assert that you must build from inside your gopath
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
My bad. Introduced in #2366 License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Fix spelling error
introduce a low memory flag
License: MIT Signed-off-by: Adrian Ulrich <adrian@blinkenlights.ch>
License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
use net/url to escape paths in web-ui
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
dns: update dns command docs
added --json to "ipfs config" command; added modification to fuse.conf; License: MIT Signed-off-by: Giuseppe Bertone <bertone.giuseppe@gmail.com>
Implements repository initialization with default config
"ipfs log ls" command
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
Make blocks.Block an interface.
This uses a stringList to output each log command as an item in an array in an object called Strings, instead of using the MessageOutput func. This closes #2636. License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Marshal log ls better
startup_cluster() already contains some test_expect_success, so it should not be inside one. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
test-lib: make checking for docker silent
The link to the commit file shell link should be to the raw file. That makes it easier for peopel to wget it without caring about using GitHubs interface. Perhaps this should also be hosted on IPFS License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
Update shell link to allow wget
t0170 misc fixes
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
add a dist_get script for getting bins from dist.ipfs.io
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
5c05b27
to
74a0e03
Compare
Provide multiple keys at a time, more efficient as we combine RPCs where possible, savings also made during the initial 'find closest peers' step.
The basic tests i added show a savings of over 90% total network bandwidth (100k on new code, 1.5MB old code). It also takes about half the time (though the tests are performed over the loopback, so no latency is involved)
License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com