This project is an attempt at implementing the chord protocol.
This is a distributed hash table. Each server is responsible for a set of keys, whose hash is assigned to the server.
- The main parts of the protocol are implemented: joining to an existing network, stabilizing (setting the right fingers, i.e. pointers to nodes in the network), efficient location of data (in log(n), where n = number of servers in the network)
- Didn't treat nodes leaving the system
It works on Linux Run make You may need to to install some libraries: lssl, lcrypto
To create a new network run ./ServerLauncher <port> To join a existing network ./ServerLauncher <port_of_new_server> <port_of_existing_server>
To connect to a network as a client ./Client 127.0.0.1 <port> Then, you can do the following
- printinfo - to get the information of the current server (address, id in the ring and its finger table)
- insert <key> <value> - to insert in the hash table
- get <key> - to get a pair, if it exists
- delete <key> - to delete a pair, if it exists