Week 8, Friday (March 7, 2014)—Two eventually consistent algorithms

Some basic issues From Distributed Databases

Eventually consistent: Vague commitment that system will eventually converge to a consensus, if you wait long enough after the “last update”.

Handling conflicting writes

Conflict detection: Detect that a conflict has occurred and either

Conflict prevention: Don’t allow conflicting writes

Anti-entropy via gossip

Algorithm that is:

Read Quorum/ Write Quorum

Given N replications

If R + W > N

Guide to reading for next class

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.