ARCHOS 525 BLUEPRINT · /d/dgm_int-sqlite
SQLite Internals (Single-File B-Tree, WAL Mode & Single Writer)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_int-sqlite) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-sqlite)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-sqlite" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="SQLite Internals (Single-File B-Tree, WAL Mode & Single Writer) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Embedded / Edge App"]
n1_1["SQL Compiler & VDBE"]
n2a_2[("Page Cache")]
n2b_3[("WAL & Checkpointer")]
n3_4[("Single .db File")]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Exec VDBE · In-Proc"| n1_1
n1_1 -->|"2a. Read page · RAM"| n2a_2
n1_1 -.->|"2b. Append WAL · FS"| n2b_3
n2a_2 -->|"3a. Checkpoint · POSIX"| n3_4
n2b_3 -->|"3b. Sync · Control"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Embedded / Edge AppSTATELESSIn-process C library calls
- SQL Compiler & VDBESTATELESSBytecode VM query execution
- Page CacheSTATEFUL4KB B-tree pages + mmap
- WAL & CheckpointerSTATEFULAppend WAL + reader snapshots
- Single `.db` FileSTATEFULACID B-tree + Litestream S3
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Embedded / Edge App → SQL Compiler & VDBE (Exec VDBE)[In-Proc]
- SQL Compiler & VDBE → Page Cache (Read page)[RAM]
- SQL Compiler & VDBE → WAL & Checkpointer (Append WAL)[FS]
- Page Cache → Single `.db` File (Checkpoint)[POSIX]
- WAL & Checkpointer → Single `.db` File (Sync)[Control]
- Single `.db` File → Downstream & OTel (Emit /)[OTLP/API]