A Workflow Across Four Services
Decide what you would build from the brief alone. Everything below it is available, but the exercise stops working if you open it first.
Placing an order must reserve inventory, charge payment, create a shipment and notify the customer. Four services, four databases. Design the workflow and its failure handling.
Reaching for a distributed transaction — two-phase commit across the four services — because the requirement is stated as all-or-nothing. Even where every participant supports it, the coordinator becomes a single point of failure that holds locks in four databases for the duration of the slowest participant, and the payment provider cannot participate at all. The design reads as stronger consistency and delivers a system that blocks under exactly the conditions it was meant to survive.