Distributed Task Submission System

Overview

This project is a distributed system designed to receive and process computational tasks across a Chord-based Distributed Hash Table (DHT). The aim was to develop a scalable and fault-tolerant solution capable of receiving, distributing and asynchronously processing tasks across multiple nodes in a Chord-based DHT with support for result retrieval. Built using Java, it integrates three main technologies: a custom REST server for user interaction, Java RMI for distributed remote communication and a Chord DHT to provide a decentralised, efficient task management system.

Disclaimer

This project focused primarily on the system’s backend functionality—including distributed communication, fault tolerance, and RESTful interaction. As a result, the user interface is intentionally minimal and the included tasks are basic intended to demonstrate system functionality. Both the UI and task complexity can be easily extended in future iterations.

Demo

System Components

REST

The custom REST server serves as the main user-facing component, acting as an interface between the user’s web browser and the Chord DHT. The server handles HTTP GET and POST requests, mapping them to functions that communicate with Chord nodes via Java RMI. It allows users to submit, view all submitted tasks along with their types and processing statuses and then once executed retrieve results once tasks are completed.

Java RMI

RMI enables communication between the REST server and the Chord nodes, as well as among the nodes themselves within the ring. It allows remote method invocation across hosts which enables the system to operate as a distributed system. RMI is also used for node discovery, task forwarding and maintaining the dynamic topology of the Chord ring.

Chord Node Based Distributed Hash Table

The Chord DHT provides a decentralised and efficient mechanism for storing and managing tasks across multiple nodes. Tasks are assigned to nodes based on a consistent hashing algorithm applied to the task name, ensuring balanced distribution. Each node in the ring is responsible for storing and processing the tasks mapped to its key space.

To improve fault tolerance, passive replication is implemented: when a task is stored on a node, a replica is also stored on its immediate successor which allows the system to recover tasks in the event of a node failure. Implementing the Chord protocol, nodes maintain the ring topology dynamically by updating their finger tables and successor/predecessor links to handle node joins, intended shutdowns or failures which ensures scalability and fault tolerance.

System Workflow

  1. Task Submission: The user submits a task via the REST interface. The REST server locates a Chord node and verifies that it is active/alive by querying the RMI registry.
  2. Task Distribution via Hashing: The selected node hashes the task name and uses a findSuccessor() function to route the task to the appropriate node in the ring.
  3. Asynchronous Execution: The node spawns a new thread to handle task execution without blocking the system. Task results are then stored locally on the node.
  4. Passive Replication: A replica of the task is stored on the node’s immediate successor to improve fault tolerance in case the original node fails or becomes unavailable.
  5. Task Listing and Result Retrieval: Users can list all submitted tasks and their processing statuses via the REST server; this involves collecting data from each node in the Chord ring and returning the completed list. Clicking on a completed task retrieves and displays its results from the relevant Chord node in XML format. If the primary node is unavailable, the system uses the replica to retrieve the result.

Conclusion

This project successfully demonstrates the design and implementation of a distributed computational task management system using Java RMI, a custom REST interface, and a Chord-based Distributed Hash Table. By leveraging consistent hashing, passive replication, and asynchronous task execution, the system achieves fault tolerance, scalability, and decentralised operation. Tasks can be submitted, routed, processed, and retrieved efficiently across multiple nodes even in the presence of node failures. This project deepened my understanding of distributed systems principles.