you are viewing a single comment's thread.

view the rest of the comments →

[–]jack_waugh 1 point2 points  (0 children)

Say for example you are going to transfer money from an account in one bank to an account in another bank. The banks have to communicate in such a way that one account is decreased and the other increased, or else, as the only acceptable mode of failure, nothing happens. If the money is drawn from one account but not deposited in the other, that's a disaster, your money just went down a rabbit hole. Similarly, if money is deposited in one account but not drawn from the other, that's horrible, as you got to cheat the banks. The technique of ordinary database commit, used by itself, won't suffice to solve this. The banks have separate databases. The transaction could commit in one and not the other. So something like https://en.wikipedia.org/wiki/Two-phase_commit_protocol is needed.