How does the CAP Theorem apply to JBoss Data Grid (JDG)?
The CAP theorem asserts that any networked shared-data system can have only two of three desirable properties.
- Partition Tolerant
Partitions come in two flavors: hard partitions and soft partitions. A hard partition results in one or more disconnected nodes. It is the result of a network failure. For example, a faulty switch. A soft partition results in one or more unresponsive nodes. It is the result of an OS / application event. For example, garbage collection.
In the absence of a partition, JDG is CA. It is both consistent and available.
In the presence of a hard partition, JDG is AP. It is both available and partition tolerant. It sacrifices consistency for availability.
In the presence of a soft partition…
With synchronous communication, JDG is CP. It is both consistent and partition tolerant. It sacrifices availability in that it waits for a response.
With asynchronous communication, JDG is AP. It is both available and partition tolerance. It sacrifices consistency in that it does NOT wait for a response.
In the traditional sense, JDG is AP as opposed to CP. However, the CAP properties of a distributed system depend on both the configuration and the state of the distributed system itself. As such, they may vary from one implementation to another if not fluctuate.
It’s worth noting that JDG is NOT eventually consistent, yet (link). Vector clocks? Read repair? A quorum? We’ll see.
ACID v CAP
CAP and CAP (The other CAP)
The NoSQL / Data Grid Bridge