[H] HyperspaceDB
Fastest Vector Database for Hierarchical & Flat Data written in Rust.
HyperspaceDB natively supports both the Poincarรฉ ball model (for hierarchies) and Euclidean space (for standard OpenAI/BGE embeddings), delivering extreme performance through specialized SIMD kernels.
๐ Key Features
- โก๏ธ Extreme Performance: Built with Nightly Rust and SIMD intrinsics for maximum search throughput.
- ๐ Cognitive Math Engine: Hyperbolic HNSW optimized for the Poincarรฉ and Lorentz metrics, and O(N) Wasserstein-1 logic.
- ๐ฆ Compression: Integrated
ScalarI8andBinaryquantization reduces memory footprint by 87% to 98%. - ๐งต Async Write Pipeline: Decoupled ingestion with a background indexing worker and WAL for 10x faster inserts.
- ๐ฅ๏ธ Mission Control TUI: Real-time terminal dashboard for monitoring QPS, segments, and system health.
- ๐ธ๏ธ Edge Ready: WASM compilation target allows running the full DB in browser with Local-First privacy and IndexedDB persistence.
- ๐ ๏ธ Runtime Tuning: Dynamically adjust
ef_searchandef_constructionparameters via gRPC on-the-fly. - ๐ Multi-Tenancy: Native SaaS support with namespace isolation (
user_id) and billing stats. - ๐ Replication: Leader-Follower architecture with Anti-Entropy catch-up for high availability.
- โ๏ธ Cognitive Math & Tribunal Router: Native SDK utilities for calculating geometric trust scores on graphs to detect LLM hallucinations.
- ๐ก Memory Reconsolidation: Trigger AI sleep mode natively within the DB to restructure vectors via Flow Matching / Riemannian SGD.
๐ Architecture
HyperspaceDB follows a Persistence-First, Index-Second design:
- gRPC Request: Insert/Search commands arrive via a high-performance Tonic server.
- WAL & Segmented Storage: Every insert is immediate persisted to a Write-Ahead Log and a memory-mapped segmented file store.
- Background Indexer: The HNSW graph is updated asynchronously by a dedicated thread-pool, ensuring 0ms search blocking.
- Snapshots: Real-time graph topology is periodically serialized using
rkyvfor near-instant restarts.
๐ Quick Start
1. Build and Start Server
Make sure you have just and nightly rust installed.
cargo build --release
./target/release/hyperspace-server
2. Launch Dashboard
./target/release/hyperspace-cli
3. Use Python SDK
pip install ./sdks/python
from hyperspace import HyperspaceClient
client = HyperspaceClient("localhost:50051")
client.insert(vector=[0.1]*8, metadata={"category": "tech"})
results = client.search(vector=[0.11]*8, top_k=5)
๐ Performance Benchmarks
Tested on M4 Pro (Emulated), 1M Vectors (8D)
- Insert Throughput: ~156,000 vectors/sec (Sustained)
- Search Latency: ~2.47ms (156,000 QPS) @ 1M scale
- Storage Efficiency: Automatic segmentation + mmap
"The 1 Million Challenge"
HyperspaceDB successfully handles 1,000,000 vectors with zero degradation compared to traditional vector DBs, maintaining 156,000 QPS at the 1M scale.
๐ License
AGPLv3 ยฉ YARlabs