What If Someone Changes the Job While Botie Is Reading It?

Two valid edits can overwrite each other. Make stale assumptions visible, and distinguish version checks from the database’s isolation guarantees.

14 sections · 4 questions · 1 coding challenge

1 / 14

Coordinating Readers and Writers Without Losing Work

BOTIE

Shared databases needed to coordinate transactions whose operations overlapped. Locking and multi-version approaches provide different ways to control which state a transaction can observe and change. These mechanisms developed to support concurrent applications, long before a model could issue SQL.

SQLite and PostgreSQL expose different concurrency models. SQLite serialises writers, while WAL mode lets readers keep an earlier snapshot as a writer commits. PostgreSQL offers several isolation levels with their own anomaly and retry rules. Our one-connection exercise illustrates an optimistic version predicate, not either engine’s full scheduler.

Sources for this history