Reserve Before Payment
Medium About 35 min Katabench Pro
Customers are charged for stock that vanished. Reserve inventory first, then hand payment work to a durable queue.
The full brief is part of Katabench Pro
Pro opens this kata's brief and its grader. To see how the track works first, try Cache the Hot Path, which is free with an account.
How it is graded
You build the design on a canvas, and Katabench checks the topology against the challenge's design rules.
What it practices
- Sagas and compensation
- Coordinate multi-step work with compensating actions for every completed step.
- Message queues
- Accept quickly, buffer durably and process asynchronously with background workers.
Related katas
- Refund the Late Payment Hard Pro A payment result arrives 31 seconds after the hold expired. The seat has gone, the money has moved, and support hears about it two days later. Give every result one owner.
- Checkpoint Before Parsing Medium Pro Split unreliable network fetches from CPU-heavy parsing with an immutable page checkpoint and a second durable handoff.
- Count the Clicks Medium Pro Marketing wants click counts, but writing a row during every redirect doubles latency. Stream clicks through a durable queue into a dedicated Click Store, and keep them off the links table.
- Persist Chat Messages Medium Pro Slow message storage blocks socket loops. Publish accepted messages to a durable broker and persist them with redundant writers.