- Atomic: A transaction as a whole atomic unit succeeds or fails.
- Consistent: A transaction cannot leave the database in an inconsistent state.
- Isolated: Transactions cannot interfere with each other.
- Durable: Completed transactions persist, even when servers restart etc.
But todays' highly scalable internet applications have different set of demands that is at odds with these ACID properties. For example,
- distributing a database to more than one machine becomes inevitable as your website gets more and more traffic; It becomes impossible to get an acceptable response time given problems like network delays & failures.
- Scaling-up one database node endlessly is an impossible task because hardware failure can never be ruled out(atleast for now). Downtime is simply unacceptable.
- providing caching mechanisms will be conflicting with the 'Consistent' property, due to the existence of a possibility that the database can be updated without the cache updates getting completed.
CAP theoram says that ONLY ACID properties will have problems with scalable distributed systems; Thankfully, we have an alternative called BASE!
BASE is an acronym for
- Basic Availability
- Soft-state
- Eventual consistency
It’s harder to develop software in the fault-tolerant BASE world compared to the fastidious ACID world, but Brewer’s CAP theorem says you have no choice if you want to scale up. However, as Brewer points out in this presentation, there is a continuum between ACID and BASE. You can decide how close you want to be to one end of the continuum or the other according to your priorities.
Source: http://www.johndcook.com/blog/2009/07/06/brewer-cap-theorem-base/
Bookmark/Share this post with:

0 comments:
Post a Comment