Search code examples
p2pkey-value-storedht

DHT way of storing key value pairs


In P2P networks that DHT is responsible for routing and maintaining the index of the shared data. Can we store multiple values per key in any implementations of P2P Distributed Hash Table? something like:

+________________+
| key | Value    |
|-----|----------+
| k1  | v1,v2,v3 |
|-----|----------|
| k2  | v4,v5,v6 |
|-----|----------|
| ... |   ...    |
+----------------+

For example, when multiple peers provide the same content, the DHT should know there are different providers for that particular content(key)


Solution

  • Yes that is possible. In fact that is the primary function of the bittorrent DHT, associating multiple <IP address, port> tuples with a single key.