Hacker News new | ask | show | jobs
by ChuckMcM 1165 days ago
Vector clocks are pretty neat. I didn't invent them but I used a crude approximation when I was designing what was to become NIS+ at Sun Microsystems.

Given the problem that you want to accept updates to a database at multiple servers but cannot guarantee that all of those servers have the same notion of time and thus creating an accurate mutation vector that leaves the state of the database consistent, NIS+ used a tuple of (update, secondary-server-time) which the primary could query the secondary and compute a time delta (positive or negative) that would allow it to sort updates to the same database entry from multiple secondaries into a primary relative time order. It could then apply the updates and produce deltas for all secondaries which would apply any necessary changes to their database.

As a systems problem I really enjoyed the challenge.