by matdehaast on 1/30/23, 4:34 PM with 55 comments
by eatonphil on 1/30/23, 9:07 PM
https://github.com/tigerbeetledb/tigerbeetle
Also, if there are any Africa-based devs here (but of course, you're welcome to come from wherever you are) we're running a systems programming conference with Derek Collison of NATS, Jamie Brandon of TigerBeetle and HYTRADBOI, Andrew Kelley of Zig, and many other great folks.
Next week, Feb 9th and 10th in Cape Town. Maybe we'll see you there!
by vishnugupta on 1/31/23, 5:47 AM
Adding a few thoughts off the top of my head.
From my experience I can say that money transfers are rarely, if ever, done atomically between two end user accounts. i.e., <Account A debit, Account B> being one operation. Instead the money first moves from Account A to a pooled account, some business checks/operations take place, and then from a pooled account (could be same or different) to account B. The reason to do so is to run a host of business checks which could take quite some time, in some cases even a day or more. Which is why the two phase account transfer semantic of "Reserve", "Settle" scales so well. One can build all kinds of higher order business flows on top of them. Subscriptions, scheduled payments, and so on.
Account transfers are subject to a bunch of velocity limits such as daily/weekly/monthly count and volume of transactions. It depends on a bunch of factors such as user's KYC levels, fraud rules, customers' age in the system etc., An account starts off at a lower limit and those limits are gradually increased as the account ages in the system. This was a big pain to pull off in scalable fashion. The running counter of limits ends up being bottle neck. For example, a popular merchant account doing a few million transactions a day. Subjecting that account to velocity limit checks million times will mean that merchant account will become a hotspot.
Maybe I should do a blog post sometime, just to give a structure to my brain dump :-P.
by m8s on 1/31/23, 2:20 AM
https://twitter.com/sw_unscripted/status/1584695054563954689
by fbouvier on 1/31/23, 10:26 AM
- io_uring support on the std lib
https://github.com/ziglang/zig/pull/6356
- a cross-platform io_uring based event loop
https://github.com/tigerbeetledb/tigerbeetle/tree/main/src/i...
https://tigerbeetle.com/blog/a-friendly-abstraction-over-iou...
Thanks team
by swyx on 1/30/23, 11:54 PM
by makestuff on 1/30/23, 11:51 PM
by trollied on 1/30/23, 9:39 PM
Just flipped back to the docs again, think I've found it: 'Set user_data to a "foreign key" — that is, an identifier of a corresponding object within another database.' -- This is all well and good, but if you're having to write to this other database at the same time in order to store said other data, doesn't it make your ledger a bit pointless? I'm just struggling to see the use cases. Can anyone help me "get it" ? (For the record, I work with ERP/accounting systems in my day job)
by xarope on 1/31/23, 4:20 AM
by eadz on 1/31/23, 12:57 AM
Advantages for using Postgres ( assuming a double entry schema[1] ) and you're using Postgres for your main app db;
- You can do financial transactions inside business db transactions, and roll back both atomically
- Adding up numbers is one of the things computers are best at, and Postgres can easily handle a huge amount of financial transactions
- Re-use PaaS Postgres hosting/scaling/clustering/backups
- Easier integration with the rest of your app with foreign keys to relevant records relating to the financial transaction
- Easy integration with BI tools given Postgres is well connectable
[1]
Roughy `account(id, cached_balance)`, `transaction_lines(src_account, dst_account, amount)`This gem does literally billions of dollars worth of financial accounting for various companies at scale: https://github.com/envato/double_entry
It's dated, the API is a bit messy and needs work, as it was initially written 10+ years ago, but for a web based app I would choose a v2 of it over a non-postgres ( assuming you are using Postgres for your app ) solution.
by anon291 on 1/31/23, 3:04 AM
by agentultra on 1/30/23, 10:36 PM
Cool project!
by yawnxyz on 1/31/23, 1:25 AM
by leetrout on 1/31/23, 2:45 AM
by jojobas on 1/31/23, 7:03 AM
That's man-millennia of painfully evolved application code, catering for tax legislation of many countries and The Way Accountants Want It, and database performance/serializability is a fourth-order concern.
by oofbey on 1/30/23, 9:26 PM