Implement pull anti-entropy with lamport scaler timestamp and replica version ids.
Each replica writes versions to it’s own local log via a monotonic increasing version number that implements a Lamport scalar timestamp. E.g. object versions are (replica version, replica id).
The replica version is incremented for each local write, as well as set to max(replica version, neighbor version) during each anti-entropy session.
Anti-entropy sessions reconcile the per-node logs of each replica by appending writes to the logs that are behind for each participant. These sessions can be push/pull/bilateral.
Each replica keeps an object: latest version mapping and always writes to the latest version, no matter which log that version happens to be in.
Implement pull anti-entropy with lamport scaler timestamp and replica version ids.