The Scenario
When a user clicks "Buy", 4 things must happen: 1. Deduct Inventory, 2. Charge Credit Card, 3. Generate Shipping Label, 4. Send Confirmation Email. If step 2 fails, step 1 must be reversed.
The Brief
Design an Event-Driven Architecture (EDA) to handle this checkout flow across 4 independent microservices. Explain how you will handle failures and rollbacks using the Saga pattern (Choreography or Orchestration).
Deliverables
- An architectural diagram showing the event broker (e.g., Kafka or RabbitMQ) and the message topics
- A detailed explanation of the "Compensating Transaction" if the credit card is declined after inventory was deducted
- A defense of your choice between Event Choreography (decentralized) vs. Orchestration (central controller)
Submission Guidance
This is an advanced distributed systems problem. You cannot use a standard SQL database transaction (`BEGIN...COMMIT`) because the data lives in different microservices.
Submit Your Work
Your submission is graded against the rubric on the right. If you pass, you get a public Badge URL you can share on LinkedIn. There is no draft save, so work offline first and paste your finished response here.