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

Changing Kademlia Metric - Unidirectional Property Importance

Kademlia uses XOR metric. Among other things, this has so called "unidirectional" property (= for any given point x and distance e>0, there is exactly one point y such that d(x,y)=e). First question is a general question: Is this property of the…
Wapac
  • 4,058
  • 2
  • 20
  • 33
0
votes
1 answer

bittorrent-dht bruteforce hash discovery questions

So, I am new to node.js, I picked it up out of necessity to use bittorrent-dht which seems to have all I need for my idea. My idea is basically to generate random hex strings, and do a lookup on the DHT, keep the ones with enough peers, to later…
0
votes
1 answer

what is the structure of bencode reply to get_peers dht request?

I am doing packet analysis for dht traffic. I am able to match dht get_peers request to its corresponding response through sniffing packets from my program. When I decode (bendecode), I am getting following nodes. dict {
ip => str =…
M Rusedski
  • 85
  • 5
0
votes
1 answer

Optimizing keyspace partitioning during node joins in a distributed hash table

When a node joins a DHT network, it seems optimal for the new node to evenly divide the largest interval on the consistent hash's circle in order to minimize remapping. However, this is only optimal for 2n nodes (assuming with start with n=1); all…
ZachB
  • 13,051
  • 4
  • 61
  • 89
0
votes
2 answers

How to interpret 'nodes' in a DHT response?

I'm reading through BEP-0005 and I don't really understand how the node IDs translate to (IP, port) pairs. Consider the following code: import bencode import random import socket import pprint # Generate a 160-bit (20-byte) random node ID. rand =…
d33tah
  • 10,999
  • 13
  • 68
  • 158
0
votes
0 answers

Adafruit dht22 Returns none on Raspberry Pi (2)

Hi I have a simple python code on my Raspberry pi 2 that reads data from the dht22 sensor and posts it to web, but when i leave the program running after like a minute or so the sensor starts returning "none". I have checked the wireing multiple…
Ingmar05
  • 501
  • 2
  • 8
  • 25
0
votes
1 answer

How to use DHT library dht-example.c for distributed hash tables

I want to use BitTorrent DHT library as distributed hash tables from within a C program. Therefore I downloaded and compiled it on my machine - worked flawless. Now I have an executable dht-example which outputs: Usage: dht-example [-q] [-4] [-6]…
Achim
  • 442
  • 1
  • 3
  • 13
0
votes
1 answer

What is the difference between leaf set and routing table entries in DHT?

I am new to DHT (Distributed Hash Table). I have read theory regarding DHT (Pastry implementation - FreePastry). But I was really confused about distinction between leaf set, routing table and neighborhood set. What is their significance? Also what…
harshlal028
  • 1,539
  • 1
  • 16
  • 25
0
votes
1 answer

Where to send DHT announce to?

Writing another DHT-ready torrent client I run into a question regarding announcing on DHT. It is clear that I have to sent get_peers to the nodes closer and closer to the searched info hash until at least one node respond with a list of peers…
Alex
  • 655
  • 1
  • 8
  • 16
0
votes
2 answers

BitTorrent peers with zero ports

Occasionally trackers, DHT nodes, and PEX peers offer peer addresses with a port of 0. What does this mean? In the context of submitting one's own port to a tracker, or in DHT, sending a port of 0 means that the recipient should use the sender's…
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
0
votes
2 answers

DHT TCP API using UDP internally to serve requests (twisted)

Not sure if this is the right title for my problem, but here it goes: I am currently implementing a Distributed Hash Table (DHT) with an API which can be contacted through TCP. It can serve multiple API calls like PUT, GET, Trace, while listening on…
puelo
  • 5,464
  • 2
  • 34
  • 62
0
votes
3 answers

Explaining NAT Tranversal C++?

I have created an P2P application which is FULLY decentralized and is using a Kademlia algorithm to make it so. This has been tested on the local network and it completely successful. I heard about UDP Hole Punching, however hole punching requires…
user3858657
0
votes
1 answer

Preventing code deletion in a p2p app

user A and user B download an open source app built on a DHT. The app generates a bitcoin keypair for each user. The app demands that if user A requests user B's data, user A has to pay user B a small micropayment. A problem arises if the app is…
user1161310
  • 3,069
  • 3
  • 21
  • 27
0
votes
1 answer

Getting scrambled replies from DHT bootstraps for Bittorrent

I'm trying to implement a DHT node in the Bittorrent mainline. So far I got a connection in and out against a bootstrap node, the query seems to be fine according to some bencoded examples but part of the result I'm getting back is all scrambled…
dElo
  • 124
  • 10
0
votes
1 answer

Is there a framework for writing a decentral application?

If I want to write a node for a P2P application (like Bitcoin, Bitorrent, etc.) there are a lot of parts that are the same: I need to bootstrap to the network (discover other peers) I need to manage a list of peers, and monitor their states I need…
Maestro
  • 9,046
  • 15
  • 83
  • 116