Lamport and Vector Clocks in Go: Ordering Events Without a Shared Clock
Two servers write the same key and your logs say one came 3 ms before the other. Can you trust that? Not without a shared clock. We build Lamport and vector clocks in Go, explain the small amount of math behind them (partial orders, the happened-before relation, component-wise comparison), and test both against 6.7 million event pairs to see exactly what each one can and cannot tell you.
#Distributed-Systems #Go #Logical-Clocks #Algorithms
November 14, 2026