Design and Implementaion of A Two-Phase Commit Protocol Simulator

The Two-Phase Commit Protocol (2PC) is a set of rules, which guarantee that every single transaction in a distributed system is executed to its completion or none of its operations is performed. To show the effectiveness of 2PC, a generic simulator is designed and implemented to demonstrate how transactions are committed in a safe manner, and how data consistency is maintained in a distributed system with concurrent execution of randomly generated transactions. Several possible failure cases are identified and created in the system to test its integrity, thus showing how well it responds to different failure scenarios, recovers from these failures, and maintains data consistency and integrity. The simulator was developed using Java Remote Method Invocation (RMI), which is particularly powerful in developing networking systems of such scale, as it provides easy remote method calls without the need to handle low-level socket connection.

[1]  Bipin C. Desai,et al.  A two-phase commit protocol and its performance , 1996, Proceedings of 7th International Conference and Workshop on Database and Expert Systems Applications: DEXA 96.

[2]  Kenneth Salem,et al.  The Presumed-Either Two-Phase Commit Protocol , 2002, IEEE Trans. Knowl. Data Eng..

[3]  Esmond Pitt,et al.  java.rmi: The Remote Method Invocation Guide , 2001 .

[4]  Divyakant Agrawal,et al.  The Performance of Two Phase Commit Protocols in the Presence of Site Failures , 1994, Proceedings of IEEE 24th International Symposium on Fault- Tolerant Computing.

[5]  Rickard Oberg,et al.  Mastering RMI: Developing Enterprise Applications in Java and EJB , 2001 .

[6]  Divyakant Agrawal,et al.  The performance of two-phase commit protocols in the presence of site failures , 1994, Proceedings of IEEE 24th International Symposium on Fault- Tolerant Computing.

[7]  Ivar Jacobson,et al.  The Unified Modeling Language User Guide , 1998, J. Database Manag..