Distributed Systems Project
Budget: $30 – $250 USD
I am seeking an experienced and specialized developer to create a robust gossip server in a distributed system.
Implement a fully distributed gossip algorithm for calculating or discovering (a) the average value in the network, (b) the size of the network, (c) the maximum and minimum values in the network and then some other gossip functions. Use UDP and serialized Java Objects exclusively for network communications. Nodes may only gossip with immediate neighbors (by node number).
Skills and Specifications:
- Proficiency in server-client and distributed systems
- Strong understanding of system architecture
- Expertise in gossip protocol
Responsibilities:
- Develop a distributed system with a primary function as a gossip server
- Implement system scalability capabilities and task distribution
- Regular updates on progress and potential adjustments.
Features of the project:
There is no central control node. All nodes are equal and run from exactly the same code. Node number is determined by an argument passed to the JVM at run time.
You must implement at least two threads at each node, because you must always be ready to accept console input from a user, and also, in the background, perform network gossip calculations. That is, when performing the work of a gossip cycle, your acceptance of console input must remain active. You can have as many threads of execution as you like.
Each node should be started in its own terminal window, so you don't go nuts trying to keep the console output straight. (This is how we will run your system.)
Nodes are started from the command line, and stopped by either Delete, or Kill (see below).
Gossip takes place in Gossip Cycles wherein a viral gossip session takes place, changing values throughout the network, then ends. Once a Gossip Cycle ends, a new one can be triggered from the console of any network node.
Create an object to contain local values at your node (e.g., the stored data value, the currently-known minimum and maximum values, the current average, the current average for calculating size, number of cycles...) and another object to send and receive information from other nodes during a gossip cycle.
One of the more difficult design aspects is that, as is true with all distributed systems, there is no global clock and there is no shared memory space. During a gossip cycle, all nodes might be sending and receiving at the same time, all the time and your algorithm must coordinate everything in a distributed way.
All nodes have a Node ID (0-9), a random, permanent (unless recalculated) local data value (integer, 0-99), a Size value (integer with a default always set to zero at the start of a cycle), an Average Value (changes as this is calculated during a cycle), and a Cycle Number from the beginning of time. Additionally, you can keep many other local values.
We will test the system with up to ten nodes with ID numbers 0-9, assigned by first argument at startup (see below), in any order, with any number of nodes, and any ID numbers. However, you are free to set your system to work with an unlimited number of nodes.
For simplicity, we will test all code on localost only.
The UDP server port numbers used start at 48,100 and are made unique by adding the Node ID number. E.g., for Node7 the server port number will be 48,107. (See the sample code from the Blockchain assignment that gives Java code for this.)
The system is undefined if two nodes are started with the same ID number. This means you can implement whatever behavior you like, including, for example, (a) determining a free Node number using a gossip protocol and using that instead, (b) allowing the system to blow up or act in strange ways, (c) issuing a warning and terminating the process, or (d) any other behavior you prefer.
The local data bucket at each node is assigned a random integer value from 0-99 at startup.
Nodes may only communicate with neighbor nodes with ID numbers that are one greater or one less. For example, Node7 may only communicate with Node6 and Node8.
Use the viral gossip algorithms from Van Steen and Tanenbaum to calculate network size and average network value. Briefly: For average, nodes calculate the average with each neighbor node repeatedly, replacing their current average (both nodes the same). Example Node7 average is 5, Node8 average is 7, after the swap, both have average 6. For size of network, the trigger node starts with 1, all others start with 0. Calculate the average for THIS value (0s and a single 1). Take the reciprocal (e.g., for average of 0.25, 1/0.25 = 4, so network size is 4).
Networks (and partitioned sub-networks) are formed exclusively of nodes with consecutive node IDs.
The whole system may be split into two or more partitions (unconnected sub-networks) either at startup or when nodes are deleted, based entirely on the currently active node IDs (0-9). For example, active nodes 2,3,4,5 would compose a single network. Active nodes 0,2,3,5,6,8,9 would have four partitions into sub-networks, with each acting independently. If we later added node 7 we would have three sub-networks.
Use only UDP/IP datagrams, clients and servers for communication.
Nodes must both send and recieve datagram (UDP) packets to communicate with one another (and, as above, this must not interfere with console input).
Console commands to be implemented:
All responses are printed on the ONE console, or ALL the consoles in the Gossip [sub-]network as indicated. For EACH of the following preceed all other output with The Local Node ID. MAKE YOUR OUTPUT SUCCINCT, ONE LINE (or fewer) per piece of information when possible. At the end of the output, print at least a blank line to make reading the console output easy.
t (Tell us all of the commands available [i.e., that YOU have implmeneted] at the console as a list, one command per line with character trigger, and description, like this list.) LOCAL NODE
l (Display the Local Values at this node: Node Value / Anything else you want. Label each value.) Display on ALL NODES.
p (Set up a "ping" function to check whether there is a neighbor node at the port above and the port below. Display the results on the console, including the node numbers. You may find this useful for implementing other methods. Hint: Boolean methods: IsNodeAbove / IsNodeBelow.) LOCAL NODE.
m (Display the minimum value and maximum value currently in the network, along with the Node ID associated with each of them. You must determine these values with gossip. Note that you have to retrieve these values from the [sub-]netowork each time because the network configuration can change at any moment by starting and stopping nodes.) ALL NODES
a (Calculate the average of all the local values in the [sub-]network. Display on ALL NODES, preceded by Local Node ID and Local Node Value).
z (Calculate the current [sub-]network size. Display on ALL NODES.
v (Create new random values throughout the network at each node. Display the old value and the new value on each node.) ALL NODES.
d (Delete the current node. Fully stop the process. Be sure to gracefully close the socket [this is non-trivial; see HostServer], so that we can restart a node later at the same node ID and port number.) Hint: If you are using a worker thread, you might want to implement this graceful full close by connecting to your own listening port to "wake up" your listener so you can actively close it. LOCAL NODE.
k (Kill the entire network—be careful, you may need nodes to hang around for a while to pass along viral gossip with the kill message!) ALL NODES.
y (Display the number of cycles since the beginning of time on every node in the network. Note that this may not be the same on all consoles if two sub-networks have been joined.) ALL NODES.
N (N is an integer. Set the number of gossip messages for the entire [sub-]network that can be sent to the same neighbor during any one cycle. For example: "15" would limit the messages to 15.) Note that it is possible that when sub-networks have been joined, nodes will have different values of N.
for any further questions please ask.
Implement a fully distributed gossip algorithm for calculating or discovering (a) the average value in the network, (b) the size of the network, (c) the maximum and minimum values in the network and then some other gossip functions. Use UDP and serialized Java Objects exclusively for network communications. Nodes may only gossip with immediate neighbors (by node number).
Skills and Specifications:
- Proficiency in server-client and distributed systems
- Strong understanding of system architecture
- Expertise in gossip protocol
Responsibilities:
- Develop a distributed system with a primary function as a gossip server
- Implement system scalability capabilities and task distribution
- Regular updates on progress and potential adjustments.
Features of the project:
There is no central control node. All nodes are equal and run from exactly the same code. Node number is determined by an argument passed to the JVM at run time.
You must implement at least two threads at each node, because you must always be ready to accept console input from a user, and also, in the background, perform network gossip calculations. That is, when performing the work of a gossip cycle, your acceptance of console input must remain active. You can have as many threads of execution as you like.
Each node should be started in its own terminal window, so you don't go nuts trying to keep the console output straight. (This is how we will run your system.)
Nodes are started from the command line, and stopped by either Delete, or Kill (see below).
Gossip takes place in Gossip Cycles wherein a viral gossip session takes place, changing values throughout the network, then ends. Once a Gossip Cycle ends, a new one can be triggered from the console of any network node.
Create an object to contain local values at your node (e.g., the stored data value, the currently-known minimum and maximum values, the current average, the current average for calculating size, number of cycles...) and another object to send and receive information from other nodes during a gossip cycle.
One of the more difficult design aspects is that, as is true with all distributed systems, there is no global clock and there is no shared memory space. During a gossip cycle, all nodes might be sending and receiving at the same time, all the time and your algorithm must coordinate everything in a distributed way.
All nodes have a Node ID (0-9), a random, permanent (unless recalculated) local data value (integer, 0-99), a Size value (integer with a default always set to zero at the start of a cycle), an Average Value (changes as this is calculated during a cycle), and a Cycle Number from the beginning of time. Additionally, you can keep many other local values.
We will test the system with up to ten nodes with ID numbers 0-9, assigned by first argument at startup (see below), in any order, with any number of nodes, and any ID numbers. However, you are free to set your system to work with an unlimited number of nodes.
For simplicity, we will test all code on localost only.
The UDP server port numbers used start at 48,100 and are made unique by adding the Node ID number. E.g., for Node7 the server port number will be 48,107. (See the sample code from the Blockchain assignment that gives Java code for this.)
The system is undefined if two nodes are started with the same ID number. This means you can implement whatever behavior you like, including, for example, (a) determining a free Node number using a gossip protocol and using that instead, (b) allowing the system to blow up or act in strange ways, (c) issuing a warning and terminating the process, or (d) any other behavior you prefer.
The local data bucket at each node is assigned a random integer value from 0-99 at startup.
Nodes may only communicate with neighbor nodes with ID numbers that are one greater or one less. For example, Node7 may only communicate with Node6 and Node8.
Use the viral gossip algorithms from Van Steen and Tanenbaum to calculate network size and average network value. Briefly: For average, nodes calculate the average with each neighbor node repeatedly, replacing their current average (both nodes the same). Example Node7 average is 5, Node8 average is 7, after the swap, both have average 6. For size of network, the trigger node starts with 1, all others start with 0. Calculate the average for THIS value (0s and a single 1). Take the reciprocal (e.g., for average of 0.25, 1/0.25 = 4, so network size is 4).
Networks (and partitioned sub-networks) are formed exclusively of nodes with consecutive node IDs.
The whole system may be split into two or more partitions (unconnected sub-networks) either at startup or when nodes are deleted, based entirely on the currently active node IDs (0-9). For example, active nodes 2,3,4,5 would compose a single network. Active nodes 0,2,3,5,6,8,9 would have four partitions into sub-networks, with each acting independently. If we later added node 7 we would have three sub-networks.
Use only UDP/IP datagrams, clients and servers for communication.
Nodes must both send and recieve datagram (UDP) packets to communicate with one another (and, as above, this must not interfere with console input).
Console commands to be implemented:
All responses are printed on the ONE console, or ALL the consoles in the Gossip [sub-]network as indicated. For EACH of the following preceed all other output with The Local Node ID. MAKE YOUR OUTPUT SUCCINCT, ONE LINE (or fewer) per piece of information when possible. At the end of the output, print at least a blank line to make reading the console output easy.
t (Tell us all of the commands available [i.e., that YOU have implmeneted] at the console as a list, one command per line with character trigger, and description, like this list.) LOCAL NODE
l (Display the Local Values at this node: Node Value / Anything else you want. Label each value.) Display on ALL NODES.
p (Set up a "ping" function to check whether there is a neighbor node at the port above and the port below. Display the results on the console, including the node numbers. You may find this useful for implementing other methods. Hint: Boolean methods: IsNodeAbove / IsNodeBelow.) LOCAL NODE.
m (Display the minimum value and maximum value currently in the network, along with the Node ID associated with each of them. You must determine these values with gossip. Note that you have to retrieve these values from the [sub-]netowork each time because the network configuration can change at any moment by starting and stopping nodes.) ALL NODES
a (Calculate the average of all the local values in the [sub-]network. Display on ALL NODES, preceded by Local Node ID and Local Node Value).
z (Calculate the current [sub-]network size. Display on ALL NODES.
v (Create new random values throughout the network at each node. Display the old value and the new value on each node.) ALL NODES.
d (Delete the current node. Fully stop the process. Be sure to gracefully close the socket [this is non-trivial; see HostServer], so that we can restart a node later at the same node ID and port number.) Hint: If you are using a worker thread, you might want to implement this graceful full close by connecting to your own listening port to "wake up" your listener so you can actively close it. LOCAL NODE.
k (Kill the entire network—be careful, you may need nodes to hang around for a while to pass along viral gossip with the kill message!) ALL NODES.
y (Display the number of cycles since the beginning of time on every node in the network. Note that this may not be the same on all consoles if two sub-networks have been joined.) ALL NODES.
N (N is an integer. Set the number of gossip messages for the entire [sub-]network that can be sent to the same neighbor during any one cycle. For example: "15" would limit the messages to 15.) Note that it is possible that when sub-networks have been joined, nodes will have different values of N.
for any further questions please ask.
Related categories:
Business, Accounting, Human Resources & Legal
Software Architecture
Distributed Systems