In distributed system, clock can be skewed so if system is relying on wall clock or local clock, it will face unexpected results such as overwriting an existing value from a wrong system.

Lamport clock will solve this problem.

1
2
3
Tmax = hightest version which have seen.

Final version = max(Tmax + 1, realtime clock)