1.0 KiB
1.0 KiB
0001 Storage Engine And Source Generation
Status
Accepted
Context
CBDD targets embedded workloads where predictable latency and low operational overhead are priorities. Runtime reflection and remote database dependencies increase startup and runtime variance for this workload profile.
Decision
- Use an embedded storage engine with page-based persistence and WAL-backed transactions.
- Use compile-time source generation for mapping instead of runtime reflection.
- Keep query and indexing execution in-process for deterministic behavior.
Consequences
Positive:
- Lower runtime allocation and startup overhead.
- Strong control over transaction and recovery behavior.
- Predictable deployment for local/offline workloads.
Trade-offs:
- Greater maintenance burden for custom storage/query engine internals.
- Source generator complexity requires dedicated regression coverage.