Java implementation of Kademlia DHT's routing algorithm.
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src Focused project on Kademlia Sep 28, 2017
.gitignore Focused project on Kademlia Sep 28, 2017
LICENSE
LICENSE.template
README.md
checkstyle.xml Focused project on Kademlia Sep 28, 2017
nb-configuration.xml Focused project on Kademlia Sep 28, 2017
nbactions.xml Focused project on Kademlia Sep 28, 2017
pom.xml Focused project on Kademlia Sep 28, 2017
ruleset.xml Focused project on Kademlia Sep 28, 2017

README.md

Kademlia

This project is a faithfully implementation of the Kademlia distributed hash table (DHT) routing algorithm. This is an implementation of the strict version of the algorithm. The code is readable, documented, well tested, and fills in all of the missing pieces from the algorithm presented in the original paper.

The Kademlia algorithm is the backbone of many massive-scale decentralized applications, including...

To use this implementation, construct an instance of the Router class. You can specify the main parameters of the routing algorithm here, specifically...

  • node ID bit length
  • number of branches to generate whenever a k-bucket splits
  • maximum number of nodes allowed in each k-bucket
  • maximum number of cache nodes allowed in each k-bucket

Once you have a Router instance, you can call...

  • touch() whenever a node comes in contact
  • stale() whenever a node has failed to come in contact / keep-alive
  • find() to find the closest nodes in the routing table to some ID

If you need usage examples, check out the RouterTest.java class in the test sources.