Time in distributed systems: Lamport Timestamps
goodmath.org