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 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, welldocumented 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:
Client: Accepts a list of numbers and a delay value from the user and sends it to the leader for processing.
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.
Nodes: Each node calculates the sum of its portion of the list, simulating computation time by sleeping for a given duration eg ms to ms then sends the result back to the leader.
More detailed requirements:
points The Leader can be started via a Gradle task; explain how to do this in the README.
points The Client can be started via a Gradle task; explain how to do this in the README.
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.
points Ensure at least Nodes are connected to the Leader.
points If there are fewer than Nodes in the network, the Leader should send an error message to the Client and stop processing.
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: ldots prime delay: ms
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
