Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/nornir

.nornir/assets/warehouse_layers.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="slot" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#123448"/>
      <stop offset="1" stop-color="#0a2032"/>
    </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">Warehouse</text>
  <text x="184" y="44" fill="#9fc9e0" font-size="15">one redb catalogue, single-writer &#8212; a read never <tspan fill="#bfe6ff" font-weight="700">deadlocks</tspan> against the live server</text>

  <!-- legend -->
  <g font-size="12.5">
    <line x1="804" y1="60" x2="844" y2="60" stroke="#6fd3f5" stroke-width="3"/>
    <text x="852" y="64" fill="#cfe6f5">exclusive open (write)</text>
    <line x1="1006" y1="60" x2="1046" y2="60" stroke="#7fb0cc" stroke-width="2.5" stroke-dasharray="5 4"/>
    <text x="1054" y="64" fill="#cfe6f5">snapshot read</text>
  </g>

  <!-- ===================== CALLERS (left) ===================== -->
  <rect x="36" y="118" width="160" height="96" rx="10" fill="url(#chip)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="116" y="148" fill="#eaf6ff" font-size="14.5" font-weight="700" text-anchor="middle">nornir-server</text>
  <text x="116" y="168" fill="#bfe6ff" font-size="10.5" text-anchor="middle" font-weight="700">sole lock-holder</text>
  <text x="116" y="186" fill="#86b3cc" font-size="10" text-anchor="middle">holds the exclusive</text>
  <text x="116" y="200" fill="#86b3cc" font-size="10" text-anchor="middle">catalog.redb lock</text>
  <rect x="196" y="158" width="6" height="8" fill="#6fd3f5"/>

  <rect x="36" y="246" width="160" height="84" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="116" y="274" fill="#eaf6ff" font-size="13.5" font-weight="700" text-anchor="middle">CLI write</text>
  <text x="116" y="293" fill="#9fc9e0" font-size="10" text-anchor="middle">bench run &#183; release run</text>
  <text x="116" y="312" fill="#86b3cc" font-size="10" text-anchor="middle">needs real lock</text>
  <rect x="196" y="284" width="6" height="8" fill="#6fd3f5"/>

  <rect x="36" y="362" width="160" height="92" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="116" y="390" fill="#eaf6ff" font-size="13.5" font-weight="700" text-anchor="middle">CLI / MCP read</text>
  <text x="116" y="409" fill="#9fc9e0" font-size="9.5" text-anchor="middle">docs_fresh &#183; release events</text>
  <text x="116" y="424" fill="#9fc9e0" font-size="9.5" text-anchor="middle">dep-graph &#183; release trace</text>
  <text x="116" y="442" fill="#86b3cc" font-size="10" text-anchor="middle">lock-tolerant</text>
  <rect x="196" y="404" width="6" height="8" fill="#7fb0cc"/>

  <!-- write leads (ice, exclusive) -->
  <g stroke="#6fd3f5" stroke-width="3" fill="none">
    <path d="M196 162 H300 V300 H360"/>
    <path d="M196 288 H360"/>
  </g>
  <g fill="#bfecff"><circle cx="360" cy="300" r="4"/><circle cx="360" cy="288" r="4"/></g>
  <text x="280" y="246" fill="#86b3cc" font-size="10" text-anchor="middle">open() &#8212; exclusive</text>

  <!-- read lead (dashed steel) into the lock probe -->
  <path d="M196 408 H300 V470 H360" stroke="#7fb0cc" stroke-width="2.5" fill="none" stroke-dasharray="6 4"/>
  <text x="282" y="462" fill="#86b3cc" font-size="10" text-anchor="middle">open_read_only()</text>

  <!-- ===================== open() chip ===================== -->
  <rect x="360" y="258" width="150" height="84" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="435" y="286" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">open()</text>
  <text x="435" y="306" fill="#9fc9e0" font-size="10" text-anchor="middle">exclusive write</text>
  <text x="435" y="324" fill="#86b3cc" font-size="9.5" text-anchor="middle">acquires single-writer lock</text>
  <rect x="354" y="296" width="6" height="8" fill="#6fd3f5"/>
  <rect x="510" y="296" width="6" height="8" fill="#6fd3f5"/>

  <!-- open() -> catalog -->
  <g stroke="#6fd3f5" stroke-width="3" fill="none">
    <path d="M510 300 H600 V330 H660"/>
  </g>
  <circle cx="660" cy="330" r="4" fill="#bfecff"/>

  <!-- ===================== open_read_only chip ===================== -->
  <rect x="360" y="428" width="200" height="138" rx="10" fill="url(#chip)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="460" y="454" fill="#eaf6ff" font-size="13.5" font-weight="700" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">open_read_only()</text>
  <text x="460" y="474" fill="#9fc9e0" font-size="10" text-anchor="middle">try exclusive open first&#8230;</text>
  <text x="460" y="490" fill="#86b3cc" font-size="9.5" text-anchor="middle">is_catalog_lock_error? &#8594; fall back</text>
  <text x="460" y="510" fill="#bfe6ff" font-size="10" text-anchor="middle" font-weight="700">copy catalog.redb aside</text>
  <text x="460" y="525" fill="#86b3cc" font-size="9.5" text-anchor="middle">into a tempdir &#8594; open the copy</text>
  <text x="460" y="542" fill="#86b3cc" font-size="9" text-anchor="middle">point-in-time snapshot &#183; ~few-MB index only</text>
  <text x="460" y="556" fill="#7fa8c4" font-size="9" text-anchor="middle">prints a one-line WARNING (never silent)</text>
  <rect x="354" y="466" width="6" height="8" fill="#7fb0cc"/>
  <rect x="560" y="466" width="6" height="8" fill="#7fb0cc"/>

  <!-- read-only -> copied snapshot tempdir -->
  <g stroke="#7fb0cc" stroke-width="2.5" fill="none" stroke-dasharray="6 4">
    <path d="M560 470 H620"/>
  </g>
  <rect x="620" y="446" width="150" height="64" rx="8" fill="#0f2c40" stroke="#4f8aab" stroke-width="1.5"/>
  <text x="695" y="470" fill="#cfe6f5" font-size="11" text-anchor="middle" font-weight="700">copied snapshot</text>
  <text x="695" y="485" fill="#86b3cc" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">TempDir/catalog.redb</text>
  <text x="695" y="500" fill="#7fa8c4" font-size="8.5" text-anchor="middle">read-only by construction</text>

  <!-- snapshot reads table files at live abs paths -->
  <path d="M770 478 H840 V412 H900" stroke="#7fb0cc" stroke-width="2.5" fill="none" stroke-dasharray="6 4"/>
  <text x="840" y="540" fill="#86b3cc" font-size="9.5" text-anchor="middle">data still read by absolute file:// path</text>
  <text x="840" y="554" fill="#7fa8c4" font-size="9.5" text-anchor="middle">&#8594; resolves to the live warehouse</text>

  <!-- ===================== CATALOG (skade-katalog redb) ===================== -->
  <rect x="660" y="296" width="216" height="72" rx="11" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="768" y="322" fill="#eaf6ff" font-size="14.5" font-weight="700" text-anchor="middle">catalog.redb</text>
  <text x="768" y="341" fill="#9fc9e0" font-size="10.5" text-anchor="middle">skade-katalog &#183; single ACID file</text>
  <text x="768" y="357" fill="#bfe6ff" font-size="10" text-anchor="middle">Iceberg REST-shim catalogue &#183; one writer</text>
  <rect x="654" y="324" width="6" height="8" fill="#6fd3f5"/>
  <rect x="876" y="324" width="6" height="8" fill="#6fd3f5"/>

  <!-- catalog -> tables -->
  <g stroke="#6fd3f5" stroke-width="3" fill="none">
    <path d="M876 332 H920 V200 H960"/>
  </g>
  <circle cx="960" cy="200" r="4" fill="#bfecff"/>

  <!-- ===================== ICEBERG TABLES (right) ===================== -->
  <rect x="900" y="118" width="240" height="290" rx="12" fill="url(#chip)" stroke="#7fc8ea" stroke-width="2"/>
  <text x="1020" y="146" fill="#eaf6ff" font-size="14.5" font-weight="700" text-anchor="middle">Iceberg tables</text>
  <text x="1020" y="164" fill="#9fc9e0" font-size="10" text-anchor="middle">&lt;root&gt;/warehouse/nornir/&lt;table&gt;/data</text>
  <g font-family="'DejaVu Sans Mono', monospace" font-size="10">
    <rect x="920" y="178" width="200" height="20" rx="3" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1"/>
    <text x="932" y="192" fill="#bfe6ff">release_lineage &#183; release_events</text>
    <rect x="920" y="202" width="200" height="20" rx="3" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1"/>
    <text x="932" y="216" fill="#bfe6ff">bench_runs &#183; bench_results</text>
    <rect x="920" y="226" width="200" height="20" rx="3" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1"/>
    <text x="932" y="240" fill="#bfe6ff">dep_graph_edges &#183; funnel_events</text>
    <rect x="920" y="250" width="200" height="20" rx="3" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1"/>
    <text x="932" y="264" fill="#bfe6ff">symbol_facts &#183; call_edges</text>
    <rect x="920" y="274" width="200" height="20" rx="3" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1"/>
    <text x="932" y="288" fill="#bfe6ff">tantivy_* &#183; embeddings &#183; &#8230;</text>
  </g>
  <text x="1020" y="314" fill="#86b3cc" font-size="9.5" text-anchor="middle">append-only &#183; git-SHA-keyed rows</text>
  <text x="1020" y="330" fill="#86b3cc" font-size="9.5" text-anchor="middle">partitioned by repo &#8594; scans prune files</text>
  <text x="1020" y="350" fill="#a9d8ee" font-size="9.5" text-anchor="middle">readable by pyiceberg / DuckDB / Spark</text>
  <text x="1020" y="366" fill="#7fa8c4" font-size="9.5" text-anchor="middle">straight Iceberg layout &#183; no JVM, no SQL server</text>
  <text x="1020" y="392" fill="#7fa8c4" font-size="9.5" text-anchor="middle">data files referenced by absolute file://</text>
  <rect x="894" y="194" width="6" height="8" fill="#6fd3f5"/>

  <!-- snapshot data read into tables (dashed up into the tables box bottom) -->
  <path d="M900 412 H890 V408" stroke="#7fb0cc" stroke-width="2.5" fill="none" stroke-dasharray="6 4"/>

  <!-- ===================== GROUND RAIL: laws ===================== -->
  <rect x="36" y="552" width="320" height="56" rx="10" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2"/>
  <g fill="#0a1c2c" stroke="#7fc8ea" stroke-width="1.5">
    <circle cx="76" cy="580" r="4"/><circle cx="320" cy="580" r="4"/>
  </g>
  <text x="98" y="579" fill="#dff1ff" font-size="14" font-weight="700">laws</text>
  <text x="158" y="576" fill="#bcd9ec" font-size="10.5">append-only &#183; additive-nullable</text>
  <text x="98" y="596" fill="#7fa8c4" font-size="10" font-family="'DejaVu Sans Mono', monospace">idempotent per identity key &#183; one backend</text>
</svg>