Database Reference
In-Depth Information
a cluster. Sharding, which is similar to horizontal partitioning, is a way of splitting
data into separate parts and moving them to another server or physical location,
generally for performance improvements.
There are various reasons that all three parts of the theorem cannot be satisfied
in distributed systems. Most have to do with the volume of the data and how long
it takes to move data around and check to ensure that it is correct. CAP is of-
ten used to justify the use of weaker consistency models. Many of the CAP-based
ideas have evolved into the idea of BASE.
BASE
Just as in chemistry, BASE is at the opposite end of the spectrum from ACID.
BASE stands for B asically A vailable, S oft state, and E ventual consistency. The
notion of BASE comes in when dealing with a distributed system so large that
maintaining the principles of CAP becomes impractical. It is worth noting that the
constraints on transactions from ACID are still in play at some level; they just hap-
pen at different times with slightly different rules.
Having a system be basically available means that the system will respond to
any request. The caveat is that the response may be a failure to get the data or that
the data may be in an inconsistent or changing state. This is equivalent in the real
world to depositing a check in your bank account and waiting for it to go through
the clearinghouse to make the funds available to you.
Using the BASE terminology, we can expand on the idea of banking with
checks. If your bank has only one branch, consistency and availability are satis-
fied. No partitioning is necessary, and every transaction you make will be avail-
able and consistent with itself. If your bank has two branches, when you deposit a
check into branch A, branch B will not see the funds instantaneously because the
data needs time to become eventually consistent. What if you deposit two checks
and one bounces? The entire transaction should not fail because of one check; each
check will be processed in isolation. A problem with one check should not cause
a problem with the whole system. That would not make for a very durable system.
If the computers at branch A go down, that shouldn't stop branch B from work-
ing completely. That would mean that the system isn't very available, so there are
safety nets in place.
The idea of a soft-state system means the system is always changing. This is
typically due to eventual consistency. It is common for soft-state systems to un-
dergo changes even when there is no additional input to them.
Search WWH ::




Custom Search