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

nordisk/korp-collectors

.nornir/assets/collectors-daemon.svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 800" 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="#0c1320"/><stop offset="1" stop-color="#070b14"/>
    </linearGradient>
    <linearGradient id="daemon" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#132535"/><stop offset="1" stop-color="#0d1a26"/>
    </linearGradient>
    <linearGradient id="pOff"  x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#1a2432"/><stop offset="1" stop-color="#121a26"/></linearGradient>
    <linearGradient id="pWork" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#5a4410"/><stop offset="1" stop-color="#3d2e08"/></linearGradient>
    <linearGradient id="pOn"   x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#12492f"/><stop offset="1" stop-color="#0c3320"/></linearGradient>
    <marker id="ar" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto"><path d="M0,0 L7,3 L0,6 Z" fill="#5b7089"/></marker>
    <filter id="soft" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="3" stdDeviation="4" flood-color="#000" flood-opacity="0.45"/></filter>
  </defs>

  <rect x="0" y="0" width="1280" height="800" fill="url(#board)" rx="16"/>
  <text x="40" y="50" fill="#e8eef7" font-size="26" font-weight="700">korp Collectors — the daemon architecture</text>
  <text x="40" y="78" fill="#7d8ca3" font-size="14.5">A collector is a CONTINUOUS DAEMON (a jera never-ending job) that strives to hold ONLINE for everything in its config · two traits: Config + State</text>

  <!-- CONFIG face -->
  <g filter="url(#soft)">
    <rect x="40" y="110" width="300" height="96" rx="13" fill="#122033" stroke="#2a4056"/>
    <text x="58" y="138" fill="#cfe0f2" font-size="15" font-weight="700">⚙ Settings ▸ Collectors</text>
    <text x="58" y="162" fill="#9fb0c4" font-size="12.5">CONFIG trait — enable on/off · custom config</text>
    <text x="58" y="182" fill="#9fb0c4" font-size="12.5">· region PICK-LIST (from the planet catalog)</text>
    <text x="58" y="200" fill="#6f8097" font-size="11.5">persisted in korp settings JSON</text>
  </g>
  <line x1="340" y1="158" x2="392" y2="158" stroke="#5b7089" stroke-width="2" marker-end="url(#ar)"/>

  <!-- DAEMON: the state machine -->
  <g filter="url(#soft)">
    <rect x="392" y="110" width="470" height="150" rx="14" fill="url(#daemon)" stroke="#2f5a7a" stroke-width="1.5"/>
    <text x="410" y="134" fill="#dbe6f2" font-size="14" font-weight="700">Collector daemon — a jera NEVER-ENDING job</text>
    <text x="410" y="153" fill="#7d8ca3" font-size="11.5">state machine · restart-safe · "not online yet" is a FACT, not an error</text>
    <!-- state pills -->
    <g font-size="10.5" text-anchor="middle" font-weight="700">
      <rect x="408" y="170" width="70" height="30" rx="8" fill="url(#pOff)"  stroke="#33404f"/><text x="443" y="189" fill="#c3d0de">Offline</text>
      <rect x="486" y="170" width="90" height="30" rx="8" fill="url(#pWork)" stroke="#f0b429"/><text x="531" y="185" fill="#ffedc4">Downloading</text><text x="531" y="196" fill="#d8bd88" font-size="9">planet %</text>
      <rect x="584" y="170" width="80" height="30" rx="8" fill="url(#pWork)" stroke="#f0b429"/><text x="624" y="185" fill="#ffedc4">Indexing</text><text x="624" y="196" fill="#d8bd88" font-size="9">regions</text>
      <rect x="672" y="170" width="76" height="30" rx="8" fill="url(#pWork)" stroke="#f0b429"/><text x="710" y="185" fill="#ffedc4">Cutting</text><text x="710" y="196" fill="#d8bd88" font-size="9">tiles %</text>
      <rect x="756" y="170" width="66" height="30" rx="8" fill="url(#pOn)" stroke="#34d17e"/><text x="789" y="189" fill="#dff6e8">Online</text>
    </g>
    <g stroke="#5b7089" stroke-width="1.6">
      <line x1="478" y1="185" x2="485" y2="185" marker-end="url(#ar)"/>
      <line x1="576" y1="185" x2="583" y2="185" marker-end="url(#ar)"/>
      <line x1="664" y1="185" x2="671" y2="185" marker-end="url(#ar)"/>
      <line x1="748" y1="185" x2="755" y2="185" marker-end="url(#ar)"/>
    </g>
    <rect x="486" y="220" width="120" height="26" rx="8" fill="#3a1416" stroke="#e5484d"/><text x="546" y="237" fill="#ffd7d8" font-size="10.5" text-anchor="middle" font-weight="700">Degraded / Failed</text>
    <text x="620" y="237" fill="#6f8097" font-size="10">off any state · carries {reason}</text>
  </g>

  <!-- STATE face: infra matrix -->
  <g filter="url(#soft)">
    <rect x="900" y="110" width="340" height="150" rx="14" fill="#101d2b" stroke="#2a4056"/>
    <text x="918" y="134" fill="#cfe0f2" font-size="15" font-weight="700">🟦 Infra ▸ Collectors matrix</text>
    <text x="918" y="153" fill="#7d8ca3" font-size="11.5">STATE trait · click a cell → expand its Facet</text>
    <g font-size="10" text-anchor="middle" font-weight="700">
      <rect x="918" y="166" width="70" height="26" rx="6" fill="#12492f" stroke="#34d17e"/><text x="953" y="183" fill="#dff6e8">map ●</text>
      <rect x="996" y="166" width="70" height="26" rx="6" fill="#12492f" stroke="#34d17e"/><text x="1031" y="183" fill="#dff6e8">energy ●</text>
      <rect x="1074" y="166" width="70" height="26" rx="6" fill="#5a4410" stroke="#f0b429"/><text x="1109" y="183" fill="#ffedc4">boats ◐</text>
      <rect x="1152" y="166" width="70" height="26" rx="6" fill="#1a2432" stroke="#33404f"/><text x="1187" y="183" fill="#c3d0de">planes ○</text>
    </g>
    <text x="918" y="214" fill="#9fb0c4" font-size="11">green=online · amber=working · grey=off · red=failed</text>
    <text x="918" y="234" fill="#6f8097" font-size="10.5">expand → phase · progress % · tiles written · last run · bucket</text>
  </g>
  <line x1="862" y1="150" x2="898" y2="150" stroke="#5b7089" stroke-width="2" marker-end="url(#ar)"/>

  <!-- STORAGE: both backends -->
  <text x="40" y="300" fill="#7d8ca3" font-size="13" font-weight="700">STORAGE — every collector gets BOTH</text>
  <g filter="url(#soft)">
    <rect x="40" y="312" width="400" height="86" rx="13" fill="#0f2a1e" stroke="#1f7a4d"/>
    <text x="58" y="338" fill="#9fe6bf" font-size="14" font-weight="700">S3 bucket(s) — rustfs infra</text>
    <text x="58" y="360" fill="#8fbfa6" font-size="12">servable artifacts: nordisk-maps/&lt;region&gt;/tiles/z/x/y.parquet</text>
    <text x="58" y="380" fill="#6f9a84" font-size="11">the map serves these; client disk-caches (500 MB LRU)</text>
  </g>
  <g filter="url(#soft)">
    <rect x="462" y="312" width="400" height="86" rx="13" fill="#221a2e" stroke="#6a4fb0"/>
    <text x="480" y="338" fill="#d9c9f0" font-size="14" font-weight="700">on-disk — ~/.korp/collectors/&lt;name&gt;/</text>
    <text x="480" y="360" fill="#b7a6d4" font-size="12">random-access data dumb to keep in S3:</text>
    <text x="480" y="380" fill="#9a86bd" font-size="11">planet.pbf · region catalog · caches · batched intermediates</text>
  </g>
  <line x1="470" y1="260" x2="300" y2="310" stroke="#5b7089" stroke-width="1.6" marker-end="url(#ar)"/>
  <line x1="620" y1="260" x2="660" y2="310" stroke="#5b7089" stroke-width="1.6" marker-end="url(#ar)"/>

  <!-- TORRENT + catalog note -->
  <g filter="url(#soft)">
    <rect x="900" y="312" width="340" height="86" rx="13" fill="#122033" stroke="#2a4056"/>
    <text x="918" y="338" fill="#cfe0f2" font-size="13.5" font-weight="700">planet → regions (the map collector)</text>
    <text x="918" y="358" fill="#9fb0c4" font-size="11.5">torrent (librqbit, MOVED into the collector) caches</text>
    <text x="918" y="374" fill="#9fb0c4" font-size="11.5">the planet → osm-katana enumerates a REGION CATALOG</text>
    <text x="918" y="390" fill="#6f8097" font-size="10.5">query "what regions?" from the catalog, never re-scan</text>
  </g>

  <!-- BIOS bus + logs -->
  <text x="40" y="446" fill="#7d8ca3" font-size="13" font-weight="700">TWO LOGS</text>
  <g filter="url(#soft)">
    <rect x="40" y="458" width="760" height="150" rx="13" fill="#0a121c" stroke="#26303f"/>
    <text x="58" y="484" fill="#cfe0f2" font-size="14" font-weight="700">BIOS status bus — pure facts, tunes in over time (never blocks/invalidates startup)</text>
    <g font-family="'DejaVu Sans Mono',monospace" font-size="12">
      <text x="58" y="512" fill="#d8bd88">collector map:    not online yet (planet 12%)</text>
      <text x="58" y="532" fill="#d8bd88">collector map:    indexing regions…</text>
      <text x="58" y="552" fill="#9fe6bf">collector energy: ONLINE</text>
      <text x="58" y="572" fill="#9fe6bf">collector map:    ONLINE</text>
    </g>
    <text x="58" y="596" fill="#6f8097" font-size="11">+ the NORMAL work log per collector (the jera job log): detailed progress, warnings, errors</text>
  </g>

  <!-- bencher -->
  <g filter="url(#soft)">
    <rect x="820" y="458" width="420" height="150" rx="13" fill="#101d2b" stroke="#2a4056"/>
    <text x="838" y="484" fill="#cfe0f2" font-size="14" font-weight="700">Bencher — tiling uses ALL cores</text>
    <text x="838" y="508" fill="#9fb0c4" font-size="12">proves tile_region saturates cores via znippy-zoomies</text>
    <text x="838" y="526" fill="#9fe6bf" font-size="12" font-weight="700">gatling fork-join — NOT rayon</text>
    <text x="838" y="548" fill="#9fb0c4" font-size="12">heavy (Sweden-scale) + non-heavy (CI fixture)</text>
    <text x="838" y="572" fill="#6f8097" font-size="11">bencher law: host = a new row, same-window compares only</text>
    <text x="838" y="592" fill="#6f8097" font-size="11">"has a bencher" is the gate; "fast enough" is not</text>
  </g>

  <text x="40" y="648" fill="#7d8ca3" font-size="12.5" font-weight="700">Build order:</text>
  <text x="120" y="648" fill="#9fb0c4" font-size="12.5">1 jera daemon-job kind → 2 traits + CollectorCtx → 3 osm-cut + bencher → 4 Settings + infra matrix → 5 adopt existing collectors (DCAT-AP-SE · PxWeb · ENTSO-E · REST)</text>
  <text x="40" y="676" fill="#55637a" font-size="11.5">Urgent + independent: un-blank the map FIRST — fix object.rs local-vs-tiled + the silent empty roster so the tiles already in the bucket render.</text>
</svg>