Eventually consistent: Vague commitment that system will eventually converge to a consensus, if you wait long enough after the “last update”.
Conflict detection: Detect that a conflict has occurred and either
Conflict prevention: Don’t allow conflicting writes
Algorithm that is:
Given N replications
If R + W > N
Read Distributed Algorithms in NoSQL Databases section “Sharding and Replication in Dynamic Environments”. Stop just before “Multi-Attribute Sharding”.
In our discussion of availability/partition-tolerance tradeoffs so far (and in the Tea Emporium assignment as well), we have assumed a fixed number of replications of our data. But what do you do if you need to increase the number of replications to meet higher demand or reduce replications when demand drops? This section considers the challenges that arise when you change your number of replications as your application runs. Nearly all real applications do dynamic replica management, so these techniques are necessary to building real apps.