8000 GitHub - MartinKlapacz/Chord-Network
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MartinKlapacz/Chord-Network

Repository files navigation

Chord Implementation in Rust

This implementation is based on the Chord protocol introduced in the paper by Stoica et al. A Chord network is a type of distributed hash table (DHT) that uses consistent hashing to distribute keys across a peer-to-peer network. It provides efficient methods for key-based lookup and data storage, enabling fault-tolerant and scalable systems. Take a look at the documentation for more details on the implementation and its features.

Installation

  1. Install Rust according to the Rust documentation: curl --proto ’=https’ --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Install the Protobuf compiler: sudo apt install -y protobuf-compiler

Running a Cluster

Running an instance requires a node config. The config folder contains example configs.

Start a new Chord cluster by running:

cargo run --package chord --bin chord -- -c configs/config1.ini

Let more Chord nodes join the cluster by running the following commands:

cargo run --package chord --bin chord -- -c configs/config2.ini

cargo run --package chord --bin chord -- -c configs/config3.ini

cargo run --package chord --bin chord -- -c configs/config4.ini

Client

This project also contains python client applications. Use the following commands to set and get key-value-pairs on the node running on address (-a) 127.0.0.1 and port (-p) 5501:

python3 dht_client.py -a 127.0.0.1 -p 5501 -s -k hello -d world

python3 dht_client.py -a 127.0.0.1 -p 5501 -g -k hello

Live Instances

A cluster consisting of the following nodes is running in my cloud:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0