3 Phase Commit
Implementation of 3-Phase Atomic Commit
In this project you need to implement the 3-Phase atomic commit
protocol involving a coordinator and a set of participants. You can assume
the following: - Failure of a process can be detected without
error (through some form of timeouts).
- Communication channels are
reliable (implemented using TCP).
- Local disk can serve as a
permanent storage.
- Completely connected communication topology.
In particular, as part of your project you need to implement and
demonstrate through a demo the following features in your 3-PC
- Basic 3-PC protocol functionality, in the absence of failures.
- Timeouts for detecting process failures.
- Timeout actions at various stages of the protocol.
- Termination protocol when decision cannot be made locally.
- Election protocol for electing a new coordinator.
- Correct recovery after an execution in which coordinator and all
participants fail. You will detect the last process(es) to fail and
demonstrate through multiple scenarios the correctness of your protocol
Some implementation details
The participants and coordinator should be associated with a unique id
and communicate with each other using TCP. For detecting the failures
in the system, associate a failure detector with every process which
listens to the periodic heartbeats sent by the other processes. A
configuration file associating every id with its network address (IP,
port) and network address of its failure detector should be available
to every participant and coordinator. When starting a participant it
should be possible to specify the vote (YES or NO) of that
participant. To test the protocol it should be possible to crash
processes and then recover them at appropriate time.
It is very important that you xdesign test cases which simulate the
interesting scenarios and show that your algorithm performs correctly
in those scenarios.
Remember to submit the files as stated on the course webpage.