Internals¶
Deep dive into Uni's implementation details.
### [Vectorized Execution](vectorized-execution.md)
Batch processing, Arrow integration, and SIMD-accelerated operations.
### [Storage Engine](storage-engine.md)
Lance integration, LSM design, and the L0/L1/L2 layer architecture.
### [Query Planning](query-planning.md)
Planner internals, optimization passes, and physical plan generation.
### [Benchmarks](benchmarks.md)
Performance measurements, methodology, and comparison data.
Implementation Overview¶
Uni's internals are organized into four major subsystems:
Query Processing¶
- Parser — Cypher syntax to AST (based on sqlparser)
- Planner — Logical plan with optimization passes
- Executor — Vectorized physical operators
Runtime¶
- L0 Buffer — In-memory gryf graph for mutations
- CSR Cache — Compressed adjacency for O(1) traversal
- Property Manager — Lazy loading from Lance
Storage¶
- Lance Datasets — Columnar storage with versioning
- WAL — Write-ahead log for durability
- Indexes — Vector (HNSW/IVF_PQ), scalar, hash
Object Store¶
- object_store crate for S3/GCS/Azure/local
- Local caching for frequently accessed data
- Manifest files for snapshot isolation
Key Design Decisions¶
| Decision | Rationale |
|---|---|
| Vectorized execution | 100-500x faster than row-at-a-time |
| Lance for storage | Native vector indexes + versioning |
| gryf for in-memory | Fast graph algorithms in Rust |
| Single-writer model | Simplicity over distributed complexity |
Next Steps¶
Start with Vectorized Execution to understand how queries are processed.