educative.io

Not vector clock, but version vector

The technique to do data versioning here is not vector clock, but version vector. These two concepts are similar, but do differ in their use scenario and update rules. In particular,

  • Version vector establishes a (pre)order among replicas
  • Vector clock establishes a (partial)order among events

Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Versioning Data and Achieving Configurability - Grokking Modern System Design Interview for Engineers & Managers

Hi @seantech1999, you are right that due to subtle differences between the vector clocks and version vectors, our explanation looks like a version vector. Though we are primarily concerned with the causality of events (such as: putting an item in a shopping cart or removing an item from the shopping cart etc.). On the other hand, in a version vector, we are concerned about versioning data items consistently across replicas, and often the last update state is important (and not necessarily how we reached to that final value). That was not the case for our shopping cart use case where we do not just want to see which node has the latest value but need event context to resolve the conflicts.