Live data from Hacker News

Books: an immutable double-entry accounting database service

developer.squareup.com

11–20 of 66 posts

Re: Books: an immutable double-entry accounting database service

#12
I’ve been involved with several two-sided marketplaces and payment services, and a robust double-entry book-keeping subsystem has always been there from the start. It’s easy to validate the need but/so I also find it hard to believe that Square only started keeping 2E transaction books in the last year. It’s the basis of many high quality controls and their internal audits and reconciliation to GL must’ve been a horrorshow without it.

It’s also the original event-sourced conflict-free replicated data type and the joke about CRDT for your debits is a classic thigh-slapper in the exciting world of accounting software backend implementation

Re: Books: an immutable double-entry accounting database service

#13
I've been using Wave [1] for personal use. It hooks onto all accounts (via Plaid), and it also had a pretty sweet OCR receipts app [2] that posts the transaction to your Wave account.

[1] https://www.waveapps.com/ [2] https://play.google.com/store/apps/details?id=com.waveaccoun...

Re: Books: an immutable double-entry accounting database service

#16
Nice article, I'd be curious to know if/how their engine abstracts the complexity behind multi-currency transactions, or whether they rely on the accounting model to handle multi-currency.

We built our own double-entry accounting engine at my previous company, and while the engine was not as fancy as what Square describes, the real challenge was building out the accounting models that manipulated the engine's primitives.

To this day, I have yet to find another resource on multi-currency that is as solid as this one:

https://www.mathstat.dal.ca/~selinger/accounting/tutorial.ht...

Re: Books: an immutable double-entry accounting database service

#17
This looks good but some of the background has the air of the kind of artificial problems presented in late night infomercials:

> It’s impossible to split a single payment into multiple payouts, since there is a many-to-one relationship of payments to payouts.

So your model used a many-to-one relationship when you really wanted a many-to-many?

> Since this is just a SQL database, there’s nothing preventing the payouts from becoming inconsistent.

Preventing inconsistencies by enforcing constraints is a key point of an RDBMS. This is literally why people use SQL DBs.

> The payout_id can be ensured to be a valid foreign key, but nothing is stopping it from being nulled out.

You mean, like a NOT NULL constraint? Or, if you mean zeroed out, an appropriate constraint and/or before update trigger protecting the amount?

Re: Books: an immutable double-entry accounting database service

#18

For personal use, Beancount[1] looks like a good double-entry bookkeeping tool. [1] https://docs.google.com/document/d/1RaondTJCS_IUPBHFNdT8oqFK...

I've been managing my personal finances with Beancount since the summer. I've been enjoying it a lot. I also use Fava to explore the data.

Re: Books: an immutable double-entry accounting database service

#20

For personal use, Beancount[1] looks like a good double-entry bookkeeping tool. [1] https://docs.google.com/document/d/1RaondTJCS_IUPBHFNdT8oqFK...

Beancount is a Python port of ledger-cli

https://www.ledger-cli.org/

https://github.com/ledger/ledger/wiki/Ports

Post reply on HN