From c74fc01d2eeaff12cc9e7b2ed7d0c1a7ebb45887 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Mon, 25 Apr 2022 12:30:01 -0400 Subject: [PATCH] Update for 25-04-22 12:30 --- tech/DHT.wiki | 38 ++++++++++++++++++++++++++++++++++++++ tech/algorithms.wiki | 1 + 2 files changed, 39 insertions(+) create mode 100644 tech/DHT.wiki diff --git a/tech/DHT.wiki b/tech/DHT.wiki new file mode 100644 index 0000000..b48c0f6 --- /dev/null +++ b/tech/DHT.wiki @@ -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 === diff --git a/tech/algorithms.wiki b/tech/algorithms.wiki index 5d6a673..84b8691 100644 --- a/tech/algorithms.wiki +++ b/tech/algorithms.wiki @@ -11,6 +11,7 @@ Different ways to store and operate on data, with differing efficiency * [[queue|Queue]] * [[skip_list|Skip list]] * [[hash_table|Hash Table]] +* [[DHT|Distributed Hash Table]] == Non sequential Data Structures ==