Catalogue / square-2019-books-ledger

Square builds Books, a double-entry ledger on Spanner holding about 20TB and run by three people

Square, 2019. Books, an immutable double-entry accounting database service.

Organisation
Square
Evidence
Reported from production
Source
Books, an immutable double-entry accounting database service

The Corner, Square's technical blog, published 2019-10-16

Records

Decision#d1

Model money as balanced double-entry journal entries so every cent moved is matched and payouts can be split

Decision#d2

Store the ledger in Cloud Spanner, shaping the schema for horizontal scaling

Decision#d3

Make journal and book entries append-only and fix mistakes with correcting entries

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free.