CAMEODB
Technical Report 2026

The Unified Hybrid-Search
Database Engine

Eliminating the "Sync Gap" between primary storage and search indices through an atomic, embedded, leaderless architecture.

article Executive Summary

Modern applications typically require two data layers: a durable Key-Value store (like Redis or DynamoDB) for transactional speed, and a Search Engine (like Elasticsearch) for complex queries. Keeping these systems synchronized is a notorious source of engineering complexity, data inconsistency, and operational cost.

CameoDB solves this by fusing an ACID-compliant Key-Value store (Redb) with a high-performance Full-Text Search engine (Tantivy) into a single, leaderless binary. 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.

01

The Sync Gap Problem

In traditional architectures, writing data involves a "dual-write" problem. You write to the database, then asynchronously update the search index. This gap creates a state where search results are stale or inconsistent with the primary store.

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.
02

The Hybrid Storage Engine

At the core of CameoDB is a specialized storage engine that treats Redb (embedded KV) and Tantivy (Search) as a single atomic unit. This ensures that if a document is durably stored, it is also instantly indexed.

account_tree

The Atomic Write Pipeline

1
Sequence & WAL

A monotonic sequence ID is generated. The operation is serialized and written to the Write-Ahead Log (WAL) inside Redb for durability.

2
KV Insert

The document body is inserted into the Redb Data Table. This provides extremely fast O(log N) point retrieval by ID.

3
Tantivy Indexing

The document fields are parsed and added to the in-memory Tantivy IndexWriter for full-text search availability.

4
Dual Commit

The Redb transaction commits (fsync). Tantivy performs a smart commit based on memory budget. Data is fully recoverable.

03

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.

memory
Deterministic Routing Keys are hashed (XXH3) to a u64 token. The ring lookup is executed in O(log N) time.
sync
Minimal Rebalancing When a node joins or leaves, only ~1/N keys need to move, preventing "thundering herd" network saturation.

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) Node

Used when a `routing_key` or `id` is provided. Sent directly to the owner via libp2p.

> PUT /doc/123
> Hash("123") -> Node B
> Node A -> Node B (Direct)

Scatter-Gather

O(N) Nodes

Used for broad search queries. The router fans out the request, aggregates, and sorts.

> POST /search "query"
> Node A -> [A, B, C]
> Aggregate & Sort Hits
04

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.

bolt

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.

05

Why Invest in CameoDB?

layers
Simplification

Replaces two distinct infrastructure components (DB + Search) with one self-contained, easy-to-manage binary.

bolt
Efficiency

Written in Rust with safety built-in. No JVM. No Garbage Collection pauses. Significantly smaller memory footprint.

transform
Adaptability

High scalability with a tunable footprint. Runs seamlessly on edge hardware, yet scales effortlessly to massive clouds.

Start building the future of data.