Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Implementing Saga Pattern With Lambda Durable Function

DEV Community: lambda·Rishi·3 days ago
#9X3NwnKt
#dev#event#orderid#context#string#article
Reading 0:00
15s threshold

When you hit the “Place Order” button, that event triggers a series of steps, including inventory reservation, payment processing, and shipping initialization. Now, suppose your card is charged by the payment service (Stripe 🤔), but the API call to the third-party shipping service failed. Modern systems don’t live inside a single database anymore. You can’t just rollback everything like a normal database transaction. In this era of distributed services, Saga patterns solve the problem of distributed rollback. What is the Saga Pattern? Saga is a sequence of steps carried out in a workflow. For each successful step, there exists a compensating step. As the saga progresses, these steps are stored in a list. Down the lane, if any step fails, all compensating steps are executed in reverse order. Saga Pattern with AWS Durable Lambda Functions Because of built-in checkpoints and replay mechanisms, AWS Lambda functions are perfect for implementing the saga pattern.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More