This project implements a Distributed Hash Table (DHT) using the Chord protocol. It supports insert, query, and delete operations across a distributed network of nodes. Additionally, the system supports replication with configurable consistency levels (linearizability and eventual consistency).
- Chord-based DHT: Implements a structured peer-to-peer lookup mechanism.
- Replication: Supports configurable replication (
kreplicas) for fault tolerance. - Consistency Models:
- Linearizability: Ensures strict consistency but may be slower.
- Eventual Consistency: Faster writes but eventual correctness.
- Node Join & Departure: Dynamically add or remove nodes.
- Parallel Execution: Supports batch insert and query operations.
The bootstrap node initializes the Chord ring and helps new nodes join.
Each node stores key-value pairs and routes queries using the Chord algorithm.
A CLI-based client for interacting with the DHT.
Ensure you have:
- Python 3.10+
- Bash (for scripts)
git clone <your-repo-url>
cd distributed_systemspython3 server/bootstrap.py <bootstrap_ip> <bootstrap_port> <replication_factor> <consistency_model>Run the following script to start nodes across multiple VMs:
python3 server/node.py <node_ip> <node_port> <replication_factor> <consistency_model> <bootstrap_ip> <bootstrap_port> To insert keys into the DHT:
./experiments/output/team_29/insert_songs.shTo query keys from the DHT:
./experiments/output/team_29/query_songs.shTo execute batch requests from a file (insert/query operations):
./experiments/output/team_29/process_requests.sh