The Unified Hybrid-Search
Database Engine
Driving "Search Everything" capabilities and AI Context Optimization through an atomic, embedded, leaderless architecture. Unifies Key-Value, Document, and Full-Text Search to fuel the next generation of AI infrastructure.
article Executive Summary
Modern applications typically require three data layers: a durable Key-Value store for transactional speed, a Document store for structured data, and a Search Engine for complex queries. CameoDB fuses these paradigms—Key-Value, Document, and Full-Text Search—into a single unified engine, unlocking search everything capabilities without synchronization overhead.
CameoDB enables "Search Everything" and AI context workflows by integrating an ACID-compliant Key-Value store (Redb), a flexible Document model, and a high-performance Full-Text Search engine (Tantivy) into one atomic, leaderless binary. This hybrid architecture provides the foundation for modern AI platforms, delivering unified knowledge base management and context optimization. By leveraging the Rust 2024 ecosystem and an Actor-based architecture, CameoDB delivers microsecond latency, zero-copy serialization, and operational simplicity for edge and cloud-native workloads.
Search Everything & AI Context
In traditional architectures, writing data involves a "dual-write" problem: you write to the database, then asynchronously update the search index. This creates a state where search results are stale or inconsistent with the primary store, undermining real-time AI applications. CameoDB solves this by natively providing instant, unified search across all your data, ensuring your AI context and knowledge base are always accurate and up-to-date.
warning Traditional Stack
- close Two entirely separate clusters to manage and scale independently.
- close Eventual consistency lag between database writes and search availability.
- close Complex failure recovery and distributed transaction management.
check_circle CameoDB Solution
- check Single statically compiled binary with embedded storage.
- check Atomic writes guaranteeing KV and Search Index remain perfectly synced.
- check Shared-nothing architecture for simple horizontal scaling.
The Hybrid Storage Engine
At the core of CameoDB is a specialized storage engine that unifies three paradigms—Key-Value storage (Redb), Document modeling, and Full-Text Search (Tantivy)—into a single atomic unit. This ensures that if a document is durably stored, it is also instantly indexed, unlocking search everything capabilities without synchronization overhead.
The Atomic Write Pipeline
Sequence & WAL
A monotonic sequence ID is generated. The operation is serialized and written to the Write-Ahead Log (WAL) inside Redb for durability.
KV Insert
The document body is inserted into the Redb Data Table. This provides extremely fast O(log N) point retrieval by ID.
Tantivy Indexing
The document fields are parsed and added to the in-memory Tantivy IndexWriter for full-text search availability.
Dual Commit
The Redb transaction commits (fsync). Tantivy performs a smart commit based on memory budget. Data is fully recoverable.
Leaderless Distributed Mesh
CameoDB adopts a Self-Sovereign Identity model. There are no master nodes to become bottlenecks. Every node is capable of routing, writing, and reading.
Topology & Consistent Hashing
To ensure uniform distribution without hotspots, CameoDB utilizes a Consistent Hash Ring with 256 Virtual Nodes (VNodes) per physical node.
Smart Routing Strategies
The internal `RouterActor` dynamically chooses between Unicast and Scatter-Gather based on the request context, ensuring optimal cluster performance.
Unicast (Targeted)
O(1) NodeUsed when a `routing_key` or `id` is provided. Sent directly to the owner via libp2p.
> Hash("123") -> Node B
> Node A -> Node B (Direct)
Scatter-Gather
O(N) NodesUsed for broad search queries. The router fans out the request, aggregates, and sorts.
> Node A -> [A, B, C]
> Aggregate & Sort Hits
Engineered for Speed
CameoDB is built on Rust 2024, leveraging the Actor Model (Kameo) to ensure fault isolation. A critical architectural choice is the strict separation of Async and Sync workloads.
The `spawn_blocking` Firewall
Storage I/O (Redb/Tantivy) is strictly isolated in blocking thread pools. The network/actor runtime (Tokio/Axum) remains purely async. This prevents heavy disk writes from stalling HTTP request handling, keeping P99 latency ultra-low even during massive bulk ingestions.
Why Invest in CameoDB?
Fuses Key-Value, Document, and Full-Text Search into a single atomic engine. Replaces three distinct infrastructure components with one self-contained, easy-to-manage binary.
Unified knowledge base management and context optimization for modern AI platforms. Powers next-generation efficiency for AI infrastructure by providing instant, searchable context.
Written in Rust 2024 with safety built-in. No JVM. No Garbage Collection pauses. Significantly smaller memory footprint. Microsecond latency with zero-copy serialization.