Logo
Grokking Microservices Design Patterns
Ask Author
Back to course home

0% completed

Saga Pattern: A Example

Understanding the concept is great, but seeing it in action is even better! Let's now illustrate the Saga Pattern using Java. We will create a simple online shopping scenario, involving two services: the Order Service and the Inventory Service. Ready to turn theory into code? Let's go!

Setting the Stage: The Scenario

Picture yourself shopping online. You add items to your cart and proceed to checkout, creating an order. The Inventory Service then checks if the items are available. If yes, it updates the inventory, and the order is completed. If not, the order is cancelled

.....

.....

.....

Like the course? Get enrolled and start learning!