Daily Archives: December 26, 2017

Vector Clock better than Lamport Clock

Lamport clock. Algorithms: ts = max(local stamp, msg timestamp) + 1.
Problem, “So Lamport Clocks are great for making sure we know when there’s a causal dependency between records. But there is a problem. Because Lamport Clocks induce a total ordering over all records, they actually imply more dependencies than truly exist. If two records are not causally related at all, and were produced completely independently by separate nodes that did not communicate, they will still have Lamport Clock timestamps which imply that one is ordered before the other, which is a false positive.”
youtube

Vector Clock. Answer the order of two events, if two events are concurrent.
youtube

Example that Vector Clock better than Lamport Clock
vector_lamport