Commit State and Outbox Together
Hard About 40 min Katabench Pro
A posting service saves its balance and publishes facts as separate operations. Replace the dual write with one optimistic commit capability that owns state and outbox intent atomically.
The full brief is part of Katabench Pro
Pro opens this kata's brief, its starter code and its grader. To see how the track works first, try Break the Checkout Cycle, which is free.
How it is graded
You work across multiple files, and architecture rules turn the design boundaries into executable feedback.
What it practices
- Transactional outbox
- Commit state and the messages it implies atomically, then relay them reliably.
Do these first
Related katas
- Operate the Reliable Checkout Hard Pro Synthesize redundant checkout, idempotent payment, reliable order events, managed secrets, and correlated telemetry.
- Publish Order Events Reliably Hard Pro Orders commit but fulfillment events disappear. Relay a durable outbox into a topic and isolate downstream consumers.
- Break the Checkout Cycle Hard Free Orders, Pricing and Promotions import each other in a three-hop cycle while Pricing also reaches into Inventory's internals. Moving the obvious call only rotates the cycle; hoist the shared vocabulary into a kernel leaf and reach Inventory through its published port to turn every rule green.
- Config Is Infrastructure Medium Free The shipping core reads a framework configuration type directly, welding the domain to infrastructure. Invert it behind a core-owned options port, and don't just rename the framework wrapper into the core, which trips a second rule.