0% found this document useful (0 votes)
17 views

distributed transaction patterns.pdf

The document discusses distributed transaction patterns, focusing on ensuring reliability across multiple processes and avoiding partial failures. It presents three common solutions: Request/Reply with Transaction Propagation, JMS with XA Drivers, and JMS with Transaction Propagation, each with specific use cases and complexities. The document concludes by recommending the appropriate solution based on the transaction requirements.

Uploaded by

suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

distributed transaction patterns.pdf

The document discusses distributed transaction patterns, focusing on ensuring reliability across multiple processes and avoiding partial failures. It presents three common solutions: Request/Reply with Transaction Propagation, JMS with XA Drivers, and JMS with Transaction Propagation, each with specific use cases and complexities. The document concludes by recommending the appropriate solution based on the transaction requirements.

Uploaded by

suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Distributed

Transaction Patterns:

Ensuring Reliability Across


Processes

(1/10)
Introduction
Distributed transactions span
multiple processes across different
machines.
Ensuring no partial work is
completed by one process without
the other.
Different solutions are available
based on system requirements.
This presentation explores three
common solutions.

(2/10)
Challenges in Distributed
Transactions
Ensuring atomicity across
distributed processes.
Avoiding partial failures in
interconnected systems.
Balancing reliability,
performance, and complexity.
Solutions depend on
communication methods (e.g.,
HTTP, JMS).

(3/10)
Solution 1 – Request/Reply
with Transaction
Propagation
Use case: HTTP/REST or SOAP web
services
A starts a transaction before calling B.
A propagates the transaction to B via
remote call.
B imports and processes the transaction.
B terminates and returns an extent to A.
A adds the extent and commits/rolls back
the transaction.

Ensures atomicity across processes

(4/10)
Solution 2 – JMS with XA
Drivers
Use case: Reliable asynchronous
messaging with guaranteed delivery
A starts a transaction and sends a JMS
message using XA drivers.
A commits the transaction which triggers
sending.
B receives message, starts transaction.
B processes the message and commits
the transaction.

JMS must be in persistent mode to


avoid message loss.
Delayed processing at B is
acceptable.
(5/10)
Solution 3 – JMS with
Transaction Propagation
Use case: JMS messaging with
transaction propagation
A starts transaction before sending JMS
message.
A propagates the transaction with the
message.
B imports transaction, processes
message, and replies.
A receives the reply, adds it to its
transaction, and commits/rolls back.
Messages can be persistent or non-
persistent.
Use non-XA JMS drivers with AUTO
or EXPLICIT ACKNOWLEDGE.

(6/10)
Comparison of the
Solutions
Request/Reply Use Case:
Propagation HTTP/REST/SOAP Calls
Key Benefit:
Synchronous atomicity
Complexity: Low

JMS with XA Use Case: Guaranteed


Drivers Delivery
Key Benefit:
Reliable async processing
Complexity: Low

(7/10)
Comparison of the
Solutions
JMS with Use Case: Asynchronous
Transaction messaging
Key Benefit:
Propagation
Propagated consistency
Complexity: Medium

(8/10)
Choosing the Right
Solution
Request/Reply: Best for real-
time synchronous transactions.
JMS with XA: Use when
guaranteed delivery is critical.
JMS with Propagation:
Suitable for message-driven
services.

(9/10)
Try for Yourself

All patterns are available in


Atomikos' commercial suite.
Start a free trial and explore
implementation.
Visit Atomikos.com for more
details.

(10/10)

You might also like