2 ms·
I think this kind of makes sense. Think about it the other way, if it were to use transactions the flow would be like this: [Assuming you've entered the PIN, a
by lucaspiller 14y ago
I think this kind of makes sense. Think about it the other way, if it were to use transactions the flow would be like this:
[Assuming you've entered the PIN, and you've pressed the 2000 button to withdraw cash]
a) Check the cash dispenser has enough funds to withdraw 2000
b) Contact bank, reserve 2000
c) Tell cash dispenser to dispense 2000
d) Contact bank, commit 2000
Now for newer ATMs I'm assuming it is a bit different, but older ATMs used dial up modems which I'm guessing were pretty slow and unreliable. Ping times in the hundreds of milliseconds wouldn't have been uncommon. During the time taken to dispense it, you could even yank out the telephone cable. My point is, if the ATM failed to send the commit message, the bank would have just given out 2000 to someone for free.
- 4ad 14y agoThis is not how transaction work, that's exactly the type of failure they protect against. In fact, the behavior you describe is possible now, without transactions (it even happened to me a few times).