.nornir/assets/read_paths_circuit.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1180 680" font-family="'DejaVu Sans', 'Segoe UI', sans-serif">
<defs>
<linearGradient id="board" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#0b1c2e"/>
<stop offset="1" stop-color="#06111d"/>
</linearGradient>
<linearGradient id="chip" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#14384f"/>
<stop offset="1" stop-color="#0e2a3e"/>
</linearGradient>
<linearGradient id="rail" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#173d57"/>
<stop offset="1" stop-color="#0c2438"/>
</linearGradient>
<linearGradient id="ice" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#e4f5ff" stop-opacity="0.95"/>
<stop offset="0.55" stop-color="#bfe6ff" stop-opacity="0.6"/>
<stop offset="1" stop-color="#bfe6ff" stop-opacity="0.08"/>
</linearGradient>
</defs>
<!-- PCB substrate -->
<rect x="0" y="0" width="1180" height="680" fill="url(#board)"/>
<g stroke="#143a52" stroke-width="1">
<line x1="0" y1="76" x2="1180" y2="76"/>
<line x1="0" y1="632" x2="1180" y2="632"/>
</g>
<g fill="#16415c">
<circle cx="40" cy="40" r="2"/><circle cx="1140" cy="40" r="2"/>
<circle cx="40" cy="652" r="2"/><circle cx="1140" cy="652" r="2"/>
</g>
<!-- title -->
<text x="40" y="44" fill="#eaf6ff" font-size="22" font-weight="700">Read paths</text>
<text x="192" y="44" fill="#9fc9e0" font-size="15">every call routes left → right, falling through to <tspan fill="#bfe6ff" font-weight="700">redb</tspan> only on a miss</text>
<!-- legend -->
<g font-size="12.5">
<line x1="744" y1="38" x2="784" y2="38" stroke="#6fd3f5" stroke-width="3"/>
<text x="792" y="42" fill="#cfe6f5">hit (cache serves)</text>
<line x1="946" y1="38" x2="986" y2="38" stroke="#7fb0cc" stroke-width="2.5" stroke-dasharray="5 4"/>
<text x="994" y="42" fill="#cfe6f5">miss → redb</text>
</g>
<!-- ===================== INPUT PINS (left) ===================== -->
<g font-family="'DejaVu Sans Mono', monospace" font-size="13.5">
<text x="36" y="116" fill="#eaf6ff">table_exists(id)</text>
<text x="36" y="196" fill="#eaf6ff">resolve_metadata(id)</text>
<text x="36" y="276" fill="#eaf6ff">load_table(id)</text>
<text x="36" y="404" fill="#eaf6ff">load_table_at(id, sid)</text>
</g>
<text x="36" y="423" fill="#86b3cc" font-size="11.5" font-family="'DejaVu Sans', sans-serif">time-travel — keyed by snapshot_id</text>
<g fill="#6fd3f5" stroke="#0a1622" stroke-width="1">
<circle cx="262" cy="112" r="6"/>
<circle cx="262" cy="192" r="6"/>
<circle cx="262" cy="272" r="6"/>
<circle cx="262" cy="400" r="6"/>
</g>
<!-- pin -> front layer leads (ice) -->
<g stroke="#6fd3f5" stroke-width="3" fill="none">
<path d="M262 112 H320"/>
<path d="M262 192 H320"/>
<path d="M262 272 H320"/>
<path d="M262 400 H320"/>
</g>
<!-- ===================== FRONT LAYER chips ===================== -->
<!-- L1 pointer mirror: serves the 3 latest-state reads -->
<rect x="320" y="88" width="178" height="200" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
<text x="409" y="120" fill="#eaf6ff" font-size="15" font-weight="700" text-anchor="middle">L1 pointer mirror</text>
<text x="409" y="140" fill="#9fc9e0" font-size="11.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">ArcSwap<foldhash map></text>
<text x="409" y="156" fill="#86b3cc" font-size="11" text-anchor="middle">lock-free · every core</text>
<text x="409" y="250" fill="#a9d8ee" font-size="11" text-anchor="middle">key → metadata_location</text>
<text x="409" y="266" fill="#86b3cc" font-size="10.5" text-anchor="middle">content-addressed · never stale</text>
<g fill="#6fd3f5">
<rect x="314" y="108" width="6" height="8"/>
<rect x="314" y="188" width="6" height="8"/>
<rect x="314" y="268" width="6" height="8"/>
</g>
<!-- Ragnar STree64: serves time-travel by snapshot_id — the MOST STATIC layer
(a static search tree, rebuilt only every >=1024 commits) -->
<rect x="320" y="372" width="178" height="68" rx="10" fill="url(#chip)" stroke="#7fc8ea" stroke-width="2.5"/>
<text x="409" y="398" fill="#eaf6ff" font-size="15" font-weight="700" text-anchor="middle">Ragnar STree64</text>
<text x="409" y="418" fill="#9fc9e0" font-size="11" text-anchor="middle">static snapshot-id index</text>
<rect x="314" y="396" width="6" height="8" fill="#6fd3f5"/>
<!-- snowflake mark: this layer is frozen between rebuilds -->
<g stroke="#dff4ff" stroke-width="1.4" stroke-linecap="round">
<line x1="486" y1="355" x2="486" y2="369"/>
<line x1="479" y1="362" x2="493" y2="362"/>
<line x1="481" y1="357" x2="491" y2="367"/>
<line x1="491" y1="357" x2="481" y2="367"/>
</g>
<!-- istappar (icicles) hanging from the static layer -->
<g>
<path d="M338 440 L346 440 L342 466 Z" fill="url(#ice)"/>
<path d="M360 440 L368 440 L364 458 Z" fill="url(#ice)"/>
<path d="M384 440 L392 440 L388 472 Z" fill="url(#ice)"/>
<path d="M410 440 L418 440 L414 452 Z" fill="url(#ice)"/>
<path d="M430 440 L438 440 L434 463 Z" fill="url(#ice)"/>
<path d="M468 440 L476 440 L472 470 Z" fill="url(#ice)"/>
<path d="M488 440 L496 440 L492 455 Z" fill="url(#ice)"/>
</g>
<!-- ===================== STAGE-2 chips ===================== -->
<rect x="586" y="168" width="170" height="64" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
<text x="671" y="195" fill="#eaf6ff" font-size="14.5" font-weight="700" text-anchor="middle">L0 metadata cache</text>
<text x="671" y="214" fill="#9fc9e0" font-size="10.5" text-anchor="middle">parsed · byte-bounded · single-flight</text>
<rect x="580" y="196" width="6" height="8" fill="#6fd3f5"/>
<rect x="586" y="248" width="170" height="60" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
<text x="671" y="274" fill="#eaf6ff" font-size="14.5" font-weight="700" text-anchor="middle">L1.5 handle cache</text>
<text x="671" y="292" fill="#9fc9e0" font-size="10.5" text-anchor="middle">built Table · ~100 ns clone</text>
<rect x="580" y="274" width="6" height="8" fill="#6fd3f5"/>
<!-- ===================== HIT TRACES (ice) ===================== -->
<g stroke="#6fd3f5" stroke-width="3" fill="none">
<path d="M498 112 H980"/>
<path d="M498 192 H586"/>
<path d="M756 200 H840 V192 H980"/>
<path d="M498 272 H586"/>
<path d="M756 278 H980"/>
<path d="M498 400 H545 V300 H586"/>
</g>
<!-- L1.5 miss -> build via L0 -->
<path d="M586 300 H560 V224 H586" stroke="#86b3cc" stroke-width="2" fill="none" stroke-dasharray="4 3"/>
<text x="554" y="322" fill="#86b3cc" font-size="10.5" text-anchor="end">miss → build</text>
<g fill="#bfecff">
<circle cx="586" cy="192" r="4"/><circle cx="586" cy="272" r="4"/>
<circle cx="840" cy="192" r="4"/><circle cx="980" cy="112" r="5"/>
<circle cx="980" cy="192" r="5"/><circle cx="980" cy="278" r="5"/>
<circle cx="586" cy="300" r="4"/>
</g>
<!-- ===================== OUTPUT labels (right) ===================== -->
<g font-family="'DejaVu Sans Mono', monospace" font-size="13">
<text x="992" y="116" fill="#eaf6ff">bool</text>
<text x="992" y="196" fill="#eaf6ff">Arc<TableMetadata></text>
<text x="992" y="282" fill="#eaf6ff">Table</text>
</g>
<!-- ===================== MISS TRACES (dashed steel -> redb rail) ===================== -->
<g stroke="#7fb0cc" stroke-width="2.5" fill="none" stroke-dasharray="6 4">
<path d="M409 288 V560"/>
<path d="M709 232 V470"/>
<path d="M450 440 V560"/>
</g>
<rect x="640" y="470" width="150" height="40" rx="8" fill="#0f2c40" stroke="#4f8aab" stroke-width="1.5"/>
<text x="715" y="487" fill="#cfe6f5" font-size="11.5" text-anchor="middle">FileIO read + parse</text>
<text x="715" y="501" fill="#86b3cc" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">…/uuid.metadata.json</text>
<path d="M709 510 V560" stroke="#7fb0cc" stroke-width="2.5" fill="none" stroke-dasharray="6 4"/>
<g fill="#86b3cc" font-size="10.5">
<text x="416" y="334">miss</text>
<text x="456" y="468">miss</text>
</g>
<!-- ===================== redb GROUND RAIL ===================== -->
<rect x="320" y="552" width="700" height="56" rx="10" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2"/>
<g fill="#0a1c2c" stroke="#7fc8ea" stroke-width="1.5">
<circle cx="360" cy="580" r="4"/><circle cx="430" cy="580" r="4"/>
<circle cx="560" cy="580" r="4"/><circle cx="709" cy="580" r="4"/>
<circle cx="840" cy="580" r="4"/><circle cx="980" cy="580" r="4"/>
</g>
<text x="392" y="579" fill="#dff1ff" font-size="16" font-weight="700">redb</text>
<text x="470" y="577" fill="#bcd9ec" font-size="12">ACID source of truth — durable, transactional</text>
<text x="470" y="596" fill="#7fa8c4" font-size="10.5" font-family="'DejaVu Sans Mono', monospace">tables · commits · namespaces · namespace_props · meta</text>
</svg>