KoruDelta — The Invisible Database
Tagline: "Invisible. Causal. Everywhere."
One-line: KoruDelta gives you Git-like history, Redis-like speed, and distributed consistency—without configuration.
What Makes It Different?
| Feature | SQLite | Redis | PostgreSQL | KoruDelta |
|---|---|---|---|---|
| Zero-config | ✅ | ❌ | ❌ | ✅ |
| Time travel / audit | ❌ | ❌ | ❌ (complex) | ✅ Built-in |
| Vector search | ❌ (extension) | ❌ | ✅ (pgvector) | ✅ Native |
| Causal consistency | ❌ | ❌ | ❌ | ✅ |
| Binary size | ~1MB | ~10MB | ~100MB | ~11MB |
| History retention | ❌ | ❌ | ❌ | ✅ Unlimited |
| Materialized views | ❌ | ❌ | ✅ | ✅ Native |
KoruDelta isn't just another database—it's a time-aware database.
Every write is versioned. Query data as it existed 5 minutes ago. Compare versions with Git-style diffs. Build audit trails without application changes.
Quick Start
# Install (10 seconds)
# Use (0 configuration)
use KoruDelta;
async
Performance
Real benchmarks (MacBook Pro M1, 16GB RAM, SSD):
| Metric | KoruDelta | SQLite (fsync) | Notes |
|---|---|---|---|
| Writes (single) | ~201 ops/sec | ~3,700 ops/sec | KoruDelta: WAL + versioning |
| Writes (batch) | ~3,500 ops/sec* | N/A | 16x faster with put_batch |
| Reads | ~134K ops/sec | ~267K ops/sec | Hot memory cache |
| Binary size | 11MB | 1MB | Single static binary |
| Memory | Configurable | Configurable | 512MB default |
* Batch write: 1000 items in 280ms vs 4.66s for individual writes
Why slower writes? KoruDelta does more:
- Every write creates a version (immutable history)
- Content-addressed deduplication (Blake3 hashes)
- Causal graph tracking
- Automatic memory tier promotion
Batch writes (put_batch) amortize fsync cost across many items, delivering 10-50x speedups for bulk operations.
Trade-off: Speed for superpowers. If you need audit trails, time travel, or causal consistency, KoruDelta eliminates weeks of application development.
Core Features
🕰️ Time Travel (Built-in)
// Every change is versioned forever
let history = db.history.await?;
// Query past state
let past = db.get_at.await?;
// Compare versions
kdelta diff users/alice
Use cases: Audit trails, compliance (HIPAA/GDPR), debugging, undo/redo.
📊 Materialized Views (v2.0.0)
use ViewDefinition;
use ;
let view = ViewDefinition ;
db.create_view.await?;
let results = db.query_view.await?; // Instant
Views persist across restarts and auto-refresh on writes.
🔍 Vector Search (v2.0.0)
use Vector;
// Store embedding
let embedding = new;
db.embed.await?;
// Semantic search
let results = db.embed_search.await?;
Build RAG applications, semantic document search, recommendation engines.
🔔 Real-time Subscriptions
let = db.subscribe.await;
while let Ok = rx.recv.await
🔐 Self-Sovereign Auth
use ;
// Mine an identity (proof-of-work prevents spam)
let identity = mine_identity.await;
// identity.id = public key
// identity.secret_key = private key (keep secure!)
No central authority. Users own their keys.
📦 Workspaces (v2.0.0)
Isolated memory spaces with causal boundaries—like separate databases within one:
use ;
let mut workspaces = new;
// Create isolated workspace
let ws = workspaces.create_workspace;
// Store in workspace (isolated from other workspaces)
workspaces.remember?;
// Search within workspace only
let results = workspaces.recall?;
Use cases: Multi-tenant SaaS, project isolation, sandboxed experiments.
🌐 Browser/WASM
import init from 'koru-delta';
await ;
// Persistent database (IndexedDB)
const db = await ; // In-memory with optional IndexedDB persistence
await db.;
const user = await db.;
// Batch writes for better performance (10-50x faster)
await db.;
// Data survives page refreshes!
When to Use KoruDelta
✅ Perfect For
| Use Case | Why KoruDelta Wins |
|---|---|
| Audit-heavy apps | Built-in versioning, no schema changes |
| Local-first software | Works offline, syncs when online |
| Edge/IoT | 11MB binary, survives power loss |
| AI agents | Vector search + memory tiering |
| Config management | Time travel, easy rollbacks |
| Compliance | Immutable history, cryptographic proofs |
⚠️ Not For
| Use Case | Use Instead |
|---|---|
| 100K+ writes/sec analytics | ClickHouse, TimescaleDB |
| Complex SQL JOINs | PostgreSQL |
| Multi-region active-active | CockroachDB, Spanner |
| Pure caching | Redis |
Architecture
The Secret: Distinction Calculus
KoruDelta is built on koru-lambda-core—a minimal axiomatic system for distributed computation:
- Mathematical guarantees - Safety from formal foundations
- Structural integrity - Can't corrupt by design
- Deterministic operations - Same inputs → same results
- Natural distribution - Consensus emerges from axioms
LCA Architecture (Local Causal Agent)
KoruDelta implements the Local Causal Agent pattern—20 specialized agents, each with a causal perspective in a unified field:
┌─────────────────────────────────────────┐
│ Unified Field (SharedEngine) │
│ Single DistinctionEngine instance │
└─────────────────────────────────────────┘
│ │ │
┌────┘ ┌────┘ ┌────┘
┌───┴───┐ ┌───┴───┐ ┌───┴────┐
│Storage│ │Vector │ │Identity│
│ Agent │ │ Agent │ │ Agent │
└───────┘ └───────┘ └────────┘
All operations follow: ΔNew = ΔLocal_Root ⊕ ΔAction
Each agent:
- Has a
local_root(its causal perspective) - Receives actions (Store, Query, etc.)
- Synthesizes:
new_root = synthesize(local_root, action) - Updates its perspective
Benefits:
- Complete audit trail (every operation leaves a causal trace)
- Content-addressed (same data = same ID everywhere)
- Cross-agent synthesis (combine multiple perspectives)
- Natural distribution (distinctions are universal)
Storage: WAL + Content-Addressed
~/.korudelta/db/
├── wal/000001.wal # Append-only log (immutable)
└── values/ab/cd1234... # Deduplicated by content hash
Benefits:
- O(1) writes (append, not rewrite)
- Crash-safe (never overwrites data)
- Automatic deduplication
- The log IS the history
Memory: Brain-Inspired Tiering
| Tier | Capacity | Access | Eviction |
|---|---|---|---|
| Hot | 10K items | ~400ns | LRU |
| Warm | Recent chronicle | ~1µs | Age-based |
| Cold | Consolidated epochs | ~10µs | Fitness score |
| Deep | Genomic (1KB) | Load on demand | Manual |
Like human memory: frequently used items stay hot, patterns consolidate to deep storage.
CLI Reference
# Basic CRUD
# Time travel
# Views
# Queries
# HTTP API
# Cluster (experimental)
Examples
# Full feature showcase
# Distributed cluster validation
# Stress testing
# Original demos
Project Stats
- 15,000+ lines Rust code
- 463 tests (all passing)
- 0 compiler warnings
- 11MB binary size
- Cross-platform: Linux, macOS, Windows, WASM
Distributed Status
Current (v3.0.0): Full cluster support in native Rust. Python bindings have cluster support. WASM is single-node.
| Platform | Cluster Support | Notes |
|---|---|---|
| Rust (native) | ✅ Full | TCP-based clustering with live replication |
| Python | ✅ Full | Same as Rust via PyO3 bindings |
| WASM (Browser/Node.js) | ❌ N/A | Single-node only (WebSocket cluster planned) |
| Feature | Status |
|---|---|
| Node discovery | ✅ Working |
| Initial sync on join | ✅ Working |
| Live replication | ✅ Working |
| Gossip protocol | ✅ Working |
| HTTP API | ✅ Working |
Security
- Auth: Proof-of-work identity mining (prevents spam)
- Crypto: Ed25519 signatures, Blake3 hashing
- Model: Self-sovereign (users own keys, no central auth server)
- TLS: Recommended for HTTP API (use reverse proxy)
Operations
# Resource limits (via code)
Monitoring: Structured logs via tracing. Prometheus metrics planned for future release.
Contributing
See CONTRIBUTING.md and ARCHITECTURE.md.
License
MIT OR Apache-2.0
Links
- GitHub
- Design - Philosophy and decisions
- Architecture - Technical deep dive
- CLI Guide - Complete command reference
KoruDelta: Where data meets history, and simplicity meets power.