Systems / Specification to program

Transaction builder

Turn a small rulebook into a system that handles competing edits correctly.

0 creditsHuman example only
Your workbench

Move three units from A to B using two successful transactions. Also demonstrate an old snapshot read and reject a stale writer.

Reads see their opening snapshot. A commit needs a live edit lease and the current revision; both balances change together. Committing releases the lease. A lease expires after two minutes.

Versioned store

Account A4
→
Account B2
Revision0
Clock0
LeaseAvailable

Contract evidence

Repeatable old snapshotStale writer rejectedTwo successful commitsFinal A = 1, B = 5
  1. Amber and Blue opened snapshots at revision 0.
Explore the controls, then check your result.
Need a hint?
Amber and Blue already share revision 0. Let Amber commit 2. Read Blue’s old snapshot, then acquire a lease and try its stale commit. Green can open a fresh snapshot and transfer the final unit.
Explore another example / 04Message-sorting station