All Projects → aws-samples → aws-step-functions-long-lived-transactions

aws-samples / aws-step-functions-long-lived-transactions

Licence: MIT-0 license
Deal with the complexities of dealing with a long lived transaction across distributed components in your microservices architecture using AWS Step Functions.

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to aws-step-functions-long-lived-transactions

aws-step-functions-plagiarism-demo-dotnetcore
A simple workflow for developing AWS Step Functions to demonstrate how you can combine AWS Step Functions with AWS Lambda using .NET 6 and the Serverless Application Model (SAM), and expose your workflow via an API Gateway!
Stars: ✭ 58 (-46.79%)
Mutual labels:  aws-serverless, aws-step-functions
aws-serverless-using-aws-cdk
This repository provides the basic patterns of AWS Serverless using AWS CDK.
Stars: ✭ 40 (-63.3%)
Mutual labels:  aws-serverless
workflow-manager
Minimal Workflow orchestrator for AWS Step Functions
Stars: ✭ 20 (-81.65%)
Mutual labels:  aws-step-functions
terraform-aws-step-functions
Terraform module which creates Step Functions on AWS 🇺🇦
Stars: ✭ 29 (-73.39%)
Mutual labels:  aws-step-functions
Trapheus
This tool automates restoration of RDS database instances from snapshots into any dev, staging or production environments. It supports individual RDS Snapshot as well as cluster snapshot restore operations.
Stars: ✭ 68 (-37.61%)
Mutual labels:  aws-step-functions
grabbit
A lightweight transactional message bus on top of RabbitMQ
Stars: ✭ 87 (-20.18%)
Mutual labels:  saga-pattern
saga-pattern-nodejs-aws
An implementation of Saga pattern for distributed transactions with NodeJS and AWS
Stars: ✭ 34 (-68.81%)
Mutual labels:  saga-pattern
microservices-transactions
Choreography-based sagas to maintain data consistency in a microservice architecture.
Stars: ✭ 20 (-81.65%)
Mutual labels:  saga-pattern
Serverless Express
Run Node.js web applications and APIs using existing application frameworks on AWS #serverless technologies such as Lambda, API Gateway, Lambda@Edge, and ALB.
Stars: ✭ 4,265 (+3812.84%)
Mutual labels:  aws-serverless
SyntheticSun
SyntheticSun is a defense-in-depth security automation and monitoring framework which utilizes threat intelligence, machine learning, managed AWS security services and, serverless technologies to continuously prevent, detect and respond to threats.
Stars: ✭ 49 (-55.05%)
Mutual labels:  aws-serverless
OpenSleigh
OpenSleigh is a Saga management library for .NET Core.
Stars: ✭ 198 (+81.65%)
Mutual labels:  saga-pattern
Saga
Saga pattern implementation in Kotlin build in top of Kotlin's Coroutines.
Stars: ✭ 24 (-77.98%)
Mutual labels:  saga-pattern
amazon-eventbridge-cdk-audit-service-sample
Sample of a decoupled audit service using Amazon EventBridge and AWS Step Functions. Provisioned with AWS CDK.
Stars: ✭ 25 (-77.06%)
Mutual labels:  aws-step-functions
aws-step-functions-twitch-series
Code from the AWS Step Functions series on Twitch, where we take a deep dive into one of my favorite serverless services!
Stars: ✭ 43 (-60.55%)
Mutual labels:  aws-step-functions
asl-validator
A simple Amazon States Language validator based on JSON schemas.
Stars: ✭ 66 (-39.45%)
Mutual labels:  aws-step-functions

Managing Long Lived Transactions with AWS Step Functions

AWS Step Functions is a fully managed Serverless workflow management service for managing long running processes and coordinating the components of distributed applications and microservices using visual workflows. But did you know it can also help you deal with the complexities of dealing with a long lived transaction across distributed components in your microservices architecture? In this Builder session, you will learn how AWS Step Function can help us implement the Saga design pattern.

What problems are we trying to solve?

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.

What is the Saga pattern?

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.

“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)

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.

Why AWS Step Functions?

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:

  • coordinate the components of distributed applications and microservices
  • allowing us to build our state machines using visual workflows
  • provides us with a way to manage state and deal with failure

Sample application

Scenario

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.

Saga with Step Functions

Learning objectives

The goal is to demonstrate:

  • How to create a state machine that implements the Saga pattern
  • Understand how to use error handling and retry functionality using AWS Step Functions
  • Configure Task states to execute pre-provisioned AWS Lambda functions

Get started

  1. Read the Setup Information to deploy the artefacts necessary to complete this session.
  2. Use the Session Guide to assist you as you create your saga implementation for the e-commerce application scenario.

Additional Step Functions resources and reference architectures


License Summary

This sample code is made available under a modified MIT license. See the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].