Free tools & games for everyone
Free · No sign-up · No accounts
How many computers stay in step: read and write quorums, Lamport and vector clocks on random message runs, and consistent hashing.
| Tab | Move between tabs, boxes and buttons |
|---|---|
| Enter | Work out the open tab |
| Touch | Every control works by tapping |
Quorums: a read set and a write set must share a server when R + W > N, so a read always reaches a copy with the latest acknowledged write. Availability is the binomial chance that at least W (or R) of N independent servers are up. Lamport clocks add 1 at every event and take the larger time on receipt; vector clocks keep one counter per process and take the element-wise maximum on receipt. Event a happened before b exactly when a's vector is less than or equal to b's in every place and smaller in at least one.
Consistent hashing places each server at many points on a ring with the 32-bit FNV-1a hash of "name#number"; each key "key-1", "key-2" ... belongs to the first server point at or after the key's hash. Adding a server moves only the keys that land just before its new points. The random runs are made with a seeded generator, so a run number always gives the same events. Everything runs in your browser.
A fresh daily puzzle every morning, and new tools added every month.
Browse every product