How much do you need transactions?
The most famous example about the use of transactions is the money transfer scenario. As money is shifted from one account to the other, we want to ensure that no money goes poof or made up of whole cloth.
I just logged in to the bank to pay the taxes. It is a boring process that mostly consist of checking a box in a transfer filled by the accounting department. Today there was much excitement. The transfer failed.
That was strange.
I got an error that the money transfers failed and that I should process the order again later. I checked my balance and the money is deducted from my account.
I’m trying to decide if I should shrug it off and just make sure that the money was sent in a couple of days or if I should call someone at the bank and offer them consulting services about how to build transactional systems.
Comments
Check the web page source, maybe they're building two separate sql statements on the client in javascript and there was a network error between the debit and the credit :)
Banks are usually funny like this, it is usually not a lack of a transactional system, but because they have delayed actions.
When it's between banks (or countries) it usually goes in batches during the night and not live. While they still want to show an "up-to-date" balance (so you can't withdraw 10 million before the night batch which then discovers that you don't have 10 million).
Usually this is kept in-sync by using an internal transaction which moves the money immediately away from your account and into a separate batch account which is used in the batch during the night, but sometimes you have implementations that differ from that thought :)
Banks tend towards BASE, not ACID. Availability generates more revenue than consistency and lack of consistency allows for overdraft fees when eventual consistency catches up.
http://highscalability.com/blog/2013/5/1/myth-eric-brewer-on-why-banks-are-base-not-acid-availability.html
There's probably also a Gus Gorman somewhere skimming the pennies when I pay my credit card and the funds disappear immediately from my account, and don't show up in my credit card until the end of the next business day :-)
@Trev Eventual consistency is fine, but to display an error message and still deduct the amount does not seem right :)
Comment preview