diff --git a/saga/README.md b/saga/README.md index 47709dd68..d715f026a 100644 --- a/saga/README.md +++ b/saga/README.md @@ -31,6 +31,10 @@ Wikipedia says > 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. +Flowchart + +![Saga flowchart](./etc/saga-flowchart.png) + ## Programmatic Example of Saga Pattern in Java 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: diff --git a/saga/etc/saga-flowchart.png b/saga/etc/saga-flowchart.png new file mode 100644 index 000000000..5bbffc8f2 Binary files /dev/null and b/saga/etc/saga-flowchart.png differ