Monday, February 22, 2021

Distributed Hash Table in System Architecture

Distributed hash table (DHT) in system architecture?


👉    This is a system architecture model that is a combined and more complex architectural pattern compared to the C2S (Client-Server) and the P2P (Peer-to-Peer).

👉    It is a fully-decentralized mechanism.

👉    Each peer in a distributed hash table (DHT) is assigned with a key and value pair. These pairs are arranged in a manner with the closest ID's related to the immediate successor.

👉    BitTorrent can be an example where DHT can be used to increase its performance and speed of download using the application.

👉    BitTorrent clients use DHT:
                    1.    Key       =    file content hash.
                    2.    Value     =    IP address peer willing to serve file.





What is hard in Distributed hash table (DHT)?

👉     Decentralized.




👉     Scalability.

👉     Achieve efficiency.

👉     Robustness.



How is Distributed hash table (DHT) accessed?



👉    Each peer in the DHT has a peerID and it contains a predessor, successor and a shortcut.

          1.    The predessor is the peer that is situated just above the current peerID.
          2.    The successor is the peer that is situated just after the current peerID.
          3.    The shortcut is a efficient storage which DHT provides to easily access the other                                      neighbouring peers (other than the predessor and the successor).

👉   Lets consider a simple example with 4 peers.

                Peer01        Peer02          Peer03       Peer04

PeerID        001            002               003            004

        ** Lets consider the peer02

                Its successor is Peer03
                Its predessor is Peer01
                The shortcut assigned is Peer04.

👉    The shortcut that is being assigned helps to easily access the other peers in the process of complex          communication.

👉   The peers in the DHT are located in a circular manner where each peer is connected to a                         corresponding peer.




 

No comments:

Post a Comment

Monolithic vs Microservices

👉     Monolithic Architecture. *     Monolithic architecture was there before Microservices came into action.  *     All functionalities or...