TapirusDB
The Embedded Cognitive Memory & Multi-Model Engine for Sovereign AI & Edge Systems
Sub-Microsecond Agent Memory • openCypher Knowledge Graphs • Vector Search • Relational SQL • Documents
Single Encrypted .tapir File • 100% Safe Rust • < 4 MB Idle RAM • Zero Cloud Daemons
"Stop stitching Pinecone, Neo4j, and SQLite together."
TapirusDB is the high-performance, embedded cognitive memory engine for local AI agents, robotics, and sovereign edge hardware. It collapses vector similarity, knowledge graphs, relational metadata, and JSON documents into a single encrypted.tapirfile with sub-microsecond in-process retrieval ($0.55\ \mu\text{s}$) and zero memory corruption risk.
🖥️ Need a Visual Database Manager (like phpMyAdmin or Supabase Studio)?
Use Tapirus Studio — our free visual GUI companion for TapirusDB!
• 🌐 Run Instant In-Browser: tapirusdb.com/studio (Zero installation required)
• ⬇️ Official Download Landing Page: tapirusdb.com/download.html (Windows, macOS, Linux, CLI)
• 📦 Releases & Binary Downloads: github.com/tapiruslab/TapirusDB/releases
• 💻 Studio Source Code Directory: github.com/tapiruslab/TapirusDB/tree/main/studio
Why TapirusDB? (Kill the "Frankenstack")
Modern AI and edge developers are forced into Fragmented Polyglot Persistence—gluing together multiple complex, heavy databases across network boundaries:
Highlights
- 🦀 100% Pure Safe Rust (
#![forbid(unsafe_code)]): Guaranteed memory safety at compile-time. Zero buffer overflows, zero dangling pointers, zero use-after-free vulnerabilities, and zero C/C++ memory corruption CVEs. - 📦 True In-Process Architecture (Zero-IPC): Compiles and links directly into your binary (Rust, Python, TypeScript, C/C++, Go). No background database servers (
mysqld,postgres,mongod), zero network serialization overhead, and sub-microsecond in-memory query traversal. - ⚡ Quad-Model Data Consolidation: Seamlessly unifies Relational SQL-92, HNSW & IVF Vector Search, openCypher Property Graphs, and MongoDB-style JSON Documents inside a single B+Tree slotted-page file.
- 🧠 Production GraphRAG & AI Memory: Built-in seed-and-traverse GraphRAG with Tri-Modal Reciprocal Rank Fusion (RRF), episodic memory with exponential temporal decay, and isolated agent namespaces.
- 🎯 Dynamic 16-Lane SIMD & RaBitQ 32x Quantization: Parallel AVX-512 / AVX2 / NEON vector kernels combined with Fast Walsh-Hadamard 1-bit/2-bit random rotation quantization, reducing 1536-D embeddings from 6,144 bytes to 196 bytes with single-cycle
POPCNTdistance evaluation. - 🕸️ Compressed Sparse Row (CSR) Topology & openCypher: Contiguous adjacency arrays on disk and in memory for zero-allocation slice neighbor sweeps, paired with standard declarative openCypher syntax (
MATCH ... WHERE ... RETURN ...). - 🔒 Native ChaCha20-Poly1305 AEAD Encryption: Zero-overhead authenticated page-level encryption with SHA-256 key derivation and constant-time Key Check Value (KCV) verification.
- 🌐 S3/R2 Remote Range Streaming: On-demand 4KB page streaming directly from cloud object stores via HTTP Range requests with zero local disk footprint.
- 🤖 Native Model Context Protocol (MCP): Out-of-the-box stdio JSON-RPC 2.0 server (
tapirus mcp) for Claude Desktop, Cursor, and Gemini autonomous agents.
Table of Contents
- Why TapirusDB? (Kill the "Frankenstack")
- Highlights & Technical Advantages
- Quickstart & 30-Second Code
- Beyond AI: Classic Applications (SQLite & Mongo Alternative)
- High-Impact Domains (Research, Analytics, IoT)
- Architectural Comparison vs Polyglot Frankenstack
- Core Technical Pillars (SIMD, CSR, RaBitQ, ChaCha20)
- Industrial Edge & Autonomous Systems
- Developer Tooling & MCP Server
- Verified Benchmarks & Latency Comparison
- When (and When NOT) to Use TapirusDB
- Formal Safety Verification (TLA+)
- Roadmap: Tapisaurus Distributed Continuum
- Documentation & Architectural Specs
Quickstart
1. Installation
Official Downloads Hub & Visual Studio
- ⬇️ Official Download Landing Page: tapirusdb.com/download.html (Windows, macOS, Linux, CLI)
- 🖥️ Tapirus Studio (Free GUI): Run Live in Browser • Studio Source Code (GitHub)
- 📦 Pre-Compiled Binary Assets: GitHub Releases
Supported Platforms & Distributions
TapirusDB is 100% self-contained with zero cloud or daemon dependencies. Pre-compiled binaries run out-of-the-box across:
| Platform Family | Architecture | Supported Operating Systems & Distros |
|---|---|---|
| Linux (Universal glibc) | x86_64, aarch64 |
Debian, Ubuntu, Fedora, RHEL, CentOS, Rocky Linux, AlmaLinux, Arch Linux, openSUSE, Amazon Linux 2/2023 |
| Linux (musl & Containers) | x86_64, aarch64 |
Alpine Linux, Docker / OCI (ghcr.io/tapiruslab/tapirusdb), Embedded Linux / IoT |
| macOS | Apple Silicon & Intel | macOS 12+ (Monterey, Ventura, Sonoma, Sequoia) |
| Windows | x86_64 |
Windows 10, Windows 11, Windows Server 2019/2022/2025 |
| WebAssembly (WASM) | wasm32 |
All modern web browsers (Chrome, Edge, Safari, Firefox) via Tapirus Studio |
Package Managers (Terminal & CLI)
# macOS & Linux (Homebrew)
# Windows (Windows Package Manager)
# (Or 'winget install tapirus' once indexed in Microsoft community repo)
# Linux / macOS Automated Script
|
# Windows PowerShell Automated Script
|
Language SDKs & Client Libraries
# Rust Engine
# Python SDK (Python 3.9+)
# Node.js & TypeScript SDK
# Bun Runtime
# Go SDK
# PHP Composer
# OCI Container (Docker & Podman)
Official Ecosystem & Registry Matrix
💡 Looking for FFI integration, C-ABI bindings, or native shared libraries? See the Multi-Language SDK & FFI Guide.
2. Code in 30 Seconds
Rust: Relational SQL & AI Vector Search
use ;
Rust: Declarative openCypher Graph Pattern Matching
use ;
Rust: Bidirectional Graph-Vector Chaining & AI Agent Memory
use ;
use DistanceMetric;
Python: Clean Native Integration
# ACID Transaction
# Direct Python dictionary results
=
# [{'id': 1, 'sensor': 'temperature', 'value': 23.8}]
Node.js & TypeScript: Zero-Daemon Embedded Database
// Install: npm install tapirus
// Run script: node app.mjs
import from "tapirus";
const db = ;
// Relational SQL
db.;
db.;
// Query rows as JSON objects
const rows = db.;
console.log; // [ { id: 1, raw: "INSERT INTO users VALUES (1, 'Faiz', 1)" } ]
db.;
Beyond AI: An Ultra-Fast Embedded Database for Classic Applications
While TapirusDB is the premier memory engine for sovereign AI and robotics, you do not need AI to benefit from TapirusDB. It is also a first-class, zero-configuration embedded database for general applications, edge systems, and analytics:
1. Modern Drop-In Replacement for SQLite (Full SQL-92 + ACID)
Need reliable relational tables, transactions, and foreign keys without AI? TapirusDB provides standard SQL with pure Safe Rust reliability:
// Standard Relational SQL with ACID transactions
db.execute?;
db.execute?;
// Complex queries with Subqueries & CTEs
let rows = db.query?;
- Advanced Query Engine: Built-in subqueries, CTEs (
WITH ... AS),INNER/LEFT JOIN, and Cost-Based Optimizer (CBO). - Transparent Encryption Included: Hardware-accelerated ChaCha20-Poly1305 encryption at rest without paying for proprietary SQLite commercial extensions.
2. Embedded MongoDB Alternative (Schema-less JSON Documents)
Need to store dynamic payloads, user settings, or sensor telemetry with flexible schemas?
let collection = db.collection?;
let doc_id = collection.insert_one?;
3. In-Process Analytics & SIMD Aggregations
- SIMD Aggregations: Vectorized
SUM,AVG,COUNTprocessing multi-megabyte datasets in microseconds. - Transparent Compression: Built-in pure Safe Rust LZ4 page compression reduces disk footprint by 50%–70%.
- Developer CLI: Fast code search tool
tapirus tgbuilt right into the binary.
🎯 High-Impact Real-World Domains: Research, Analytics & Smart Home
TapirusDB's zero-dependency single-file architecture is purpose-built for environments where spinning up complex database server clusters is impossible, expensive, or counterproductive:
1. 🔬 Scientific Research & Academic Laboratories
- 100% Reproducible Research Bundles: Peer reviewers and researchers no longer need to configure Docker containers, PostgreSQL, Neo4j, and Milvus just to run a paper's code. Package an entire multimodal dataset—molecular/protein graphs, high-dimensional vector embeddings, and assay measurement SQL tables—into a single verifiable
experiment.tapirfile. - Zero-Setup Python & Jupyter Workflows: Install in seconds (
pip install tapirus) and query directly inside Jupyter notebooks without starting any background daemons. - Guaranteed Memory Determinism: 100% Pure Safe Rust (
#![forbid(unsafe_code)]) guarantees zero memory leaks, buffer overruns, or segfault crashes during 72-hour batch computation runs.
# Python/Jupyter Research Workflow
# Open single research dataset container
=
# Query molecular knowledge graph combined with chemical vector distance
=
2. 📊 High-Performance In-Process Analytics & Edge BI
- Zero-IPC Columnar Aggregations: Vectorized
SUM,AVG, andCOUNTaccumulators run directly across local memory pages with sub-microsecond execution times, eliminating network hop overhead completely. - Transparent LZ4 Disk Compression: Built-in page compression slashes disk space by 50%–70%, allowing edge gateways and industrial PCs to retain months of historical sensor telemetry locally.
- Zero Cloud Egress Costs: Query, aggregate, and analyze high-frequency telemetry at the edge without paying exorbitant bandwidth and ingress bills to cloud data warehouses.
// In-Process Telemetry Aggregation with Common Table Expressions (CTEs)
let summary = db.query?;
3. 🏠 Privacy-First Smart Home & Local Automation (Home Assistant / IoT)
- 100% Sovereign & Local-First: Run entirely offline on a Raspberry Pi 4/5 or Intel NUC with < 4 MB idle RAM. Your private camera triggers, sensor logs, and home conversations never leak to external cloud servers.
- Mesh Network Topology (openCypher Graph): Model Zigbee, Matter, and Thread device hierarchies natively (
MATCH (s:Switch)-[:CONTROLS]->(l:Light)). - Offline Voice Intent Matching (Vector Engine): Store speech and intent embeddings locally for sub-millisecond local voice assistant recognition (Whisper / Home Assistant Voice).
- Blackout Resilience (ACID WAL): If your home experiences an abrupt power outage, TapirusDB's Write-Ahead Log guarantees zero database corruption upon reboot.
// Local Voice Intent Resolution + Zigbee Mesh Pathfinding
let intent_vector = local_whisper.embed;
// 1. Semantic voice intent match (Vector)
let matched_action = db.vector_search?;
// 2. Resolve Zigbee device relay path (openCypher Graph)
let route = db.graph_query?;
Architectural Comparison
| Capability | TapirusDB v1.0.0 | Traditional Relational (SQLite / DuckDB) | Dedicated Vector DBs | Graph Databases (Neo4j) | Document Stores (MongoDB) |
|---|---|---|---|---|---|
| Runtime Architecture | In-Process Single File | In-Process Single File | Server Daemon / Cloud | Server Daemon (JVM) | Server Daemon (mongod) |
| Memory Safety Model | 100% Safe Rust (forbid) |
C / C++ (Manual memory) | Rust / Go / C++ | Java / JVM | C++ |
| Data Models Supported | Quad-Model (SQL+Vec+Graph+Doc) | Relational SQL only | Vector embeddings only | Graph only | JSON Document only |
| AI Vector Search | Native HNSW, IVF & RaBitQ | None (or slow extension) | Native ANN | Basic / Extension | Add-on Atlas Vector |
| Vector Quantization | RaBitQ 32x (1-Bit/2-Bit) + SQ8 | None | PQ / SQ | None | None |
| Graph Query Engine | openCypher + CSR + GraphRAG | Recursive CTE only | None | Native Cypher | $graphLookup |
| Encrypted At-Rest | ChaCha20-Poly1305 (Zero-Cost) | Commercial Add-on ($$$) | Cloud KMS only | Enterprise Tier ($$$) | Enterprise KMS |
| Cold Start / Idle RAM | < 4 MB RAM | ~4 MB (SQLite) / ~35 MB | > 500 MB | > 1,200 MB | > 350 MB |
| Binary Size | ~3.8 MB | ~1.5 MB – 42 MB | > 150 MB | > 300 MB | > 200 MB |
| Multi-Service Sync Drift | Zero (Single Container) | High (manual ETL) | High (CDC pipelines) | High (sync lag) | High (glue code) |
Core Technical Pillars
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ YOUR APPLICATION HOST PROCESS │
│ (Rust • Python • TypeScript • Bun • Go • PHP • WebAssembly • C/C++) │
│ │
│ ┌────────────────────────────────────────────────────────────────────────────────┐ │
│ │ TapirusDB Core Engine (In-Process) │ │
│ │ 100% Safe Rust • Idle RAM < 4 MB │ │
│ └───────┬────────────────────┬───────────────────────┬───────────────────┬───────┘ │
│ │ │ │ │ │
│ ┌───────▼────────┐ ┌───────▼────────┐ ┌───────▼────────┐ ┌───────▼────────┐ │
│ │ 1. Relational │ │ 2. Schema-less │ │ 3. AI Vector │ │ 4. Knowledge │ │
│ │ SQL Tables │ │ JSON Document │ │ HNSW + IVF │ │ Graph Engine │ │
│ │ Slotted B+Tree │ │ Collection │ │ (SIMD/RaBitQ) │ │ (openCypher) │ │
│ └───────┬────────┘ └───────┬────────┘ └───────┬────────┘ └───────┬────────┘ │
│ └────────────────────┴───────────────────────┴───────────────────┘ │
│ │ Direct In-Memory Traversal │
│ ▼ (Sub-Microsecond Zero-IPC Chaining) │
│ ┌──────────────────────────────────────────────┐ │
│ │ Anthropic Model Context Protocol (MCP) Tools │ │
│ │ tapirus_remember • tapirus_recall • SQL │ │
│ └──────────────────────┬───────────────────────┘ │
│ │ Direct File I/O (WAL + 4KB Slotted Pages) │
│ ▼ │
│ ┌──────────────────────────────────────────────┐ │
│ │ Single Encrypted Database File Container │ │
│ │ • app.tapir (Authenticated Ciphertext)│ │
│ │ • app.tapir-wal (ACID Append-Only Log) │ │
│ └──────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────────────────────┘
Pillar 1: Inverted File (IVF) Clustering & RaBitQ 32x Quantization
For multi-million vector scale, TapirusDB pairs $k$-means Voronoi partitioning (IvfIndex) with RaBitQ (Random Rotation Quantization):
- Fast Walsh-Hadamard Transform ($O(N \log N)$): Orthogonal sign-flip rotation equalizes coordinate variance across high dimensions without the $O(N^2)$ memory overhead of dense projection matrices.
- Extreme Compression Ratio: 1-bit binary sign packing shrinks vectors into
u64bitmasks: $$\text{1536 Dimensions (FP32)} = 6,144 \text{ bytes} \longrightarrow \mathbf{196 \text{ bytes}} \quad (\mathbf{>31\times \text{ Reduction}})$$ - Single-Cycle Hardware POPCNT: Vector distance evaluation executes in single-cycle CPU instructions using hardware
POPCNT(count_ones()). - Multi-Probe Search: Multi-probe clustering inspects only $n_{\text{probe}} \ll K$ Voronoi cells, pruning ~95% of the vector search space before scoring.
Pillar 2: Compressed Sparse Row (CSR) & openCypher
Traditional graph systems suffer from pointer indirection and binary join memory explosion. TapirusDB implements:
- Contiguous Slice Adjacency: Adjacency lists are stored in contiguous flat memory arrays (
outgoing_offsets,outgoing_targets,outgoing_weights). Callingcsr.outgoing_neighbors(node_id)returns a contiguous slice&[u64]with zero heap allocations and instant hardware prefetching. - Worst-Case Optimal Join (WCOJ) Primitives: Rapid edge existence checks in $O(\log d)$ via binary search on sorted neighbor slices, with two-pointer intersection sweeps for triangle counting (
triangle_count()). - Declarative openCypher: Full support for standard pattern matching:
MATCH (u:User)-[:FOLLOWS*1..3]->(v:User) WHERE u.id = 1 AND v.active = true RETURN v.name, count(*)
Pillar 3: Seed-and-Traverse GraphRAG Engine
Rather than executing expensive unconstrained global vector scans across gigabytes of embeddings, TapirusDB executes Seed-and-Traverse GraphRAG:
User Query ──► [IVF/PQ Asymmetric Seeding] ──► Top 2-3 Seed Entities
│ │
(Sub-millisecond ▼
Centroid Pruning) [Micro-Hop CSR Traversal]
(BFS 1-2 Hops, Contiguous Memory:
Extract Factual Knowledge Subgraph)
│
▼
[Tri-Modal RRF Fusion]
(Vector + BM25 Lexical + Graph Proximity)
│
▼
[Prompt Context Synthesizer]
(Compact, Hallucination-Free Markdown)
$$\text{RRF}(e) = \sum_{m \in {\text{vec}, \text{lex}, \text{graph}}} \frac{w_m}{k_{\text{rrf}} + \text{rank}_m(e)}$$
Pillar 4: Cost-Based Query Optimizer (CBO) & Statistics
TapirusDB features an automated cost-based query optimizer (src/sql/planner.rs):
- Computes disk I/O page fetch costs and CPU tuple comparison costs.
- Automatically selects between Sequential Scan, B+Tree Secondary Index Scan, and Primary Key Point Lookup.
EXPLAIN QUERY PLANoutputs estimated execution cost and expected row cardinality.
Pillar 5: Bidirectional Graph-Vector Chaining & Agent Long-Term Memory
Traditional distributed stacks decouple graph databases and vector stores, causing high network serialization latency and memory-prohibitive global vector scans. TapirusDB executes native bidirectional in-memory chaining at 1,606,037 ops/sec (0.55 µs):
- Graph-to-Vector (Targeted Scored Neighborhoods): Traverses structured entity relationships first ($A \to B$), then restricts vector distance scoring strictly to candidate neighborhood nodes ($M \ll N$). Yields 100% exact Recall with zero approximation loss ($O(M \cdot D)$ instead of $O(N \log N)$).
- Vector-to-Graph (Seed-and-Traverse GraphRAG): Uses ANN centroids to locate seed nodes, then instantly expands 1-hop and 2-hop CSR slices to extract factual context, eliminating LLM hallucinations.
- Autonomous Agent Long-Term Memory (LTM): Automatically balances semantic vector similarity ($S_v$), BM25 lexical precision ($S_l$), and exponential temporal recency decay: $$\text{RecallScore}(m) = w_v \cdot S_v + w_l \cdot S_l + w_r \cdot e^{-\lambda \Delta t} + w_i \cdot \text{Importance}$$
🌐 Industrial Applications: AI & Beyond
TapirusDB's quad-model engine (Relational SQL + Vector Search + openCypher Graph + JSON Documents) inside a single encrypted .tapir container solves mission-critical industrial challenges without multi-database operational overhead:
| Industrial Domain | How Quad-Model Solves It Without Server Clusters |
|---|---|
| Financial Fraud Detection & AML | Graph traverses money-mule rings and cyclic transactions ($A \to B \to C \to A$); Vector identifies anomalous spending behavior signatures; SQL enforces immutable balance reconciliation and strict ACID transactions. |
| Cybersecurity Threat Hunting & SIEM | Graph traces Active Directory lateral movement attack vectors; Vector detects polymorphic binary and syscall sequence anomalies; SQL queries firewall events and access control lists in microsecond windows. |
| Supply Chain & Bill-of-Materials (BOM) | Graph manages multi-tiered supplier dependency trees and failure propagation; Vector clusters sensor telemetry patterns; Document ingests unstructured customs and logistics manifests. |
| Healthcare, Genomics & Life Sciences | Graph traverses Disease $\to$ Gene $\to$ Symptom $\to$ Drug pathways; Vector performs chemical fingerprint similarity (SMILES) for drug repurposing; SQL guarantees HIPAA/clinical record integrity. |
| Scientific Research & Academic Labs | Single-file .tapir dataset container guarantees 100% reproducible paper workflows; Graph + Vector + SQL models molecular pathways and tabular metrics in Python/Jupyter with zero Docker dependencies. |
| In-Process Telemetry & Edge BI | SIMD vectorized accumulators compute AVG/SUM/COUNT across millions of sensor readings in microseconds; Transparent LZ4 cuts disk usage by 70% with zero cloud egress cost. |
| Privacy-First Smart Home & Home Assistant | Graph maps Zigbee/Matter/Thread device meshes; Vector performs local voice intent matching offline; WAL guarantees crash durability across home power outages on Raspberry Pi (<4MB RAM). |
| Air-Gapped Sovereign Hardware & Edge IoT | Operates on Raspberry Pi, avionics, drones, and naval vessels with zero server daemons, < 4 MB idle RAM, and hardware-accelerated ChaCha20-Poly1305 encryption at rest. |
Developer Tooling & CLI
TapirusDB ships as a single zero-dependency standalone binary (tapirus):
1. Accelerated Workspace Search (tapirus grep / tapirus tg)
High-throughput in-process developer code search combining regex matching, BM25 token overlap, and local semantic vector similarity:
# Search codebase with semantic vector ranking enabled
# Case-insensitive search filtered by file extensions
2. Interactive Terminal Shell
tapirus> CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);
Query OK, 1 row(s) affected
tapirus> INSERT INTO users VALUES (1, 'Ahmad Faiz');
Query OK, 1 row(s) affected
tapirus> SELECT * FROM users;
+----+------------+
| id | name |
+----+------------+
| 1 | Ahmad Faiz |
+----+------------+
(1 row(s))
3. Built-in HTTP REST Server (tapirus serve)
Launch an embedded database as a high-throughput REST API with zero external dependencies:
4. Autonomous AI Agent MCP Server (tapirus mcp)
Connect Claude Desktop, Cursor, or Gemini to TapirusDB over stdio:
Verified Benchmarks
Benchmarks executed on native NVMe SSD hardware (cargo bench --bench tapirus_bench):
| Operation | Throughput | Mean Latency | Median (p50) | Tail (p99) |
|---|---|---|---|---|
| Relational Primary Key Point Lookup | 362,733 ops/sec | 2.61 µs | 2.37 µs | 4.68 µs |
| CSR Graph Adjacency Sweep | 3,493,852 ops/sec | 0.23 µs | 0.21 µs | 0.37 µs |
| Graph-to-Vector Bidirectional Chaining | 1,606,037 ops/sec | 0.55 µs | 0.51 µs | 1.01 µs |
| Relational B+Tree Inserts | 149,176 ops/sec | 6.19 µs | 4.66 µs | 61.13 µs |
| JSON Document Path Lookups | 355,004 docs/sec | 2.70 µs | 2.58 µs | 5.45 µs |
| HNSW Vector Search (32D, k=5) | 51,060 QPS | 19.53 µs | 17.06 µs | 50.36 µs |
| RaBitQ Asymmetric POPCNT Distance | > 12,000,000 ops/sec | 0.08 µs | 0.08 µs | 0.12 µs |
| WAL Durable Disk Writes | 107,875 writes/sec | 9.15 µs | 6.71 µs | 62.21 µs |
| AI Memory Ingest (BM25 Indexing) | 416,529 ops/sec | 2.30 µs | 1.77 µs | 4.38 µs |
Latency Comparison: Traditional Frankenstack vs. TapirusDB In-Process
Cloud Vector DB (gRPC Roundtrip) [████████████████████████████████████████] 25,000 µs (25.0 ms)
Dedicated Graph DB (HTTP/JVM) [████████████████████████] 15,000 µs (15.0 ms)
Relational SQL Server (TCP IPC) [████████] 5,000 µs (5.0 ms)
TapirusDB Combined Graph-Vector [▌] 0.55 µs (Sub-microsecond, ~45,000x faster)
When (and When NOT) to Use TapirusDB
Engineering honesty is paramount. Choosing the right storage engine requires understanding boundary trade-offs:
| Workload & Scenario | Recommended Engine | Architectural Rationale |
|---|---|---|
| Local AI Agents & LLM RAG Memory | ✅ TapirusDB | Microsecond episodic retrieval, combined vector + openCypher graph in one atomic .tapir file. |
| Embedded Edge, Robotics & IoT Hardware | ✅ TapirusDB | < 4 MB idle RAM, 100% Safe Rust, zero background daemon processes or JVM runtimes. |
| Desktop Apps, CLI Tools & Local-First Web | ✅ TapirusDB | Single-file portability, zero server configuration, pure client-side SQLite/Mongo alternative. |
| Petabyte Distributed Big Data Warehousing | ❌ ClickHouse / Snowflake | TapirusDB is optimized for operational single-node/in-process workloads, not massive multi-rack OLAP scans. |
| Multi-Region Active-Active Distributed Writes | ❌ CockroachDB / Spanner | For global multi-master write replication, use dedicated distributed consensus databases (or wait for Tapisaurus). |
| Complex Analytical BI Cubes over Billions of Rows | ❌ DuckDB / ClickHouse | DuckDB is superior for vectorized columnar OLAP; TapirusDB excels at transactional, graph, vector, and episodic AI memory. |
Formal Safety Verification
- TLA+ Specifications: Write-Ahead Logging (WAL) state transitions and crash recovery are formally modeled under TLA+ in
docs/formal_verification/. - Memory Safety Contract: Strict
#![forbid(unsafe_code)]enforced across all core modules insrc/lib.rs.
Roadmap: Tapisaurus Distributed Continuum
TAPIRUS DATA ARCHITECTURE
│
┌───────────────────────────┴───────────────────────────┐
▼ ▼
TAPIRUSDB (Embedded In-Process) TAPISAURUS (Distributed Mesh)
• Single-file container (.tapir) • Distributed partitioned micro-shards
• Memory footprint: < 4 MB RAM • Raft-consensus multi-region replication
• Zero IPC overhead • Scale-out enterprise analytics
• Best for: SLMs, edge IoT, desktop, mobile • Best for: High-availability cloud clusters
Read the full distributed specification in docs/TAPISAURUS_DISTRIBUTED_BLUEPRINT.md.
Documentation & Architecture
- Architecture Blueprint & Binary File Layout
- GraphRAG & Cloud S3/R2 Remote Storage
- Robotics, Edge Silicon & Autonomous Vehicles
- Scientific Systems Architecture Paper
- C ABI & Native Foreign Function Interface
- Formal Verification Suite (TLA+)
- Software License (BSL 1.1)