Implement the ping coordinator election algorithm and


Objectives

1. Implement the Ping Coordinator Election Algorithm (i.e. Chapter 6, slides 40&41)

2. More experience with socket programming for inter-process communication

Project Specification

1. You are to implement the Ping Coordinator Election Algorithm over sockets. More specifically, your program needs to simulate the following scenarios:

a. Initially, all processes start up and communicate in a ring organization. They should display the messages being passed so that we can observe the process. They should pass a "token" around the ring. You should build delays into the process so that you can clearly demonstrate the working of the algorithm. Processes are numbered. Each process should receive the token at some small, predetermined interval. Make this interval different for each process so that they do not initially all start an election at the same time.

b. When a process does not see the token in the expected interval it will initiate an election. After the system elects a coordinator you will need to demonstrate the following scenario:
i. Manually stop communication by the current coordinator.
ii. An election will be initiated by a process that does not see the token when expected.
iii. The election should proceed according to the ring algorithm given in Chapter 6 (slides 30&31).

c. The crashed process should be brought back up and it should initiate an election.

d. Set the timers so that two elections (by processes 2 & 5) run at the same time and show that they still work.

2. You need to clearly show the communication between processes.

Other Specifications
1. This is an individual project.
2. Your program can be run on any platform that you can provide access to for the TA.
3. Either a console or GUI program is acceptable.
4. Your source code should contain your name and login ID.

Write-up:

Your write-up should include instructions on how to compile and run your program. Ideally it should be complete enough that the TA can test your program without your being there. Your write-up should include any known bugs and limitations in your programs. If you made any assumptions such as limits on the size of a user name you should document what you decided and why? This write-up should be in text format and should be submitted along with your code. If you use code found on the Internet or in a book then the wryftv, must give a reference to the source so we can tell that you did not copy the code from another student.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Implement the ping coordinator election algorithm and
Reference No:- TGS02372498

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)