The International Arab Journal of Information Technology (IAJIT)

..............................
..............................
..............................


Design and Implementation of a Two-Phase Commit Protocol Simulator Toufik Taibi1, Abdelouahab Abid2, Wei Jiann Lim2, Yeong Fei Chiam2, and Chong Ting Ng2

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] Attaluri G. K. and Salem K., The Presumed- either Two-phase Commit Protocol, IEEE Transactions on Knowledge and Data Engineering , vol. 14, no. 5, pp. 1190-1196, 2002.

[2] Booch G., Jacobson I., and Rumbaugh J., The Unified Modeling Language User Guide , Addison-Wesley, 1998.

[3] Boutros B. S. and Desai B. C., A Two-Phase Commit Protocol and its Performance, in Proceedings of the 7th International Workshop on Database and Expert Systems Applications , pp. 100-105, 1996.

[4] Goldfarb C. and Prescod P., XML Handbook, 5th Edition, Prentice Hall, 2003.

[5] Liu M. L., Agrawal D., and El Abbadi A., The Performance of Two-Phase Commit Protocols in the Presence of Site Failures, in Proceedings of the 24th International Symposium on Fault- Tolerant Computing , pp. 234-243, 1994.

[6] Oberg R., Mastering RMI: Developing Enterprise Applications in Java and EJB , John Wiley & Sons, 2001.

[7] Pitt E. and McNiff K., Java.rmi: The Remote Method Invocation Guide , Addison-Wesley, 2001.

[8] Silberschatz A., Galvin P. V., and Gagne G., Operating Systems Concepts, 6th Edition, John Wiley and Sons, 2001. Toufik Taibi is an associate professor at the College of Information Technology of The United Arab Emirates University, UAE. He holds a BSc, MSc, and PhD in computer science. He has more than 8 years of teaching and research experience in Malaysia. His research interests include formal specification of design patterns, distributed object computing, object-oriented methods, and component-based software development. Abdelouahab Abid is a lecturer at the Faculty of Information Technology of Multimedia University, Malaysia. He holds BSc in mathematics, MSc in IT, and is currently pursuing a PhD in IT at Multimedia University. He has more than 7 years of teaching, research and industry experience including a consultancy work for Telecom Malaysia. His research interests include designing networking protocols and e-commerce applications. Wei Jiann Limwas a BSc student in information technology majoring in software engineering at the Faculty of Information Technology of Multimedia University, Malaysia. Currently, he is working as software developers in different Malaysian companies. Yeong Fei Chiamwas a BSc student in information technology majoring in software engineering at the Faculty of Information Technology of Multimedia University, Malaysia. Currently, he is working as software developers in different Malaysian companies. Design and Implementation of a Two-Phase Commit Protocol Simulator 27 Chong Ting Ngwas a BSc student in information technology majoring in software engineering at the Faculty of Information Technology of Multimedia University, Malaysia. Currently, he is working as software developers in different Malaysian companies.