100% Guaranteed Results


Distributed Hash Table (DHT) is the program that is the implementation of distributed hash table. The data is stored on various machines and is then requested and data is retrieved. A function for hash generation was made that takes mod with the specified space. Solved
$ 24.99
Category:

Description

5/5 – (1 vote)

Program Flow:
In the starting the program asks for the number of bits of the identifier space such that if 5 bits are specified than the space was 32 bits i.e. 25 = 32. Now ask from the user how many machines he/she want, this number cannot be exceeded 31 because machines are 32 from 0 to 31. It was also ensured that all machines id enter are in that range and are unique. User is given option to enter id’s manually or id’s can be given randomly.

After that two sections are made i.e. 1 is responsible for the data and 2 portion is responsible for the machines manipulation as:

Then specified options are entered and then the things are done according to user choice.

Components of Program
1. Hash generating Function:
A global function that takes the id and the space size , the limit and then id % space size is taken that makes the values to map the identifier space.
2. Ring DHT:
A circular linked list that holds the id of machine. It is a circle that contains all machine id’s and a range of a machine is the numbers less than it till the previous machine node. For the first node all smallest including furthermore, the data after last node id is also included to the first node.
3. Routing tables:
It is a doubly linked list that contains the pointer of each machines and are filled according to the given conditions. The index started from1 and where equal to the machine number allocated by the user.
4. AVL trees:
For storing data AVL trees were used and data was stored into it. The node data was linked list to store the collision data too.

The keys were mapped and then machines were setup in the circular linked list. The machines were then added and their ending range was calculated that how much data from which range can be saved. Then the routing tables were made accordingly. Whenever search was generated by using the routing table the destination pointer was figured out. Then the data was inserted or searched on that node. When a machine is added the AVL trees, routing tables are updated. Whenever a node was added the next node to its entrance was seen and then the tree was updated accordingly. The whole tree was under change was traversed and all data was stored in the linked list that was added again from end that populates the machine again, similarly in deleting case. Thus the machines when added data was shared and when leaved the leaving machine’s data was distributed accordingly. A diagram is shown below:

Reviews

There are no reviews yet.

Be the first to review “Distributed Hash Table (DHT) is the program that is the implementation of distributed hash table. The data is stored on various machines and is then requested and data is retrieved. A function for hash generation was made that takes mod with the specified space. Solved”

Your email address will not be published. Required fields are marked *

Related products