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
2
votes
1 answer

Which Python 2.x DHT implementation is going to be easiest to port to Python 3.x?

Previously I asked which DHT implementations are compatible with Python 3.x - StackOverflow's answer confirmed my worst fear: So far nobody has released a Python 3.x compatible Distributed Hash Table implementation. That means it's to roll up my…
Salim Fadhley
  • 22,020
  • 23
  • 75
  • 102
2
votes
1 answer

Connect to torrent "swarm" or DHT with ruby

I'm probably lacking in some fundamental understanding of how BitTorrent, DHT, and the "swarm" work, as I'm not even sure if DHT and the "swarm" are one and the same. However, I'm trying to find peers, the number of peers, and some statistics about…
tekknolagi
  • 10,663
  • 24
  • 75
  • 119
2
votes
2 answers

how to build one to many rows in tokyo cabinet?

i quote from the tokyo cabinet docs... As for database of hash table, each key must be unique within a database, so it is impossible to store two or more records with a key overlaps. or does tokyocabinet allow tuple based keys ? what would be…
bosky101
  • 2,244
  • 1
  • 18
  • 10
2
votes
1 answer

What is the necessity of error messages in the unreliable RPC protocol that BitTorrent Mainline DHT uses?

Mainline DHT is the DHT used by BitTorrent, which implements an RPC protocol over UDP called KRPC. KRPC includes support for error messages outlined here. Why is this necessary? As this is an unreliable protocol, there is no guarantee of these…
liamzebedee
  • 14,010
  • 21
  • 72
  • 118
2
votes
1 answer

Simulating node failure in a DHT

I'm currently doing some performance testing with the free pastry DHT. Freepastry is an open source DHT done in Java. The goal is to monitor the effect on the DHT when a certain number of nodes go down. My problem is I'm not sure on the best way to…
Travis
  • 705
  • 6
  • 30
1
vote
1 answer

Mainline DHT unspecified entry in bencoded dictionary

I have found an entry in a bencoded dictionary in DHT traffic, generated by BitTorrent, which I do not understand, nor can find anything about in the DHT specification at http://bittorrent.org/beps/bep_0005.html. Example of packet query and response…
1
vote
1 answer

Query DHT Server

I'm trying to make a simple query to a DHT server. I'm trying to make a simple simple example to test queries to the servers, but I don't get a response from the server in any form... Little example: $socket =…
Zenth
  • 769
  • 2
  • 7
  • 23
1
vote
2 answers

Chord (Distributed Hash Table)

I want to create my own Chord implementation for P2P file sharing I followed an article which explained that every node has it's ID (hash of the IP for example) my questions are: how a new client join the network? there must be a server to manage…
socksocket
  • 4,271
  • 11
  • 45
  • 70
1
vote
1 answer

Is it possible to receive from one port and send through another in mainline dht?

I'm trying to implement mainline dht. While implementing I found it easier to use multithreading to handle requests and send requests at the same time. But it's impossible for a singular port to both send and receive at the same time. There's two…
raz
  • 29
  • 7
1
vote
1 answer

How is a token value generated in mainline dht's get_peers query

I am reading bep 5 and trying to understand how a token value is generated. As I understand the token value is a randomly generated value that is used in a get_peers query for safety. This same token value would then be used in an announced_peers…
raz
  • 29
  • 7
1
vote
1 answer

How to perform a BitTorrent handshake given an infohash and it's peers?

I'd like to continue my last related thread in my attempt to understand and build a BitTorrent search engine. While listening the network for "get_peers" messages, I manage to grab infohashes. I proceed to ask the corresponding DHT node for it's…
1
vote
1 answer

Where exactly in IPFS.create() or IPFS.add() does my node propagate an updated distributed hash table upon adding a file?

Original question: Does the IPFS.add() method automatically update my local DHT and propagate it to other peers? In order to test whether the IPFS.add() method alone allows other peers to download content from a my pc, I ran this script on my…
rasputin
  • 31
  • 5
1
vote
1 answer

Why there is this "ip" field in a bittorrent dht querying response?

I was debugging this dht implementation when I came across this query response (KRPC type r). Theres no documentation about an "ip" field in BEP5, so why is this happening? Why does sometimes the response have the "ip" field and other times it…
1
vote
2 answers

What is the maximum size of the udp packet which is sent by the mainline DHT node for the get_peers query?

What is the maximum size of the udp packet which is sent by the mainline DHT node for the get_peers query? How does the node response when it store 3000 peers? (the packet is very large in that case). How does the mainline DHT client handle it's…
Art Spasky
  • 1,635
  • 2
  • 17
  • 30
1
vote
1 answer

Bittorrent MDHT responses

What does the 'v' key value correspond to in Bittorrent Mainline DHT (MDHT) responses? Here's an example buncoded response: {'y': b'r', 'r': {'id': b'\x9d\x97\xb5\x8cJ\x8c#\xf4PF\xe3|\xf3\t\xbb#\xdaj\\\xdc'}, 't': b'7/', 'v': b'UT[\xf9'} I…
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526