A distributed hash table implemented in C++ 20. Based on MIT CSAIL's Chord Paper.
make
Arguments:
- -p <Number> The port that the Chord client will bind to and listen on. Represented as a base-10 integer. Must be specified.
- --sp <Number> The time in deciseconds between invocations of 'stabilize'. Represented as a base-10 integer. Must be specified, with a value in the range of [1, 600].
- --ffp <Number> The time in deciseconds between invocations of 'fix_fingers'. Represented as a base-10 integer. Must be specified, with a value in the range of [1, 600].
- --cpp <Number> The time in deciseconds between invocations of 'check_predececssor'. Represented as a base-10 integer. Must be specified, with a value in the range of [1, 600].
- --ja <String> The IP address of the machine running a Chord node. The Chord client will join this node’s ring. Represented as an ASCII string (e.g., 128.8.126.63). Must be specified if --jp is specified.
- --jp <String> The port that an existing Chord node is bound to and listening on. The Chord client will join this node’s ring. Represented as a base-10 integer. Must be specified if --ja is specified.
- -r <Number> The number of successors maintained by the Chord client. Represented as a base-10 integer. Must be specified, with a value in the range of [1, 32]
- -i = The identifier (ID) assigned to the Chord client which will override the ID computed by the truncated SHA1 sum of the client’s IP address and port number. Represented as a base-10 integer. Optional parameter.
Create a Chord Ring:
chord -p 4170 --sp 5 --ffp 6 --cpp 7 -r 4
Join an existing Chord Ring:
chord -p 4171 --ja 128.8.126.63 --jp 4170 --sp 5 --ffp 6 --cpp 7 -r 4