I'm wondering how does the banking transactions work. It is very hard to find some at least acceptable explanation. I dont mean some basic distributed transaction algorithms for not that serious businesses.
So what kind of measures must bank take to keep consistency, to never loose not a single penny.
What about internacional transactions, transactions between banks.
Data consistency across the whole world - not to withdraw all the money in NY and then repeat in Tokio once again..
And any epic failures documented throughout recent history?
I will be very gratefull for all the answers.
International inter-bank transactions are usually done using the Swift network, which started operations in 1977 (was founded in 1973). Before that ... it was Telex.
Swift traffic peaks of 16M high security messages per day.
Access to most Swift documentation is provided only to partners and banks, but perhaps the Wikipedia page, and some other info you can collect from the Internet may satisfy your curiosity.
Interbank transactions are not distributed in the technical meaning of this word. They do not require simulation of single state across internationally distributed resources. In particular there is no atomic transfer from one bank to another. What they do instead is several asynchronous steps that can be repeated or even reverted after any failure.
For example debiting money from the ordering party account is only coupled with generating the interbank message(*), but does not require that the message is immediately delivered. The money is credited to a correspondent account and the messaging system only guarantees that the message is stored and will be delivered some time in the future.
Even if the message is lost (which does not happen), the above procedure can be reverted or the message can be sent again.
(*) Usually some intermediate steps are involved.