ep2p / kademlia-api

Java Kademlia Library. Highly configurable, Generic and very abstract to cover most usage scenarios.

Home Page:https://ep2p.github.io/kademlia-api/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation Maven Central Github Releases Open Issues Liscence

Kademlia Api

Abstract Java Kademlia API.

This API mainly focuses on an abstraction layer for Kademlia Algorithm, allows you to implement the network and storage layer in any ways you want. However, DHT, node bootstrapping, and other communications logics are already implemented.

If you want to skip the network abstraction implementation, take a look at Kademlia Netty project.

Key Features

  • Allows peer GUID to be an Integer, Long or even BigInteger
  • Automatically handles most of the operations related to GUID type
  • Highly configurable
    • There is an abstraction for most important things such as DHT repository or networking layer (where messages are sent and received)
    • Other configurations can be passed through NodeSettings where the property names are clean and informative
    • Protocol can easily change by overriding the default MessageHandlers
    • There are many available decorators so API is easily extendable
  • It's written protocol based where all messages have types, and you can register different handler for each message type.
  • Ping, Pong, Find node (+ bootstrapping), DHT (store & lookup) are already implemented

Installation

Using maven central

<dependency>
    <groupId>io.ep2p</groupId>
    <artifactId>kademlia-api</artifactId>
    <version>5.1.2-RELEASE</version>
</dependency>

GitHub releases page only contains certain releases. See all maven releases in maven repository and choose the newest one there.


Documentation

You can access the full documentation in our Hugo hosted website :)

Donations

Coffee has a cost 😄

Any sort of small or large donations can be a motivation in maintaining this repository and related repositories.

  • ETH: 0x5F120228C12e2C6923AfDeb0e811d74160166d90
  • TRC20: TJjw5n26KFBqkJQbs7eKdxkVuk4pvJdFzE
  • BTC: bc1qmtewrl7srjrkl8t4z5vantuqkz086srj4clzh3

Acknowledgments

Since this project is completely experimental (at least for now), I'd like to thank to some people around the internet that helped me gain some knowledge about Kademlia and its implementations beyond the paper. I know my implementation as a sample and abstract kademlia api, not most complete.

Videos

In first video of EP2P lecture about Kademlia Algorithm, we are going to gain brief understanding about elements of Kademlia nodes, network structure and Distributed Hash Tables (DHT) in theory.

In this video we see some code example in Java for Kademlia API using an abstract library written by EP2P. (The code used in this video is out dated)

About

Java Kademlia Library. Highly configurable, Generic and very abstract to cover most usage scenarios.

https://ep2p.github.io/kademlia-api/

License:MIT License


Languages

Language:Java 100.0%