Hacker News new | ask | show | jobs
by withinboredom 596 days ago
It can fail at your commas in 1&2, then you are just as broke as everyone else.

This isn't an easy-to-solve problem when it comes to distributed computing.

1 comments

It should be an atomic transaction, double-entry style, so it can’t fail between commas.

The important thing is not having money go missing.

The only way that is possible is if the tables exist on the same database server. Otherwise, you are right back at distributed transaction problems.
That's the whole point of double-entry. You don't split the entries.
Then this is off-topic af. We are talking about distributed systems here.