A version vector is a set of timestamps, one timestamp for each replica. In RON, this set is formed of UUIDs.
RON text:
vv
Hexadecimal:
0x 0eba 0000 0000 0000
0000 0000 0000 0000
event encodes timestamp. ref is 0. payload is empty.
-
Replica
alfa
measures its local time as 23 and creates a version vector:*vv #23+alfa @23+alfa :0 !
-
Replica
bravo
measures its local time as 27 and adds it to the object#23+alfa
:*vv #23+alfa @27+bravo :0 !
- Reduced chunks ops use the same format as raw ops.
- The order of fields doesn't matter. For reproducibility, ops should be sorted by event origin.
-
Version vector object is normally created with exactly one measurement:
*vv #42+charlie @42+charlie :0 ! *vv #42+charlie @42+charlie :0 ,
the same with compression:
*vv #42+charlie @42+charlie :0 ! ,
or with even more compression
*vv#42+charlie@`!,
The same as the value encoding.
- For each replica in a value or patch there must be exactly one op with corresponding event origin if the replica has commited to the vector, and none otherwise.
- The result op for each origin is selected by the LWW rule — which event value is greater.