Method and system for distributed transaction processing with asynchronous message delivery
First Claim
1. A method of coordinating execution of a distributed transaction on first and second computers connected by a network with asynchronous message delivery, comprising the steps of:
- requesting, by a first application on the first computer, a first resource manager to perform a first operation as part of the distributed transaction;
generating, by the first application, a request message to a second application on the second computer for performing a second operation;
coordinating the first resource manager to carry out the first operation and a first message queue server to send the request message to the second application in a first local committed transaction;
setting a message status for the request message;
delivering the request message to a target queue maintained by a second message queue server of the second computer exactly once and in order;
receiving, by the second application, the request message from the target queue;
coordinating a second resource manager to carry out the second operation and the second message queue server to send a transaction acknowledgment to the first queue server in a second local committed transaction;
delivering the transaction acknowledgment to the first message queue server;
modifying the message status according to the transaction acknowledgment.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system for coordinating distributed transactions provides atomic processing of distributed transactions on computers in a network with asynchronous message delivery. In a distributed transaction, an application on a first computer initiates a first operation and sends a request message for a second operation to a second application on a remote computer. The first operation and the sending of the request message are performed in a local committed transaction on the first computer. The request message is delivered exactly once and in order to the remote computer and is read by the second application. The performance of the second operation and the sending of an acknowledgment to the first application are performed in a local committed transaction by the second computer. The sending computer and the receiving computer of the request message may be on two different message queuing systems bridged by a connector computer which translates a message from one message queuing system and forwards the message to the destination queue in the other message queuing system.
-
Citations
16 Claims
-
1. A method of coordinating execution of a distributed transaction on first and second computers connected by a network with asynchronous message delivery, comprising the steps of:
-
requesting, by a first application on the first computer, a first resource manager to perform a first operation as part of the distributed transaction;
generating, by the first application, a request message to a second application on the second computer for performing a second operation;
coordinating the first resource manager to carry out the first operation and a first message queue server to send the request message to the second application in a first local committed transaction;
setting a message status for the request message;
delivering the request message to a target queue maintained by a second message queue server of the second computer exactly once and in order;
receiving, by the second application, the request message from the target queue;
coordinating a second resource manager to carry out the second operation and the second message queue server to send a transaction acknowledgment to the first queue server in a second local committed transaction;
delivering the transaction acknowledgment to the first message queue server;
modifying the message status according to the transaction acknowledgment. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
sending the request message with a sequence number;
checking, by the second message queue server upon receipt of the request message, the sequence number of the request message;
rejecting the request message when the sequence number of the request message is not in order with a logged number identifying a last delivered message from the first computer;
placing the request message in the target queue when the sequence number of the request message is in order with the logged number;
updating the logged number;
sending a delivery acknowledgment to the first computer.
-
-
4. A computer-readable medium having computer-executable instructions for performing steps recited in claim 3.
-
5. A method as in claim 3, wherein the step of delivering the request message exactly once and in order further includes resending the request message by the first computer upon expiration of a timeout period without receiving a delivery acknowledgment from the second message queue server.
-
6. A method as in claim 1, further including the step of checking the message status by the first application.
-
7. A method as in claim 6, further including the step of undoing the first operation when the transaction acknowledgment is negative.
-
8. A method as in claim 1, wherein the first and second resource managers are database managers and the first and second operations are database update operations.
-
9. A method as in claim 1, further including the step of updating the message status to indicate a failure to receive a transaction acknowledgment from the second computer within a pre-set transaction timeout period.
-
10. A method as in claim 1, wherein the steps of coordinating use a two-phase commit protocol.
-
11. A system for coordinating a distributed transaction which involves a first application on a first computer for executing a first operation and a second application on a second computer for executing a second operation, comprising:
-
a first message queue server on the first computer for sending a request message generated by the first application to the second application for performing the second operation;
a first transaction coordinator on the first computer for coordinating the execution of the first operation and the sending of the request message in a first local committed transaction;
a message queue on the second computer for storing the request message for reading by the second application;
a second message queue server for managing the message queue on the second computer, the second message queue manager cooperating with the first message queue manager for exactly-once in-order delivery of the request message to the message queue; and
a second transaction coordinator on the second computer for coordinating a second local committed transaction which includes performing the second operation and sending an acknowledgment by the second message queue server to the first application. - View Dependent Claims (12, 13, 14, 15, 16)
-
Specification