-
Notifications
You must be signed in to change notification settings - Fork 174
What are Distributed Hash Tables ?
OpenDHT implements a Distributed Hash Table (DHT) of the Kademlia kind. A DHT can be viewed as a distributed dictionary: it provides access to a common shared key->value data-store, distributed over participating nodes.
From a user perspective, a DHT essentially provides a map interface, with two main operations: put(key, value)
and get(key)
. Get will retrieve values stored at a certain key while put (often called announce) will store a value on the network. Note that many values can be stored under the same key.
The Kademlia DHT algorithm allows to contact only O(log(n))
nodes for a get or put operation, n being the number of nodes in the network. This property makes DHTs very scalable as demonstrated, for instance, by the mainline BitTorrent DHT running with tens of millions of nodes. Kademlia DHTs define the distance between keys or between keys and node IDs as XOR and use an iterative search algorithm.