By the CAP theorem, it is impossible for a distributed Erlang system to simultaneously provide all three of the following guarantees:
- Consistency (all Erlang runtimes, or nodes, see the same data at the same time)
- Availability (node failures do not prevent survivors from continuing to operate)
- Partition Tolerance (the system continues to operate despite arbitrary message loss)
A distributed Erlang system can support zero, one, or two of the guarantees.
Using Erlang and OTP, how can each guarantee be implemented? Most distributed Erlang applications make the practical choice for higher levels of A and P, and settle for "eventual consistency". It seems Erlang itself was designed to support distributed (P), fault-tolerant (A), soft-real-time, non-stop applications.
The programming language (Erlang), run-time system (ERTS), and set of libraries (OTP) are designed for building distributed fault-tolerant applications; how do I do the three things that define distributed fault-tolerant applications?