B1.2 · dive 2 of 4 — the ordered property
String order is mint order.
Because the payload is a fixed-width encoding of a strictly increasing integer, string order equals numeric order equals mint order. A table keyed by branded ids is a timeline with no clock in the process.
The lineage: Twitter's 2010 generator promised ids that were uncoordinated, 64-bit, and roughly sortable. The contract hardens roughly into exactly per node — the minting law makes each node's sequence strictly monotonic.
274557032793636864 ⇆ USR0KHTOWnGLuC and
320636799581945856 ⇆ USR0NgWEfAEJfs. Select a sort; all three produce
one sequence.The theorem, and its lineage
content/bcs1.2.md · King 2010Twitter's 2010 generator promised ids that were uncoordinated, 64-bit, and roughly sortable — close ids for tweets posted close together. The contract's payload is fixed-width and zero-padded over a strictly ascending alphabet, so comparison is positional with no length ambiguity: payload byte order is base62 numeric order, and the timestamp occupies the most significant bits of that number. Roughly becomes exactly per node — the minting law makes each node's sequence strictly monotonic, so a system's table keyed by branded ids is a timeline with no clock in the process.
Proven on a table
bcs_rung_1_1_check.outThe substrate proved the theorem at G4: two thousand mints paged newest-first from byte comparison alone. The store holds no clock — the chronology is in the keys.
G4 ordered ok -- page_desc(2000) == byte-sort desc over 2000 minted ids; store holds no clock
Extended across a stream
content/out/streams_bench.outThe streams experiment extended the theorem across a second data structure: a ten-millisecond window addressed purely by id arithmetic returned its predicted 40960 entries.
window [+10ms, +20ms) via branded-derived ids: 40960 entries (expected 40960)
first id in window: "1781000000010-28672" (low 22 bits = node 7 << 12 | seq 0 = 28672)
Cursors without a clock
content/contract.md §2 · instants per content/vectors.jsonThe contract's synthetic cursor is normative:
min_for(t) = (t − EPOCH_MS) << 22 — the smallest snowflake mintable at or after
instant t, the half-open lower bound for every time-range scan in the system. The two
instants below are the committed unix_ms vectors; the cursors are computed live by a pure
function.
What systems do with it
content/bcs1.2.md · WhenA table keyed by branded ids is a timeline. A feed is a descending sort. A window is
two synthetic cursors — in a table or a stream alike. Consult the theorem when choosing keys, cursors,
and replay windows; and any system applying a collation to branded text must use byte order, because a
language collation breaks the theorem and the range gate at once. Retired: the second clock — the
created_at column an id-keyed table no longer needs.
The namespace-first property completes the picture: within one namespace the prefix is equal, so a sorted index over branded ids is the per-namespace timeline — the partition and the chronology in one comparator.
References
sources · relatedSources
- King — Announcing Snowflake (2010)the roughly-sortable promise the contract hardens to exact per node
- Valkeythe engine the streams window ran against — id arithmetic addressing a second data structure
Related
- B1.2 — the module hubthe contract sheet, all four properties
- B1 — Ideas Behindthe chapter landing
- BCS — the course homethe law, the id anatomy, the chapter map
- Redis Patterns Appliedsorted sets and streams — the substrate structures the theorem keys into