Book Image

Infinispan data grid platform definitive guide

Book Image

Infinispan data grid platform definitive guide

Overview of this book

Table of Contents (20 chapters)
Infinispan Data Grid Platform Definitive Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Transaction recovery


Although XA transactions possess the ACID characteristics in order to guarantee the atomicity of operations, our system must be able to handle failures in order to guarantee the consistency of customer data, which can occur at any time due to unexpected server crash or network loss.

To guarantee transaction consistency, Infinispan supports transaction recovery, a well known feature of XA transactions, present in the specification published by the Open Group.

Let's suppose a situation where a customer buys from Ticket Monster, a ticket for a specific show, but we have to save the ticket in two different nodes in Infinispan. The Transaction Manager will be responsible for communicating with both resources that are in use.

When the transaction manager commits, in phase one, the transaction manager asks both resources to prepare the commit. Then both resources verifies they can persist the data and each resource sends an acknowledgement to the coordinator. In the second phase...