Skip to content

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

  1. Parser — Cypher syntax to AST (based on sqlparser)
  2. Planner — Logical plan with optimization passes
  3. Executor — Vectorized physical operators

Runtime

  1. L0 Buffer — In-memory gryf graph for mutations
  2. CSR Cache — Compressed adjacency for O(1) traversal
  3. Property Manager — Lazy loading from Lance

Storage

  1. Lance Datasets — Columnar storage with versioning
  2. WAL — Write-ahead log for durability
  3. Indexes — Vector (HNSW/IVF_PQ), scalar, hash

Object Store

  1. object_store crate for S3/GCS/Azure/local
  2. Local caching for frequently accessed data
  3. 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.