Contents
System Architecture
A deep dive into the internals of SoliDB, built with Rust for performance and safety.
Overview
SoliDB is a high-performance, distributed, multi-model database. It features a layered architecture that separates network handling, query processing, clustering logic, and storage.
Axum & Tokio
Sharding & Raft
SDBQL Engine
RocksDB
Technology Stack
Core
- Rust: Memory safety and performance without garbage collection.
- Tokio: Asynchronous runtime for handling high concurrency.
Storage
- RocksDB: Embedded key-value store optimized for fast storage.
- Sled: Experimental support for pure-Rust storage engine.
Networking
- Axum: Ergonomic and modular web framework.
- Reqwest: HTTP client for cluster communication.
Tools
- Clap: Command-line argument parser.
- Serde: Serialization framework for JSON handling.
Project Structure
Storage Layer
The storage layer is an abstraction over RocksDB. It handles document serialization, index management, and atomic operations.
Documents
Stored as JSON bytes. Key format:
collection/key.
Indexes
Secondary indexes stored in separate column families for efficient lookups.
SDBQL Engine
The SDBQL (SoliDB Query Language) engine parses query strings into an Abstract Syntax Tree (AST), optimizes the execution plan, and executes it against the storage layer.
Server & API
Built on Axum, the server handles HTTP requests, authentication middleware, and routing to appropriate handlers.
Cluster & Replication
Nodes form a mesh network. Data is replicated updates are propagated to peers. The system uses a leader-follower model for sharded collections.