“election in a ring” mechanism, for a number of processes to elect a coordinator by communicating over UDP/IP protocols
$10-30 USD
Cerrado
Publicado hace alrededor de 9 años
$10-30 USD
Pagado a la entrega
proof-of-concept prototype of the “election in a ring” mechanism for a number of processes to elect a coordinator by communicating over UDP/IP protocols:
These processes are distributed, but there could be computers hosting more than one process.
A process will listen a port for incoming ELECTION or COORDINATOR messages send over UDP/IP.
You are free to devise and use your own approach to start these processes, to let a process learn about the others, to make a process realize that there is no coordinator currently ... in short, to carry out each of the test cases given below without modifying or recompiling the source codes.
You can assume that the network is reliable.
Logs:
A process should send the following log messages to the standard output:
[Process <id> is started at <time>]
[Process <id> initiates and sends the ELECTION msg at <time>]
[Process <id> forwards the ELECTION msg to the next at <time>]
[Process <id> ends the ELECTION msg at <time>]
[Process <id> initiates and sends the COORDINATOR=<coordinator id> msg at <time>]
[Process <id> forwards the COORDINATOR=<coordinator id> msg to the next at <time>]
[Process <id> ends the COORDINATOR=<coordinator id> msg at <time>]
Test results
You are expected to prepare and run on Inek computers one repeatable test for each of the cases below:
Case-1: Two processes are started. One of them realizes that there is no coordinator currently and initiates an election.
A coordinator is elected and announced at the end.
Case-2: Four processes are started. One of them realizes that there is no coordinator currently and initiates an
election. A coordinator is elected and announced at the end.
Case-3: Four processes are started. Two of them (more or less) concurrently realize that there is no coordinator
currently and initiate an election. A coordinator is elected and announced at the end.
Per test, you should clearly specify the shell scripts and configuration files to repeat the test, give the log messages
produced, indicate whether the test has succeeded or failed considering the expected behaviour and also explain your
results.
You are expected to submit a zipped directory containing the files described below:
A. Source files
You need to submit the well-commented source files defining your process.
You are free to write your code in any language provided that your solution properly compiles and run
B. Scripts and configuration files
You will submit the following scripts:
compile to compile your source files;
All other scripts and configuration files, if any, needed to run the test cases listed in the test part.