feature aws lambda durable functions nodejs saga pattern#2961
feature aws lambda durable functions nodejs saga pattern#2961dsiz wants to merge 5 commits intoaws-samples:mainfrom
Conversation
|
Please make sure to use the correct capitalization: It's Lambda durable functions not Lambda Durable Functions |
|
@bfreiberg it is just the title that has Lambda Durable Functions (following similar syntax all across other titles and blogs). The content follows "Lambda durable functions". Let me know if you want me to change the title as well |
…S SAM, code tags, and update bio
|
Modified as per recommendations @bfreiberg |
| try { | ||
| // Step 1: Reserve Flight | ||
| const flight = await context.step('reserveFlight', async () => { | ||
| console.log('Reserving flight...'); |
There was a problem hiding this comment.
Please change all console.log to context.logger (see https://github.com/aws/aws-durable-execution-sdk-js/tree/main)
| } | ||
| }, | ||
| "resources": { | ||
| "bullets": [ |
There was a problem hiding this comment.
Please include a link to the Lambda Durable Execution SDK
| ## How durable functions Enable Saga Pattern | ||
|
|
||
| 1. **State Management**: `context.step()` automatically checkpoints each operation | ||
| 2. **Idempotency**: Steps are executed exactly once, even on retries |
There was a problem hiding this comment.
| 2. **Idempotency**: Steps are executed exactly once, even on retries | |
| 2. **Idempotency**: Completed steps are executed exactly once, even on retries |
|
|
||
| ## How durable functions Enable Saga Pattern | ||
|
|
||
| 1. **State Management**: `context.step()` automatically checkpoints each operation |
There was a problem hiding this comment.
| 1. **State Management**: `context.step()` automatically checkpoints each operation | |
| 1. **State Management**: `context.step()` automatically creates checkpoints when completing the operation |
|
|
||
| - [AWS Lambda durable functions](https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html) | ||
| - [Saga Pattern](https://microservices.io/patterns/data/saga.html) | ||
| - [Distributed Transactions](https://aws.amazon.com/blogs/compute/building-a-serverless-distributed-application-using-a-saga-orchestration-pattern/) |
There was a problem hiding this comment.
Copyright footer is missing
… link, update README text, and add copyright footer
|
@bfreiberg made the suggested changes. |
Issue #, if available:
Description of changes:
aws lambda durable functions nodejs saga pattern
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.