Skip to content

Commit 54048a1

Browse files
committed
docs: add saga flowchart
1 parent 6cadf25 commit 54048a1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

saga/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Wikipedia says
3131

3232
> Long-running transactions (also known as the saga interaction pattern) are computer database transactions that avoid locks on non-local resources, use compensation to handle failures, potentially aggregate smaller ACID transactions (also referred to as atomic transactions), and typically use a coordinator to complete or abort the transaction. In contrast to rollback in ACID transactions, compensation restores the original state, or an equivalent, and is business-specific. For example, the compensating action for making a hotel reservation is canceling that reservation.
3333
34+
Flowchart
35+
36+
![Saga flowchart](./etc/saga-flowchart.png)
37+
3438
## Programmatic Example of Saga Pattern in Java
3539

3640
The Saga design pattern is a sequence of local transactions where each transaction updates data within a single service. It's particularly useful in a microservices architecture where each service has its own database. The Saga pattern ensures data consistency and fault tolerance across services. Here are the key components of the Saga pattern:

saga/etc/saga-flowchart.png

70.5 KB
Loading

0 commit comments

Comments
 (0)