Abstract:
The purpose of this research was to simulate two phase commit protocol connectivity based clustering algorithm for overcoming distributed transaction failure. The important issue in transaction management is that if a database was in a consistent state prior to the initiation of a transaction, then the database should return to a consistent state after the transaction is completed. This should be done irrespective of the fact that transactions were successfully executed simultaneously or there were failures during execution. The research objectives were: To analyze the distributed transaction failures in two-phase commit protocol; to simulate a transaction clustering algorithm for overcoming distributed transactions failure in two phase commit protocol; and to compare the performance of the transaction clustering algorithm with the current two phase commit protocol. The experimental research design was adopted as it involved the practical design of the transaction clustering algorithm. This algorithm was simulated in Jcreator, with mySQL acting as the backend data manager. The data was collected using Java Integrated Development Environment, which was Jcreator, with Bitronix transaction manager providing the required management of distributed transactions. It was then analyzed using the same software. The results obtained indicated that by using a clustering algorithm, the transaction failures associated with the current Two-Phase Commit can be reduced. This was achieved by eliminating transaction partitioning that is an inherent feature of the current two phase commit protocol. In a partitioned environment, blocking caused by the failure of the coordinator when participants are in uncertain state is a common problem. Instead, all sub-transactions were clustered in a single sub-class and used the principle of inheritance to obtain variables and methods from the main super-class, which was the coordinator. The transaction manager was then employed to coordinate the execution activities of the coordinator. Transaction commit or transaction roll back was then reported by the transaction manager. In so doing, all the transactions in the sub-class either commit in their entirety or fail in their entirety which is in line with the principles of a Two-Phase Commit protocol.