Skip to content

Java implementation of Kademlia DHT's routing algorithm.

License

LGPL-3.0, Unknown licenses found

Licenses found

LGPL-3.0
LICENSE
Unknown
LICENSE.template
Notifications You must be signed in to change notification settings

Inoria-cn/kademlia

 
 

Repository files navigation

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.

About

Java implementation of Kademlia DHT's routing algorithm.

Resources

License

LGPL-3.0, Unknown licenses found

Licenses found

LGPL-3.0
LICENSE
Unknown
LICENSE.template

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%