Questions tagged [dht]

A Hash Table is a data structure used to store data in the form of Key=>Value pairs. A Distributed Hash Table (DHT) is basically a hash table distributed across a network of computers(nodes). A DHT uses a Routing Protocol to determine which node to store a piece of data on.

A distributed hash table (DHT) is a class of a decentralized distributed system that provides a lookup service similar to a hash table; (key, value) pairs are stored in a DHT, and any participating node can efficiently retrieve the value associated with a given key. Responsibility for maintaining the mapping from keys to values is distributed among the nodes, in such a way that a change in the set of participants causes a minimal amount of disruption. This allows a DHT to scale to extremely large numbers of nodes and to handle continual node arrivals, departures, and failures.

A DHT uses a Routing Protocol to determine which node(s) a data should be stored on. This routing protocol usually takes care of replicating data and also updating data stores to make sure that the data survives on the DHT for the long term. Some popular routing protocols are Kademlia, Chord and Pastry

275 questions
4
votes
2 answers

How to understand the time complexity of Kademlia node operation

I'm now learning Kademlia network by reading the classical paper Kademlia: A Peer-to-peer Information System Based on the XOR Metric. I want to understand the complexity of its operation but still cannot figure it out. In the 3 Sketch of proof…
Justin Yang
  • 87
  • 1
  • 8
4
votes
1 answer

Can applications coexist within the same DHT?

If you create a new application which uses a distributed hash table (DHT), you need to bootstrap the p2p network. I had the idea that you could join an existing DHT (e.g. the Bittorrent DHT). Is this feasable? Of course, we assume the same…
qznc
  • 1,113
  • 2
  • 12
  • 25
4
votes
1 answer

How to use a DHT for a social trading environment

I'm trying to understand if a DHT can be used to solve a problem I'm working on: I have a trading environment where professional option traders can get an increase in their risk limit by requesting that fellow traders lend them some of their risk…
Kiril
  • 39,672
  • 31
  • 167
  • 226
4
votes
1 answer

Distributed Key/Value store in C/C++ With pluggable storage

I am looking for a C/C++ based distributed key/value store which has a clean enough design so I can plug in my own in-memory storage engine. It is OK even if I have to do code changes to be able to do that. Does anyone have a recommendation? Or a…
user1461001
  • 693
  • 1
  • 7
  • 17
4
votes
2 answers

Ping router.utorrent.com DHT node using netcat

I'm just trying to get a response from router.utorrent.com to potentially make a DHT service down the track. For example, given a magnet link with: xt=urn:btih:a78c852bcc0379e612e1bd794e1fd19061b84d11 the hash…
Cadell Christo
  • 3,105
  • 3
  • 21
  • 19
4
votes
3 answers

Why does Kademlia structure its routing table how it does?

I understand that the Kademlia routing table is made up of 160 buckets. Nodes are put into buckets 0-159, depending on their prefix length (which is the number of leading unset bits in the XOR of the local node key and the node). Why is this so, is…
liamzebedee
  • 14,010
  • 21
  • 72
  • 118
4
votes
5 answers

Why does Kademlia use UDP?

Why does the Kademlia Distributed Hash Table use UDP as its network transport protocol, even though it's unreliable?
liamzebedee
  • 14,010
  • 21
  • 72
  • 118
3
votes
1 answer

How Ethereum protocol works with geth

I am new to Ethereum and generally to blockchain. I learned that Ethereum blockchain works on Kademlia. The distributed hash table and its working was beautiful and nicely explained by Eleuth P2P. Now I used geth to connect to the Ethereum Mainnet…
3
votes
0 answers

Libp2p DHT peer discovery example in JS

According to Libp2p documentation DHT can be used for peer discovery. Also, Filecoin claims that they are using libp2p Kademlia DHT for discovering peers in go. So far I have not been able to find any working examples of how to set it up in JS. When…
3
votes
1 answer

If a node of a DHT fails, will the values become unavailable?

I'm reading up about DHTs, but struggle to find information on what the consequences are for DHT values when a node fails. As far as I understand, without redundancy of data (hash table values) the failure of a single node would simply make the…
3
votes
1 answer

In Kademlia, why is it recommended to have 160-bit node IDs and keys and not 128-bit?

The Kademlia paper states that nodes are assigned random 160-bit IDs as well as the keys. Is this a strict restriction? Can I still go ahead and use a 128-bit keyspace if that's good enough from me?
gravetii
  • 9,273
  • 9
  • 56
  • 75
3
votes
2 answers

How to represent a kademlia routing table as data structure

The kademlia paper talks about the the organization of buckets, splitting, merging and finding the correct bucket to insert in abstract, concise and confusing terms. §2.2 talks about a fixed set of 160 buckets with each bucket covering a fixed…
the8472
  • 40,999
  • 5
  • 70
  • 122
3
votes
2 answers

Consistent Hashing: what about rehashing?

As you may know, consistent hashing is a great idea when dealing with DHT. The main idea is to not suffer too much when a new node is added or deleted. From the original Paper: When a machine is added to or removed from the set of caches, the…
santiagobasulto
  • 11,320
  • 11
  • 64
  • 88
3
votes
1 answer

Use a DHT for a gossip protocol?

I've been digging about DHTs and especially kademlia for some time now already. I'm trying to implement a p2p network working on a Kademlia DHT. I want to be able to gossip a message to the whole network. from my research for that gossip protocols…
yosher lutski
  • 306
  • 2
  • 8
3
votes
1 answer

Can XOR metric be used to implement DHT without Kademlia?

So we can establish that XOR distance metric is a real metric (it’s symmetric, satisfies triangle inequality, etc.) I was thinking before reading about Kademlia and its k-buckets that each node would simply find its own id and store its closest k…
Gregory Magarshak
  • 1,883
  • 2
  • 25
  • 35