Application to implement an 2 Phase Commit Protocol Distributed system
Run coordinator.py, participant1.py, participant2.py, participant3.py in any order in three different terminal consoles to observe a simple implementation of 2 Phase Commit Protocol
- Coordinator and all three participants are running
- Coordinator sends request and all three participants respond with an "ack"
- Coordinator, within 5 seconds of receiving the "ack" from all three participants will send out a message request
- One or more participants are down
- Coordinator sends request not all participants respond with an "ack"
- Coordinator retries every 5 seconds until all three participants return on-line and respond with an "ack"
- All three participants are running but the Coordinator is down
- Participants receive a request from Coordinator before it went down but do not receive a message request within 10 seconds since responding with an "ack"
- Participants assume Coordinator is down and wait for the next request
- Once back up, the Coordinator will retrieve the last successful message from the logs and retry sending the same to the Participants