My understanding of a distributed hash table is that every node can be identified uniquely by a nodeId and can store information, like host, port and values. Every node stores other nodeIds in (a) lookup table(s) and finding another node can be made as efficient as log(n) with system size n. In order to retrieve the value from a node, one would need a key. Is the key for a value just the nodeId (i.e. a content identifier or hash of the value)? If so, then every node can only save one value? Or can a nodeId store multiple key-values, in which case the question arises how to retrieve a value without knowing which node contains which keys.
What is the relation between a nodeId and a key in distributed hash tables?
173 Views Asked by Marlo At
1
There are 1 best solutions below
Related Questions in KEY-VALUE
- Angular - show key match with value
- How can I perform search on a lookup table without loading it in memory?
- Does Consul persist the Key Value store?
- functioning of (== ) in terms of hashCode
- How to update one element of an array according to a condition on another element?
- How to parse multi line value from config file
- Search for key in Map when the values are in ArrayList
- Pyspark Array Key,Value
- Join master table's data to a key/value table data in one SELECT
- How to push an object into an array which is the value in a key/value pair in php
- Matching JSON keys to class fields inexactly
- C++, How to use maps for holding multiple integer values
- Add a new list item to a Key value database
- Cassandra is Column oriented or key value store?
- Updating Hash value in Ruby
Related Questions in DISTRIBUTED-SYSTEM
- Is curator's persistent ephemeral nodes just regular ephemeral with retries?
- Sequential Consistency in Distributed Systems
- Elastic Search: how to move a primary shard?
- Hbase: Understanding difference between smallCompactions and largeCompactions under majorCompaction
- Mnesia - Replicate ram_copy table to disc_only_copy table from another node
- Logical Clocks: Lamport Timestamps
- Lamport’s (Physical) Clock Synchronization Algorithm
- distributed database replication design: efficient network transfer
- Use SimPy to simulate Chord distributed system
- How CreateEntity PDU works?
- How to automatically update server and client side in java
- Distributed database use cases
- Pass map, slice over channel and over network?
- Creating a distributed memory service in Scala
- What is the biggest Couchbase cluster nodes number?
Related Questions in KEY-VALUE-STORE
- Boltdb-key-Value Data Store purely in Go
- Using hashes as IDs in key-value stores
- How can I perform search on a lookup table without loading it in memory?
- troubleshooting python keyerror printing random values from dictionaries with list of values
- Aerospike Key-value Store using Go-client
- Optimize duplicate values in NoSql key-value storage
- Shopping carts in Redis
- Add a new list item to a Key value database
- Use of a key value store for keeping indexes of rdbms
- discovering the biggest value in a dictionary
- Regarding a data structure for O(1) get on prefixes
- HashMap keeps returning null value for no obvious reason
- Check Values of A Dictionary for Repeating Numbers
- Swap two random values in dictionary
- A fast local BLOB storage
Related Questions in DHT
- Implementing find node on torrent kademlia routing table
- Can applications coexist within the same DHT?
- How to find nodes with exact info_hash in Bittorrent DHT?
- How does a bittorent peer accquires info dictionary when magnet URI is provided?
- the make.sh for fastdht not work.When running it shows "nm: /usr/lib/libc_r.so:no such file"
- Consistent Hashing: what about rehashing?
- How does DHT torrent indexing sites scrape infoHashes efficiently?
- 'dht' does not name a type
- Similar to hash values but something that returns an int
- Chord protocol. Distribuited Hash Table (DHT). Peer to peer. (P2P)
- Algorithms for building a peer to peer search engine with distributed database
- Order-keeping queues that can be paused
- IPFS not announcing CIDs on indirect peers and unable to get through cmd as CID is not propagated using DHT
- Libtorrent Logging through python bindings, possible?
- DHT routing library for Java
Related Questions in KADEMLIA
- Implementing find node on torrent kademlia routing table
- Can applications coexist within the same DHT?
- How to implement Kademlia DHT
- Why does raw_input not prompt correctly?
- Crawl DHT of a private network from outside
- Better understanding Kademlia's XOR Integer Metric
- How Distributed Hash Table in IPFS and Bittorrent prevent abuse?
- How to update entries in a DHT
- BitTorrent, DHT, BEP42, Calculating my NodeId
- DHT InfoHash Lookup sequence. PeerID vs InfoHash
- How does the routing table work in mainline dht?
- receiving unreadable text while trying to bencode a "find_node" query
- What is the relation between a nodeId and a key in distributed hash tables?
- How can one find the value for a given a key in kademlia?
- Bucket splitting exception in Kademlia
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are two general approaches for building distributed hash tables: distribute keys to nodes based on key values or based on hashes of keys. There are pros and cons for either option.
In either way, we will need to find a nodeId for a given key. A naive implementation could use modulus operation to find a target node. The problem with this approach is that when we do change number of nodes, then we have to remap absolutely every key - this is slow.
Let's say we have 4 nodes and the key is 10. 10 mod 4 is 2 an we will pick node #2 to store the data.
If you do need to handle node addition/removal efficiently, the common approach is called Consistent Hashing - that works similar to what you have described - we have multiple key (or hashes of key) intervals and assign many of those intervals to nodes - we require number of this intervals to be much larger than number of nodes. Hence if we add or remove a node, only some of those intervals need to be remapped to other nodes.