Question: Please help with my Java code! Distributed Algorithm ( 8 0 points ) This project is intended to give you a taste of building a

Please help with my Java code!
Distributed Algorithm (80 points)
This project is intended to give you a taste of building a simple distributed algorithm that distributes computation across multiple nodes. It includes a basic consensus algorithm to verify results. The focus here is on robustness and a clean, well-documented implementation rather than security.
Requirements
In this section, partial credit is available if some requirements are met. Clear documentation and a functional demo are essential for partial credit. We cannot award points if we cannot run your project.
The system should consist of:
1. Client: Accepts a list of numbers and a delay value from the user and sends it to the leader for processing.
2. Leader: Divides the list into smaller portions, sends each portion to a different node, waits for results, and combines these to get the final sum. The leader also performs a simple consensus to verify results.
3. Nodes: Each node calculates the sum of its portion of the list, simulating computation time by sleeping for a given duration (e.g.,100 ms to 500 ms ), then sends the result back to the leader.
More detailed requirements:
1.(3 points) The Leader can be started via a Gradle task; explain how to do this in the README.
2.(3 points) The Client can be started via a Gradle task; explain how to do this in the README.
3.(3 points) Each Node can be started via a Gradle task; explain how to do this in the README. Important: there should be only one 'Node.java' class, with all nodes in the system being instances of this single class.
4.(3 points) Ensure at least 3 Nodes are connected to the Leader.
5.(3 points) If there are fewer than 3 Nodes in the network, the Leader should send an error message to the Client and stop processing.
6.(3 points) Client Input: The client should ask the user to input a list of numbers and a delay time, which it then sends to the leader. Example list: '\([1,2,3,4,5,\ldots \),\(15]^{\prime}\), delay: 50 ms .
Please help with my Java code! Distributed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!