&#60;Shameless plug&#62;<p>They're used (amongst many other applications) by Amazon-dynamo patterned storage systems, such as Dynomite, Riak or Voldemort. My presentation from November &#60; <a href="http://behemoth.strlen.net/~alex/Voldemort_NoSQL_Oakland.ppt" rel="nofollow">http://behemoth.strlen.net/~alex/Voldemort_NoSQL_Oakland.ppt</a> &#62; explains vector clocks and their use in a storage system, but in my opinion the parent article does so even better (I wasn't too good at OmniGraffle and only used PPT out of expediency).<p>&#60;/Shameless plug&#62;<p>You should definitely read the Dynamo paper &#60; <a href="http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html" rel="nofollow">http://www.allthingsdistributed.com/2007/10/amazons_dynamo.h...</a> &#62; as it's just plain interesting (although, it's by no means a "blueprint" to building a storage system). Here's my attempt at cliff notes to the Dynamo paper, explaining the application of a Vector clock:<p>Suppose you have a system where you want to achieve N-way replication of data, <i>but</i> don't want to lose availability for writes by going to two-phase commit. So in this case, you do this:
* Write your data synchronously to W nodes<p>* Perform a <i>background</i> (async) write to N - W nodes<p>* When reading, instead read from R nodes. Now, if R + W &#62; N, you can now be sure that at least <i>one</i> of the R nodes will have the most up to date version of the data, achieving a very basic "read your writes" consistency, without having to write to <i>all</i> of the nodes.<p>Problem is, how do you tell which is the node holding the truth? That's what vector clocks are for.<p>Given a value X with clock A and and a value Y with clock B, you can tell whether X was written <i>because</i> Y was read (implying X was written after Y), whether Y was written because of X was read (implying X was written before Y) or if the two are independent of each other. The latter scenario occurs when nodes holding X and Y become partitioned from each other (i.e. network link going down) - but some subset of clients is able to talk to X, another is able to talk to Y and another to both. In this case you <i>can't</i> tell which came as a result of which, but you can see that the scenario has happened and attempt to reconcile the values.<p>The simplest example of this reconciliation is Amazon's shopping cart (powered by Dynamo), where if two node had causally unrelated versions of the shopping cart it would make sense just to merge the two versions (combining the items).