Add Saga Pattern and Human in the Loop Implementation with Lambda durable functions and CDK#2939
Open
tafaman wants to merge 3 commits intoaws-samples:mainfrom
Open
Add Saga Pattern and Human in the Loop Implementation with Lambda durable functions and CDK#2939tafaman wants to merge 3 commits intoaws-samples:mainfrom
tafaman wants to merge 3 commits intoaws-samples:mainfrom
Conversation
…mentation for distributed transactions. New features include: - travel booking system coordinating flight, hotel, and car reservations - saga orchestrator Lambda function with automatic compensating transactions - individual service functions for flight, hotel, and car reservations with cancellation
Author
|
Added Human in the loop Durable functions pattern for node.js |
…ect captilization. from Lambda Durable Functions to Lambda durable functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces two production-ready workflow patterns using AWS Lambda durable functions, demonstrating the power and flexibility of durable execution for complex serverless workflows.
Patterns Included
Saga Pattern (Python)- Distributed Transaction Coordination
A complete implementation of the Saga pattern for distributed transactions, demonstrating coordinated travel bookings (flight, hotel, car) with automatic compensating transactions on failure.
Human-in-the-Loop (Node.js) - Approval Workflows
A secure approval workflow pattern integrating human decision-making into serverless processes, using a realistic document submission and approval scenario.
Pattern 1: Saga Pattern
What It Does
Coordinates distributed transactions across multiple services with automatic rollback on failure. Uses a travel booking scenario where flight, hotel, and car reservations must all succeed or all be cancelled.
Key Features
Infrastructure (CDK)
Pattern 2: Saga Pattern
Integrates human approval processes into serverless workflows. Demonstrates document submission (expense reports) requiring manager approval via email, with secure callback mechanism and automatic timeout handling.
Infrastrcuture (CDK)
Workflow Steps