Skip to content

Repository files navigation

Harmonize

A distributed task processing system built on the Chord DHT (Distributed Hash Table) protocol. This project implements a peer-to-peer network for scalable task distribution, processing, and tracking across multiple nodes.

What It Is

Harmonize is a distributed computing platform that uses the Chord algorithm to organize nodes into a self-managing overlay network. Tasks are distributed across nodes in the network where they are processed and tracked. The system supports task replication, asynchronous processing, and provides REST APIs for task submission and monitoring.

How It Works

The system operates as a distributed P2P network with three main components:

  • Chord Node: A DHT node that stores tasks, processes them using configurable handlers, and communicates with other nodes via RMI
  • Tracking Server: A gRPC-based server that collects task execution statistics and provides real-time monitoring
  • REST Server: A REST API interface for submitting tasks and querying node/task status

Tasks are hashed and distributed to nodes based on the Chord protocol, enabling load balancing and fault tolerance. Each node can handle image processing and other transformations through pluggable task handlers.

How to Set It Up

Prerequisites

  • Java 21 or higher
  • Gradle (included via gradlew)
  • Git

Build the Project

./gradlew clean build

Run a Chord Node

# Start the first (bootstrap) node
java -jar chord-node/build/libs/chord-node-1.0-SNAPSHOT.jar true bootstrap-node

# Start additional nodes (they will join the network)
java -jar chord-node/build/libs/chord-node-1.0-SNAPSHOT.jar true node-2 bootstrap-node
java -jar chord-node/build/libs/chord-node-1.0-SNAPSHOT.jar true node-3 bootstrap-node

Run the Tracking Server

java -jar tracking-server/build/libs/tracking-server-1.0-SNAPSHOT.jar

Run the REST Server

java -jar rest-server/build/libs/rest-server-1.0-SNAPSHOT.jar

Project Structure

  • chord-node: Implements the Chord DHT protocol with task storage, processing, and replication
  • tracking-server: gRPC server for collecting and monitoring task execution statistics
  • rest-server: REST API for task submission and cluster monitoring
  • common: Shared utilities and data structures used across modules

About

A distributed P2P task processing system using the Chord DHT protocol. Submit tasks via REST API, they are processed across a self-organizing network of nodes, and execution statistics are tracked via gRPC. Includes task replication, async processing, and image transformation capabilities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages