Menu

📰
0

Reddit - Please wait for verification

The Go Programming Language·/u/anirudhology·3 days ago
#dRcMsgdN
Reading 0:00
15s threshold

Shipped chrono v0.1.0, a Go library for the four distributed-systems clock primitives (Lamport, vector, HLC, TrueTime-style), with a proofs/ package whose entire purpose is to reproduce the failure scenarios from the original papers as runnable Go tests. Problem We all know that physical time is not reliable in distributed systems. Wall clocks drift. NTP can step us backward by hundreds of ms. Two machines on the same NTP server disagree by tens of ms at any given moment. If we sort events by time.Now(), then one correction can put our audit log in the wrong order. The problem is the we won't know this until after months when someone files a bug about a record that "obviously" predates another one. Purpose Plenty of libraries implement Lamport, vector clocks, HLCs, and bounded-uncertainty intervals, but almost none show how they actually handle the failures the papers are warning about. That's what the proofs/ is for. There are 5 tests, each one a reproduction of a specific scenario.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More