-
Notifications
You must be signed in to change notification settings - Fork 4
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
Koorde - beyond Kademlia #20
Comments
Could you please explain a little more what you mean when you say Koorde can use 16 connections instead of 2.. are these connections to direct successor nodes in the ring, or are they connections across the ring to node Also when you say |
Normal so-called degree-2 Koorde maintains a connection with a successor node and node that is before id degree-N core maintains N forwarding connections. The nodes are Essentially successor nodes are used for correction of requests (linear progress), and forwarding connections are used to make exponential progress (in keyspace), but we might have to correct them (make linear progress for some time) if we jumped to close. One of the points of Koorde is showing that the linear progress will have an upper, constant limit.
TCP vs UDP is an implementation detail, but when I say connection, I mean that we have to track those nodes closely. In the case of successor connections, we have to check if they didn't fail to maintain the stability of the network. We will also receive join requests to the network through them. They might want to hand over a key-value store to go offline etc. In case of forwarding connections (across the circle) we will use them for every request (with equal probability), and the same story, we want to maintain them to tell when they fail so we can recover. If something is unclear, ask. |
That's clear, thank you 👍 |
Having more libp2p implementations of routing systems and DHTs for us to work with certainly seems like a 👍. As was mentioned, Koorde, Kademlia, etc. have different benefits and use cases, so it could be really interesting to see if we can use the testbed to exercise performance under varying types of normal and adversarial conditions. |
We used to use Pastry in 2008, an early ring-based p2p system, and we had a great experience with it (except that it wasn't very good with NAT). It's great to see an alternative DHT, a diversity of implementations will make libp2p stronger! |
Koorde is a DHT based on Chord, and the driving principle is a bit different than Kademlia.
Instead of using XOR metric Chord (and Koorde) interprets keyspace as a circle.
Connecting nodes to the next node in the circle (successor) create the basis of the network. As long as there exists this connection forward, the DHT is fully functional (albeit slow). By maintaining additional connections across the circle, Koorde achieves logarithmic lookup we expect from the DHT.
This is where Koorde and Chord diverge and where the improvement of Koorde comes in. The important benefit of Koorde is its ability to use multiple connections across the network efficiently.
By using (for example) 16 connections, instead of 2, Koorde can reduce the number of required messages (and new connections) by a factor of more than 4 (from 26 to 6.3 on average).
It is important to point out significant differences of Koorde from Kademlia:
k'
fromk
with use of hashing:k'(i) = SHA256(k || i)
In my opinion, and in comparison with Kademlia, Koorde can function as a highly cooperative network but can resist possible failures and attacks. While it might not be a perfect fit for organized chaos type network (what we do currently with our Kademlia), I firmly believe that it can function extremely well in case of delegated routing schemes with dedicated routing network with multiple independent parties cooperating.
With metrics as low as 5.6 messages per lookup I think sub-1 second record lookup time should be possible which would be a major improvement over our current DHT.
I have created a toy implementation of Koorde in Go (https://github.com/Kubuxu/go-toy-koorde-dht). It currently implements the lookup algorithm, but I plan to implement the rest of the protocol there to scope out possible issues. It also provides a way to benchmark the implementation and parameters. These are the results:
https://docs.google.com/spreadsheets/d/1PgkvrYWYynu-lS-B8kjjGCuqJqol4nqnleNJzV8brcE/edit?usp=sharing
Koorde paper: https://www.comp.nus.edu.sg/~bleong/hydra/related/kaashoek03koorde.pdf
Chord paper: https://pdos.csail.mit.edu/papers/chord:sigcomm01/chord_sigcomm.pdf
The text was updated successfully, but these errors were encountered: