Concept explanation
Concurrency bugs often look impossible in local testing and obvious in hindsight. This arena makes the races visible so you can practice the database move that keeps money, inventory, bookings, and jobs correct.
Defend database invariants from concurrent requests by choosing transactions, locks, constraints, snapshot reads, and optimistic concurrency.
practice/transaction-isolation-arena Isolation design score Play, get feedback, save local progress, and optionally submit a leaderboard score.
Concurrency bugs often look impossible in local testing and obvious in hindsight. This arena makes the races visible so you can practice the database move that keeps money, inventory, bookings, and jobs correct.
Use the controls below. Feedback appears immediately, and final scores are stored locally.
Top 10 submitted scores. No account required.
Loading leaderboard...
Finish the game to load your latest local score.
Transactions are a tool for preserving invariants across multiple reads and writes. The correct design depends on what can race: a known row, a range of rows, a multi-row transfer, or stale editor state.
Locks, constraints, serializable isolation, atomic updates, and optimistic version checks each solve different concurrency problems. Good backend engineers choose the smallest mechanism that actually protects correctness.
Short answers for how this game fits backend interview and study practice.
No. Serializable is powerful but can add retries and contention. Many invariants are better protected with constraints, row locks, atomic updates, or optimistic checks.
Queues can serialize some workflows, but the database still needs to protect its own critical invariants when concurrent writers exist.