0% found this document useful (0 votes)
96 views12 pages

Distributed Hash Table (DHT)

Distributed Hash Tables (DHTs) distribute data across nodes by mapping keys to values using a hash function. Each node becomes responsible for a range of data items in the address space. DHTs allow each node to have partial knowledge of the network to route queries to the responsible node storing the data. Data and peer identifiers are hashed to a point in a large address space circular ring. Queries are routed to the node closest to the key through each node's partial knowledge of the ring. Nodes can join and leave the DHT network as computers are turned on and off.

Uploaded by

phalanetra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views12 pages

Distributed Hash Table (DHT)

Distributed Hash Tables (DHTs) distribute data across nodes by mapping keys to values using a hash function. Each node becomes responsible for a range of data items in the address space. DHTs allow each node to have partial knowledge of the network to route queries to the responsible node storing the data. Data and peer identifiers are hashed to a point in a large address space circular ring. Queries are routed to the node closest to the key through each node's partial knowledge of the ring. Nodes can join and leave the DHT network as computers are turned on and off.

Uploaded by

phalanetra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Distributed Hash

Table (DHT)
Hello!

2
HASH TABLE

📌 Data structure that maps “keys” to “values”.


📌 Essential building blocks in software systems

3
Distributed Hash Table (DHT)

📌A Distributed Hash Table (DHT) distributes data (or references to data)


among a set of nodes according to some predefined rules.
📌 Each peer in a DHT-based network becomes responsible for a range of data
items.
📌 DHT-based networks allow each peer to have a partial knowledge about the
whole network
📌 This knowledge can be used to route the queries about the data items to the
responsible nodes using effective and scalable procedures that we will discuss
shortly

4
Address Space

📌 Essential building blocks in software systems


In a DHT-based network, each data item and the peer is mapped to a point in a
large address of sie 2m
📌 the address space is distributed evenly on a circle with 2m points (0 to 2m −
1) using clockwise direction.

5
Adress
space
▪ 1. Space range is 0 to 2m – 1.
▪ 2. Calculation is done modulo 2m.

6
Hashing Peer Identifier

The first step in creating the DHT system is to place all peers on the address
space ring. This is normally done by using a hash function that hashes the peer
identifier, normally its IP address, to an m-bit integer, called a node ID.

👉node ID = hash (Peer IP address)

7
Hashing Object Identifier

The name of the object (for example, a file) to be shared is also hashed to an
m-bit integer in the same address space. The result in DHT parlance is called a
key.

👉key = hash (Object name)

8
STORING THE OBJECT

▪ There are two strategies for storing the object: the direct method and the
indirect method.
▪ In the direct method, the object is stored in the node whose ID is
somehow closest to the key in the ring
▪ most DHT systems use the indirect method due to efficiency

9
ROUTING

▪ Routing is the process of selecting a path for traffic in a network


▪ The main function of DHT is to route a query to the node which is
responsible for storing the reference to an object
▪ Each DHT implementation uses a different strategy for routing, but all
follow the idea that each node needs to have a partial knowledge about the
ring to route a query to a node that is closest to the responsible node.

10
Arrival and Departure of Nodes

▪ In a P2P network, each peer can be a desktop or a laptop computer, which


can be turned on or off.
▪ When a computer peer launches the DHT software, it joins the network
▪ when the computer is turned off or the peer closes the software, it leaves
the network.

11
THANKS

EVERYONE!

12

You might also like