Update for 25-04-22 12:30

This commit is contained in:
Tyler Perkins 2022-04-25 12:30:01 -04:00
parent 5d44c50f1d
commit c74fc01d2e
2 changed files with 39 additions and 0 deletions

38
tech/DHT.wiki Normal file
View File

@ -0,0 +1,38 @@
= DHT =
A DHT or Distributed Hash Table is a distributed system that provides a look up
service, similar to that of a [[hash_table]]. The difference however, is the
distributed, self organizing nature of such a datastructure. The keys are
distributed in such a manner that any disruption of nodes causes minimal
disruption to the availability of the data.
DHTs are used in cooperative web caching, distributed file systems, domain name
services, instant messaging, and peer-to-peer file sharing. DHTs are used by
BitTorrent, Freenet, and [[IPFS]].
== Structure ==
A DHT is made up of several components
* Abstract keyspace
* IE all 160bit strings
* Partitioned across all participating nodes
* Overlay network
* TCP/IP protocol to allow nodes to find each other
* Allows node to query network for any vlaue
=== Insertion ===
Some _filename_ and _data_ exist. A SHA-1 hash is taken of _filename_ and
produces a key, _k_, in the specified keyspace. The message `put(k,data)` is
sent to any node in the network, and is forwarded till the node responsible for
key _k_ is found, and then that node stores the _data_ and _key_.
=== Retrieval ===
A node wants to find some _filename_. They take the SHA-1 hash of _filename_
and produce some key, _k_. `get(k)` is sent to any other node, and the message
is propogated through the network till the node responsible for _k_ is found,
and replies with _data_.
=== Keyspace Partitioning ===

View File

@ -11,6 +11,7 @@ Different ways to store and operate on data, with differing efficiency
* [[queue|Queue]] * [[queue|Queue]]
* [[skip_list|Skip list]] * [[skip_list|Skip list]]
* [[hash_table|Hash Table]] * [[hash_table|Hash Table]]
* [[DHT|Distributed Hash Table]]
== Non sequential Data Structures == == Non sequential Data Structures ==