Distributed systems
Distributed Worker Cluster
A Java RMI cluster that distributes jobs across worker nodes under an elected coordinator.
- Java 17
- Java RMI
- Maven
Overview
This Java RMI project runs jobs across registered worker nodes. Workers elect a coordinator to manage distributed job execution.
Objectives and requirements
- Register worker processes with unique IDs through a bootstrap service and connect each new worker to an active peer.
- Submit concurrent
MAX,PRIMECOUNT, andPRIMESUMjobs from a client GUI, using manual input or CSV files. - Run the bootstrap service on the default RMI port, 1099, or a configured port.
Architecture
The bootstrap service creates the RMI registry and tracks active workers. New workers register with unique IDs and connect to a random active peer. Workers elect a coordinator through flooding and convergecast; a client discovers workers through the bootstrap service and submits jobs to the coordinator. Work is partitioned across workers, then validated partial results are aggregated for the client.
My contributions
My commits and source identify work on the RMI bootstrap service and worker interfaces: registry startup, worker registration and deregistration, peer selection, duplicate-ID checks, and shutdown cleanup.
Technical diagram
A client discovers registered workers through the bootstrap service. Workers elect a coordinator through flooding and convergecast. The coordinator partitions a job, workers compute parts, and an aggregator returns validated results to the client.
View diagram source
flowchart TD
Client[Client GUI] -->|discover workers| Bootstrap[Bootstrap RMI service]
Bootstrap --> WorkerA[Worker node A]
Bootstrap --> WorkerB[Worker node B]
WorkerA <--> WorkerB
WorkerA -->|flooding and convergecast| Election[Coordinator election]
WorkerB -->|flooding and convergecast| Election
Election --> Coordinator[Elected coordinator]
Client --> WorkerA
WorkerA --> Coordinator
Coordinator --> Partitioner[Work partitioner]
Partitioner --> WorkerA
Partitioner --> WorkerB
WorkerA --> Aggregator[Result aggregator]
WorkerB --> Aggregator
Aggregator --> ClientTesting
The README documents mvn test. Test classes cover parsing, compute contracts and engines, work partitioning and aggregation, worker dispatch and term concurrency, and RMI integration. No public test-run result was available to report.