Most NoSQL databases use an eventual consistency model for better scalability. This talk explains the CAP theorem, how it relates to eventual consistency, other possible solutions, and also explains how consistency is directly related to Einstein’s theory of relativity. Finally, there is a surprise.
The CAP theorem says you have to choose between consistency or availability. In essence, this is the trade-off between having nodes communicate upfront about writes to ensure clients get the same answers from all nodes, or reducing communication at the cost of giving clients inconsistent answers depending on which node they are talking to. SQL databases choose consistency, while NoSQL databases generally choose availability via eventual consistency.
This talk explains the theorem and the various approaches to scalability and their benefits and problems. It also explains how this is directly related to the central insight in Einstein’s theory of relativity: time is not absolute, or, as it’s sometimes phrased, there is no now. Finally, the talk shows how the insight from relativity has been used to scale consistent databases.
Video producer: http://www.javazone.no/