| Chord Project |
Article Index for Chord |
Shopping Chord |
Website Links For Chord |
Information AboutChord Project |
|
Chord is being developed at MIT and the current Chord source code can be downloaded and used under the MIT License . OVERVIEW Using the Chord lookup protocol, node keys are arranged in a circle. The circle cannot have more than nodes. The ring can have ids/keys ranging from 0 to . In the above diagram . In the above diagram the green circles represent nodes. The black points represent keys. IDs and keys are assigned an m-bit identifier using what is known as ''consistent hashing''. The SHA-1 algorithm is the base hashing function for Consistent Hashing . The ''consistent hashing'' is integral to the probability of the robustness and performance because both keys and IDs (ip addresses) are uniformly distributed and in the same identifier space. Consistent hashing is also necessary to let nodes join and leave the network without disrupting the network. Each node has a ''successor'' and a ''predecessor''. The ''successor'' to a node or key is the next node in the identifier circle when you move clockwise. The ''predecessor'' of a node or key is the next node in the id circle when you move counter-clockwise. For example, the ''successor'' of node 2 is node 3, and the ''predecessor'' of node 1 is node 0. More than one ''successor'' and ''predecessor'' are kept in a list to maintain a high probability that the successor and predecessor pointers actually point to the correct nodes after possible failure or departure of the initial successor or predecessor. An example of the ''finger table'' of a node is shown above with its pointers to identifiers at intervals around the chord ring stopping at M/2. An example of a query for a key request in the same original network as the previous image with the same finger table and pointers. POTENTIAL USES
PROOF SKETCHES Chord must contact at most O(log N) nodes to find a successor in an N-node network, with high probability Define a node n that has a query for a key k. Suppose node p is the node that the key k maps to in Chord and n p. So node n forwards its query to the closest predecessor of k in its finger table call this node n's ith interval, somewhere between n and p, and call this node in interval i of n, f, and the new distance between f and p is worst case. So continuing this the distance at least halves each time and with in m steps, for m defined in the Overview, the query will have arrived at node p. And because the identifiers are random after 'log N' forwardings the probability will be and the expected number of identifiers in this interval is 1 with high probability so only O(log N) contacts must be made. If Chord keeps track of r = O(log N) predecessors/successors, then with high probability, if each node has probability of 1/4 of failing, find_successor (see below) and find_predecessor (see below) will return the correct nodes Simply with probablility , which is a high probability, the node will have the correct pointer. PSEUDOCODE Definitions for pseudocode:
The pseudocode to find the ''successor'' node of an id is given below:
The pseudocode to stabilize the chord ring/circle after node joins and departures is as follows:
DEVELOPERS Russ Cox, Frank Dabek, Jinyang Li, Frans Kaashoek, David Karger, Robert Morris, Athicha Muthitacharoen, Emil Sit, Ion Stoica, Jeremy Stribling EXTERNAL LINKS
|