Version
In centralized environments, we can use linear version numbers to represent a version, such as incrementing a number each time or using timestamps. However, CRDTs can be used in decentralized environments, and their version representation is different.
In Loro, you can express a document’s version through a Version Vector or Frontiers.
const = new ();
.(); // State Version vector
.(); // OpLog Version vector
.(); // State Frontiers
.(); // OpLog Frontiers
In most cases, you might only need the Version Vector, which can be used for data synchronization and version comparison.
Learn More
- Version Vector - Complete peer state tracking for synchronization
- Frontiers - Compact version representation for checkpoints
- Version Deep Dive - Technical details about DAG, causality, and version implementations