You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-11Lines changed: 22 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,43 +6,54 @@ AWS Step Functions is a fully managed Serverless workflow management service for
6
6
7
7
When building cloud-based distributed architectures, one of the questions we need to ask ourselves is how do we maintain data consistency across microservices that have their own database / persistence mechanism? We do not have support for Distributed Transaction Coordinators (DTC) or two-phase commit protocols responsible for coordinating transactions across multiple cloud resources. We need a mechanism coordinate multiple local transactions.
8
8
9
-
## What is the Saga Pattern?
9
+
###What is the Saga pattern?
10
10
11
11
A Saga is a design pattern for dealing with "long-lived transactions" (LLT), published by Garcia-Molina and Salem in 1987. Their original paper can be found here [https://www.cs.cornell.edu/andru/cs711/2002fa/reading/sagas.pdf](https://www.cs.cornell.edu/andru/cs711/2002fa/reading/sagas.pdf).
12
12
13
13
> "LLT is a saga if it can be written as a sequence of transactions that can be interleaved with other transactions." (Garcia-Molina, Salem 1987)
14
14
15
15
Fundamentally it is a failure management pattern, that provides us the means to establish semantic consistency in our distributed applications by providing compensating transactions for every transaction where you have more than one collaborating services or functions.
16
16
17
-
## Why AWS Step Functions?
17
+
###Why AWS Step Functions?
18
18
19
19
AWS Step Functions provide us with a mechanism for dealing with long-lived transactions, by providing us with the ability to build fully managed state machines that:
20
20
21
21
* coordinate the components of distributed applications and microservices
22
22
* allowing us to build our state machines using visual workflows
23
23
* provides us with a way to manage state and deal with failure
24
24
25
-
#Builder Session
25
+
## Sample application
26
26
27
-
## Scenario
27
+
###Scenario
28
28
29
29
You are creating an e-commerce application and are processing an order. This requires you to update order status, process a credit card transaction and update inventory levels. Each state integrates with a different backend with its own local transaction. You need to treat these as a single, distributed transaction.
30
30
31
-

31
+

32
32
33
-
## Learning Objectives
33
+
###Learning objectives
34
34
35
-
In this Builder Session, we will:
35
+
The goal is to demonstrate:
36
36
37
-
*Create a state machine that implements the Saga pattern
37
+
*How to create a state machine that implements the Saga pattern
38
38
* Understand how to use error handling and retry functionality using AWS Step Functions
39
39
* Configure Task states to execute pre-provisioned AWS Lambda functions
40
40
41
-
## Get Started!
41
+
###Get started
42
42
43
43
1. Read the [Setup Information](/docs/setup.md) to deploy the artefacts necessary to complete this session.
44
44
1. Use the [Session Guide](/docs/guide.md) to assist you as you create your saga implementation for the e-commerce application scenario.
45
45
46
-
#License Summary
46
+
## Additional Step Functions resources and reference architectures
47
47
48
-
This sample code is made available under a modified MIT license. See the [LICENSE](LICENSE) file.
48
+
*[GitHub: AWS Step Function Samples](https://github.com/aws-samples/aws-stepfunctions-examples/)
Is there any other way you can think of how to break this problem down? What other features of Step Functions could be employed to implement a saga pattern?
143
+
Is there any other way you can think of how to break this problem down? What other features of Step Functions could be employed to implement a saga pattern?
0 commit comments