Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 03 · Finance · The Plumbing That Moves Money · about 12 min to read

Watch: Event-driven architecture: the ledger everyone reads
▶ VideoPlay it as a journeyTutor comes with a plan

A Book You Never Erase, the append-only ledger, reversals and derived balances

The Ledger Everyone Reads
The Ledger Everyone Reads · Open board

The log: append-only, ordered, kept, with “state = fold over the log” in its event-sourcing box. That board is about events in software. This lesson shows the same shape is what a money ledger has to be, and what you do when a line in it is wrong.

Education, not financial advice.

Before you start. From Every Litre Leaves One Tank and Enters Another, double-entry, normal balances and the trial balance: a ledger is accounts and entries, every transaction sums to zero, and the trial balance adds the book up as an alarm. From The Ledger Everyone Reads (event-driven & the log) (or Kafka 02: The Log if you came from From Scratch): a log is a list you only add to, and many readers read it at their own pace. This lesson needs nothing else.

Lesson 44 of 58 in Finance

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 16 October 2019: Square writes up Books
  • The meter you never wind back: append-only
  • The three ways to fix a wrong line, and the one ledgers use
  • A balance is worked out, not stored: the derived balance
  • Fast and still honest: the cached balance and its version

Terms it explains: append-only, reversal, derived balance, cached balance, version.

Lab

The same answer is correct under one promise and a violation under another. Which promise did you make?

Drag Moments the boards run behind the ledger to 3, press Play next moment through the evening, and watch promises broken.

Open The ledger everyone reads

Every sale goes in the register and must also reach the warehouse. The app crashes now and then. Which design lets the two disagree?

Drag How often the app crashes, then switch the tab to Write once, copy from the diary, and watch Do the two agree.

Open The write that happened twice

Related papers

Review Finance