Skip to content

Chord DHT: A Distributed Key-Value Store, offering configurable Replication and Consistency guarantees. REST-API, CLI and React+Material UI interfaces. Automated Docker Compose deployment.

License

Notifications You must be signed in to change notification settings

andreasstamos/chordify

Repository files navigation

โœจ Chord DHT: A Distributed Key-Value Store

A highly scalable distributed hash table implementation with built-in replication, designed to exceed modern needs.

Banner

๐Ÿš€ Introduction

Chord DHT is a production-grade implementation of the Chord protocol โ€” a classic, proven approach to creating scalable distributed key/value stores.

๐ŸŒŸ Key Features

  1. ๐ŸŒ€ Chord Protocol

    • Circular key distribution and Finger Table routing.
  2. ๐Ÿ”— Chain Replication

    • Data is replicated, using Chain Replication, across multiple nodes for increased redundancy, and availability.
    • Configurable replication factor and Configurable consistency guarantees (LINEARIZABLE or EVENTUAL)
  3. ๐Ÿ”’ Dynamic Membership Changes

    • Add or remove nodes dynamically.
    • A Distributed Locking Service eliminates race conditions during membership changes (joins/departs).
  4. ๐Ÿณ Docker-Compose Deployment

    • A single command to build and launch the entire environment.
  5. โšก๏ธ Streamlined Administration

    • React + Material-UI Web Dashboard
    • Interactive CLI
    • REST API endpoints

๐Ÿ”ง How It Works

  1. Bootstrap Node: Start the ring with a single node that initially spans the entire key range.
  2. Joining: Additional nodes contact the ring, triggering graceful key redistribution.
  3. Departing: A node transfers its keys to the appropriate node, preserving the ringโ€™s continuity.
  4. Replication: Writes propagate through a replication chain, ensuring data durability. The system ensures the replication factor is kept constant after joins and departs.
  5. Queries/Modifications: Requests are forwarded through finger tables until the responsible node is located. Then the request is propagated along the replication chain.

๐Ÿ Getting Started

โšก Quick Start (Docker Compose)

  1. Build and launch all services:

    docker compose up --build

    This spins up:

    • 5 Physical Chord DHT Nodes, each with a Manager service. (Each node can host dynamically multiple Logical Nodes)
    • The Locking service
    • A React/Material-UI frontend
    • An NGINX service
  2. Open on your desired web broweser:

    https://localhost/

    ๐Ÿ” User Credentials (for Docker local deployment only):

    • Username: testuser
    • Password: 123456

๐ŸŽฎ CLI & Benchmarks

  • Attach to the CLI for interactive control:
    docker compose -p chordify attach cli
  • Run performance benchmarks:
    docker compose -p chordify attach benchmark
  • Run consistency benchmarks:
    docker compose -p chordify attach benchmark_consistency

๐Ÿ’ป Using the CLI

The CLI accepts commands to coordinate nodes and conduct data operations:

  • list-physicals / set-physical <ID>
    Enumerates or selects physical (manager) nodes.
  • list-logicals / set-logical <ID>
    Enumerates or selects chord nodes within the chosen manager.
  • spawn-bootstrap
    Creates a bootstrap node if none exists, specifying consistency model and replication factor.
  • spawn
    Adds a standard chord node to the ring.
  • killall
    Removes all chord nodes under a manager.
  • insert/delete/query <key>
    Performs data manipulations on the ring.
  • depart
    Graceful node departure.
  • overlay
    Displays current ring topology (successors, predecessors, and key ranges).

Use exit to leave the CLI.

๐ŸŒ Using the Frontend

For an even friendlier experience, our React + Material-UI app mirrors all CLI functionality with modern web-based interactions:

  • List & select physical nodes
  • Spawn or depart bootstrap/standard nodes
  • Insert, delete, and query data
  • Overlay for ring structure visualization

๐ŸŽ‰ Thank you for exploring Chord DHT!

ยฉ 2025 Andreas Stamos, Harris Platanos, Spyros Galanopoulos. All rights reserved.

About

Chord DHT: A Distributed Key-Value Store, offering configurable Replication and Consistency guarantees. REST-API, CLI and React+Material UI interfaces. Automated Docker Compose deployment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published