0 / 6
0x7a3f...e912 → 0xb4c1...3d8f   SETTLED   0x91ef...02ab → 0x3c7d...f1e4   COMMITTED   0xd8f2...7b3a → 0x5e91...c4d2   PENDING  
FINALIZED   0x2b8c...a1f7 ← 0xe4d9...6c3b   CONFIRMED   0x6f1a...d82e ← 0x9c5b...4a7f   SETTLED   0xa3e7...1b9d ← 0x8d4f...e2c6  

TRANSACTOLOGY

The study of how value moves between systems

BLOCK: 847291 LATENCY: 42ms STATE: ATOMIC

Atomicity

Here's the thing about atomicity that nobody tells you upfront: it's not about being small. The word comes from the Greek atomos — uncuttable. An atomic transaction isn't a tiny transaction. It's an indivisible one. Either the whole thing happens, or none of it does. There is no in-between state where half your money left but didn't arrive.

Think about ordering at a restaurant. You sit down, you order a steak with a side of fries and a drink. Atomicity means the kitchen either delivers your complete order — steak, fries, drink, all of it — or they come back and say "sorry, we can't do it" and you get nothing. What atomicity prevents is the nightmare scenario: steak arrives, fries are missing, and nobody knows where your drink went.

In database terms, this is the BEGIN TRANSACTION ... COMMIT boundary. Everything between those markers either persists completely or rolls back entirely. The transaction log ensures that even if the power goes out mid-write, on restart the system can reconstruct exactly what happened and undo any partial work. It's an all-or-nothing contract between you and the machine.

TWO-PHASE COMMIT

Coordinator Participant A Participant B COMMITTED
INVARIANT: BALANCED CONSTRAINTS: 12/12 STATE: CONSISTENT

Consistency

Consistency is the promise that your database won't lie to you. More precisely, it guarantees that a transaction can only bring the database from one valid state to another. If you have a rule that says "account balances cannot be negative," consistency ensures that no transaction — no matter how cleverly constructed — can violate that rule and leave the system in an impossible state.

Here's where it gets interesting: consistency isn't something the database engine can fully guarantee on its own. The database enforces the constraints you define — foreign keys, unique indexes, check constraints — but the meaning of consistency is your responsibility. If your business rule is "total debits must equal total credits," you have to encode that as a constraint. The database keeps its promises, but only the ones you actually make it promise.

Think of it like a game with rules. The database is the referee. It will catch you if you try to move your queen like a knight. But if you forgot to tell it that there's a rule about castling, it won't enforce that rule. Consistency is a partnership between your schema design and the transaction engine.

SAGA PATTERN

Order Payment Inventory Shipping ✗ Compensate
ISOLATION: SERIALIZABLE LOCKS: 7 HELD CONFLICTS: 0

Isolation

Isolation is the most misunderstood of the ACID properties, and honestly, it's the most interesting. The idea sounds simple: concurrent transactions should behave as if they're running one at a time, in sequence. The reality is a spectrum of trade-offs that database engineers have been arguing about for decades.

The purest form is SERIALIZABLE isolation — every transaction sees a perfectly consistent snapshot and the final result is equivalent to some serial ordering. It's beautiful in theory and brutally expensive in practice. So databases offer weaker levels: READ COMMITTED, REPEATABLE READ, SNAPSHOT ISOLATION. Each one trades a bit of purity for a lot of performance.

The dirty secret of isolation? Most production systems run at READ COMMITTED and just deal with the anomalies. Phantom reads, non-repeatable reads, write skew — these are the ghosts that haunt concurrent systems. Good engineers don't pretend they don't exist. They understand exactly which anomalies their isolation level permits and design around them. That's real transactology.

WAL: FSYNCED REPLICAS: 3/3 STATE: DURABLE

Durability

Once a transaction commits, it stays committed. That's durability. You could pull the power cord out of the wall one millisecond after commit, and when the system comes back up, that transaction's effects are still there. This sounds like the most straightforward of the ACID properties, and in a single-machine world, it mostly is. Write-ahead logging (WAL) ensures that committed changes hit persistent storage before the commit response returns to the client.

But durability gets genuinely hard in distributed systems. When your data lives across multiple machines in multiple data centers, "committed" means different things depending on how many replicas have acknowledged the write. Synchronous replication gives you strong durability — the write isn't committed until N replicas confirm — but it tanks your latency. Asynchronous replication is fast but leaves a window where a committed transaction exists on only one machine.

The real craft of durability engineering is choosing the right trade-off for your use case. Banking systems that move real money need synchronous replication with fsync on every commit. Social media feeds can tolerate losing the last few seconds of writes during a failure. There's no universal answer — only the right answer for your specific tolerance for data loss.

EVENTUAL CONSISTENCY

Primary Write Replica A Replica B Replica C ✓ EVENTUALLY CONSISTENT
CONFIRMATIONS: 6/6 FINALITY: ABSOLUTE REVERSIBLE: NO

Finality

Transaction finality is the moment when a transaction becomes irreversible. Not "hard to reverse" — actually, fundamentally, cannot-be-undone irreversible. This concept separates toy systems from real financial infrastructure, and it's more nuanced than most engineers appreciate.

In traditional banking, settlement finality is a legal concept backed by regulation. When a wire transfer settles through a central bank's real-time gross settlement system (RTGS), it achieves finality — no party can unilaterally reverse it. The settlement is backstopped by the legal authority of the central bank itself. That's about as final as it gets.

Blockchain systems introduced probabilistic finality — a transaction becomes exponentially harder to reverse with each subsequent block, but in theory, it's never 100% irreversible. Bitcoin considers 6 confirmations (~60 minutes) as "effectively final." Newer consensus protocols like Tendermint achieve absolute finality — once a block is committed by 2/3+ of validators, it cannot be reverted without breaking the protocol's fundamental assumptions.

Understanding finality is understanding the deepest promise a system can make: that what happened, happened, and nothing — not a crash, not an adversary, not a software bug — can make it un-happen.

The Study Continues

Transactology isn't a finished discipline. Every year brings new consensus protocols, new isolation models, new ideas about what finality means in an increasingly distributed world. The fundamentals — atomicity, consistency, isolation, durability — remain the bedrock. But the structures we build on that bedrock keep evolving.

Every transaction is a promise. Transactology is the study of how to keep it.

transactology.dev est. 2026