This is the Golang implementation of chord with ability to cope with dynamic changes in the network.
Below shows the steps of using this repository to build and use as a distributed key-value store.
- Build the project using
go build
- Move the executable file (dht) and configs.yaml to relevant nodes in the cluster
- Update configurations if required
- Run the executable file
A testing client is implemented and can be found in tester directory to test distributed key-value store functionality. Follow the steps mentioned below to execute tester.
cd tester/store
go build -o store-tester
- Move this executable file to a node in the cluster
./store-tester <HTTP_method_type> <host:port> <number_of_requests>
Note: HTTP method type should either be GET or PUT
A separate client is implemented to test network's resilience for dynamic changes in the structure such as joining, leaving or crashing of nodes. Below steps should be followed for the execution of this tester.
cd tester/stability
go build -o stab-tester
- Move this executable file to a node in the cluster
- Add a text file with corresponding nodes (a sample file is provided) and name it as started_nodes.txt
./stab-tester <join/crash> <number_of_nodes to join or crash>
Note: HTTP method type should either be GET or PUT
Shell scripts can be found in scripts/cluster
folder for initialization of cluster, joining
and leaving of nodes.
A logger library is integrated for debugging purposes with following
hierarchical log levels. Required level can be enabled via log_level
in configs.yaml
by setting the relevant value.
ERROR
INFO
DEBUG
TRACE
- Implementation of finger tables