Build the safeguards
Eight explained steps, tradeoffs, pitfalls and a checkpoint before moving on.
Read the tutorialHow-to / First result to independent work
Start with the result you can see, then choose how far into the implementation you want to go.
Run one failure and one safeguarded version. Read tutorial Steps 1–4. Write down the input, the violated rule, the decision that enforces it, and the remaining limit. Keep that four-part explanation beside the code.
Draw the stale-read timeline. Identify the invariant each database mechanism protects. Explain why an outbox event may be delivered more than once and what the receiver must guarantee.
Download and extract the matching source. Begin with GETTING_STARTED.md. The included preview serves the prebuilt browser application on your own computer. Follow the eight tutorial steps, then run the native checks. The public source viewer is read-only; local source files are yours to edit.
python preview.py
# Open the loopback address printed by the preview.
# Stop the preview with Ctrl+C.Use the language-specific instructions below before rebuilding. Serve the application over HTTP; opening an HTML file directly does not provide the module and WebAssembly environment used by the preview.
# With PHP 8.4 and PDO SQLite:
php src/test.php
cd src
composer install --no-interaction --no-scripts
php eloquent.phpIndependent challenge
Add a second SKU, bind retries to a normalized cart, inject a failure after the second stock update, and prove that no partial order survives. Define a stable lock order for the separate MySQL implementation.
Write the expected behavior before changing the implementation. Keep the original failure as a regression case. Explain the tradeoff you accepted and the result that would make you reconsider it.
The download includes a recording script, a test matrix and a revision record. Use captions and keep the code readable at the target viewing size.
References support the language and runtime concepts. The lesson, scenarios and explanations are original Zyel Lab material.
Keep exploring
Eight explained steps, tradeoffs, pitfalls and a checkpoint before moving on.
Read the tutorialChoose a pattern and an environment for the problem you actually have.
Compare approachesA beginner route, a local setup and an extension challenge.
Open the how-to guide