OxiDB is a fast, embeddable document database engine written in Rust. It supports both SQL and JSON-based queries, making it versatile for many use cases — from embedded applications to microservices.

Why OxiDB?

Traditional databases often require complex setup, schema migrations, and separate server processes. OxiDB takes a different approach:

  • Zero schema — insert any JSON document without defining tables or columns
  • Embeddable — use it as a library directly in your application, or run it as a standalone server
  • Fast — written in Rust with zero-cost abstractions, achieving 450K inserts/sec and sub-microsecond indexed lookups
  • Full-featured — ACID transactions, full-text search, aggregation pipeline, blob storage, and more
  • Multi-language — client libraries for Python, Go, .NET, Java/Spring Boot, Julia, and Swift

Key Features at a Glance

FeatureDescription
Document StorageSchema-free JSON documents with auto-created collections
Query EngineRich operators: $eq, $gt, $lt, $in, $exists, $and, $or
IndexesBTree field indexes, composite indexes, text indexes
TransactionsACID with Optimistic Concurrency Control (OCC)
AggregationPipeline: $match, $group, $sort, $project, $lookup, $unwind
Full-Text SearchTF-IDF ranking with HTML, PDF, DOCX, and OCR support
Blob StorageS3-style bucket API for binary objects
SecuritySCRAM-SHA-256 auth, RBAC, TLS, AES-GCM encryption

Quick Start

Install the Python client:

pip install oxidb

Connect and insert your first document:

from oxidb import OxiDbClient

db = OxiDbClient("127.0.0.1", 4444)

# Insert a document — collection is auto-created
db.insert("users", {"name": "Alice", "age": 30, "role": "engineer"})

# Query it back
users = db.find("users", {"name": "Alice"})
print(users)
# [{"_id": "...", "name": "Alice", "age": 30, "role": "engineer"}]

db.close()
OxiDB auto-creates collections on first insert. No schema setup, no migrations — just insert and query.

Architecture Overview

Under the hood, OxiDB uses several key design choices that make it fast and reliable:

  • Append-only storage — new data is always appended, never overwritten, ensuring data integrity
  • Write-Ahead Log (WAL) — all writes go to WAL first with CRC32 checksums for crash recovery
  • In-memory document cache — documents are deserialized once and cached as Arc<Value> with reference counting
  • Per-collection lockingRwLock per collection enables concurrent reads without global locking

Whether you're building an embedded application, a microservice, or a prototype, OxiDB gives you a powerful database with minimal overhead. Read on to explore each feature in detail.