3 ms·
I remember having an argument with a distributed systems professor about whether banks were AP or CP. He said that they were strongly consistent because they wo
by elvinyung 9y ago
I remember having an argument with a distributed systems professor about whether banks were AP or CP. He said that they were strongly consistent because they would always have redundant network links to prevent partitions, and refused to consider the hypothetical case of a network partition.
That was the day I dropped the course.
- eternalban 9y agoBanks are logically CP. ("Your deposit will be available by the next business day.") Technological advances are however, per Professor, reducing (or entirely eliminating) service availability gaps. But should the branch office partition from the main office, then the system will revert to strict CP.
- manigandham 9y agoThat's AP. It's better customer service to be available so you always get an answer, it's just out of date. Deposit being available next day means eventually your balance will be made consistent after all the settlement occurs. Banking is an AP, eventually consistent, event-sourced system. All transactions are logged as pending and then processed later. If something is invalid, then it gets denied or reversed as another transaction. This is why you see deposits held, limits on ATM withdrawals, and charges on credit cards that take days to show up. Some systems do the processing constantly so it seems instant but its never "real-time". In fact, Eric Brewer himself talks about this concept, usually called BASE as an alternative to ACID: https://www.infoq.com/presentations/NoSQL-History https://www.infoq.com/presentations/NoSQL-History http://highscalability.com/blog/2013/5/1/myth-eric-brewer-on-why-banks-are-base-not-acid-availability.html http://highscalability.com/blog/2013/5/1/myth-eric-brewer-on...