Can one record tell you both now and then?
Two reads disagree. First ask which moment each value describes, then who can change it. Keeping history and coordinating writes solve different problems.
Questions in this reading · 15
- What did the record say at the time?
- Can a later update invalidate an earlier fact?
- What does a snapshot promise its reader?
- Why does shared mutable state tangle a program?
- Does hiding mutation remove coordination costs?
- Who coordinates access to the same record?
- Why don’t two locked objects make a safe transaction?
- If replicas agree, did both operations survive?
- How can a backup lose money using only committed reads?
- How much work keeps an apparently unchanged bit unchanged?
- Do gradual replacement and copying leave the same history?
- How much entered today and how much remains now?
- The branch name stayed the same. Why did the code change?
- Do five replicas also create five guessing budgets?
- Which version of the rules do you need to replay yesterday?
What did the record say at the time?
Access patterns determine how to organize a store. Retaining historical facts determines which past questions it will ever be able to answer.
Compare original passages and timestamps · 2
understand every access pattern I need to knowno they don't because facts incorporate time how isCan a later update invalidate an earlier fact?
State makes an answer depend on when you ask. Recording time with a fact lets two different answers describe different moments without contradicting each other.
Compare original passages and timestamps · 2
Having state in your program is never simple, right?no they don't because facts incorporate time how isWhat does a snapshot promise its reader?
Stable snapshots let observers read a particular version. Treating information as values explains why that version can be passed on without changing its meaning.
Compare original passages and timestamps · 2
key characteristic of a value is that it's immutablevalues are immutable right and values are semantically transparentWhy does shared mutable state tangle a program?
One talk separates identity from its successive values. The other shows how state couples parts of a system through time. Read them together to identify what a caller must know about earlier operations.
Compare original passages and timestamps · 2
key characteristic of a value is that it's immutableHaving state in your program is never simple, right?Does hiding mutation remove coordination costs?
An object can conceal its state and still require callers to coordinate operations. Examine what happens when independently safe operations must work together.
Compare original passages and timestamps · 2
They hide mutation – they mutate some state inside, right?feels like an immutable
object, except that it has state inside it.Who coordinates access to the same record?
Designing a table around queries addresses how data is laid out. Routing operations to one process addresses how simultaneous work on a record is coordinated.
Compare original passages and timestamps · 2
access on a single record is going through a single processunderstand every access pattern I need to knowWhy don’t two locked objects make a safe transaction?
Compare what each lock protects with what the combined operation requires. This is a cost of coordinating shared mutable state, not a claim that every lock is wrong.
Compare original passages and timestamps · 3
values aggregate to values all the benefits apply to Aggregatesand unfortunately locks don't compose either, right. That's the problem with locks.as soon as you have objects being shared encapsulation just flies out the windowIf replicas agree, did both operations survive?
Two ATMs can each see the same hundred-dollar balance. A check and its debit must form one operation, or two individually valid decisions can jointly overspend. A collaborative editor faces a different concurrency problem: both users inserted a character. Choosing a single timestamp winner can make replicas agree while losing an insertion. Kleppmann explores operations that converge across delivery orders. Start by naming the invariant: a dollar cannot be withdrawn twice, whereas both edits may deserve preservation. Replica agreement alone does not settle either requirement.
Passages and timestamps · 3
the account balance check and the withdrawal are basically done not at all or in fullas being the winner and the other ones were just going to throw awayapply operations in a different order and still get the same outcomeHow can a backup lose money using only committed reads?
Two accounts start with $500 each. A backup reads the recipient at $500. A $100 transfer then commits. The backup reads the sender at its new balance of $400. The backup totals $900, although the accounts always held $1,000 between them. Each read can be committed while their combination describes a balance that never existed. Kleppmann uses this to distinguish a row from a snapshot. Hickey approaches the write side with Clojure refs: choose the identities that must change together and let readers observe a consistent point. Retaining immutable values still leaves the question of which values belong to one observation.
Passages and timestamps · 2
you've seen different parts of the database at different points in timerefs allow you to change more than one thing in a coordinated operationHow much work keeps an apparently unchanged bit unchanged?
A caller keeps reading the same bit while charge leaks from the underlying DRAM cell. The animation follows the bank’s refresh cycle. A promise that a value remains readable over time therefore depends on a separate operation meeting its own deadline, even when no caller writes a new value.
Passages and timestamps · 2
charge leaks out over time.The refresh operation occurs once every 64 milliseconds for each bankDo gradual replacement and copying leave the same history?
The teleporter thought experiment deliberately matches the copy’s measurable attributes. The ship example instead preserves a sequence of replacements. In a version system two byte-identical files pass a content check, while tracing which review produced one requires its history. Decide whether the question concerns present content, provenance or continuity before choosing the record.
Passages and timestamps · 2
Or a copy that thinks it's you?eventually no piece is original.How much entered today and how much remains now?
Grey points out that material is being processed while intake continues. In a simple container, a total inflow with unknown arrival and departure times does not determine the contents at a particular instant. Before reconstructing a snapshot from a daily total, decide whether the series records events, net changes or current state.
Passages and timestamps · 2
It takes about 40 coffee beans to make one shot of espresso.while you're busy getting the coffee in, your body is busy getting it outThe branch name stayed the same. Why did the code change?
Sending a colleague a branch name does not hand over a fixed version. In the lecture’s cat-and-dog example, a new commit moves the cat reference to a new node while existing commits and parent relationships remain. Separate a changing identity from its value at one moment: a branch name tracks ongoing work, while a commit identifier names a particular snapshot. To explain yesterday’s behavior, record the commit to which the name resolved, then ask whether inputs and the execution environment were preserved too. A code snapshot answers one layer of the question; a commit ID alone does not establish reproducibility of an entire run.
Passages and timestamps · 2
this entire graph is actually immutable.the cat pointer, will be updated to point to the new commitDo five replicas also create five guessing budgets?
History can be copied, but an allowance for failed attempts must not grow freely with the number of replicas. Krstić explains that five HSMs with ten independent attempts each would multiply the total guessing budget. In the design he describes, members retain failure counts but recovery requires a majority commit; an isolated replica cannot keep offering a fresh independent allowance. The coordinated state determines whether the next request is permitted, rather than merely recording what happened afterward. Draw the number of stored copies separately from the authority to consume an allowance. Redundancy and authorization must be designed together; replica count alone establishes neither availability nor security. The claimed guarantees remain bounded by the protocol and trust assumptions in this vendor presentation.
Passages and timestamps · 2
every new unit you escrow to increases that maximum failure counta majority quorum is required to proceedWhich version of the rules do you need to replay yesterday?
Michael Schwern explains a Git branch as a label pointing to a commit. The label can move, and the earlier commit is still visible in the history in his example. Tom Scott uses time zones to illustrate another kind of changing information. He urges keeping the rule file up to date, because a fixed offset cannot cover the rules of every place and date.
Explaining yesterday’s result starts with keeping its inputs. It also requires recovering the code or rules in use at the time. If the system stores only a name that always points to the current version, the old inputs alone may not reproduce the result.
Passages and timestamps · 2
just adding a labelas long as you keep that file updatedTry it on your own example
If two requests update one account, what can a reader see, and can you recover the previous value later?