Skip to content

AegisDB

andrew jewell edited this page May 24, 2026 · 1 revision

AegisDB

AegisDB is NexusEdge's embedded multi-paradigm database. It runs on every controller (local instance) and on the AN server (cloud instance). Both instances stay synchronized via Firebase write-through sync.

13 Paradigms

AegisDB exposes 13 paradigms through a unified Rust API. Each paradigm is a different lens on the same underlying SQLite storage engine with WAL mode and busy_timeout for concurrent access.

# Paradigm Description
1 Document Store Schemaless JSON document storage with indexing. Used for equipment configurations, site metadata, and user preferences.
2 Key-Value Fast key-value lookups. Used for runtime state, feature flags, and cached computations.
3 Streaming Append-only event streams with consumer offsets. Used for sensor telemetry ingestion and real-time data pipelines.
4 Graph Node/edge graph with traversal queries. Used for equipment topology, fleet relationships, and dependency mapping.
5 Time Series Time-indexed numeric series with retention policies and downsampling. Used for sensor history, algorithm output trends, and AI model scores.
6 OTA Deployment artifact storage with versioning and rollback metadata. Used by the OTA Logic Deploy pipeline.
7 Vault Encrypted secret storage (AES-256-GCM). Used by NexusVault for credentials, API keys, and certificates.
8 Shield Security event storage with threat classification. Used by NexusShield and the Anubis threat detector.
9 Query Builder Composable query DSL for cross-paradigm queries. Allows joining time-series data with document metadata in a single query.
10 Compliance Immutable audit records with cryptographic chaining. Used for the dual audit trail (local + cloud).
11 Admin Database administration: retention policies, backup scheduling, compaction, and health checks.
12 Auth User authentication records, session tokens, and RBAC role assignments. Syncs with Firebase Auth.
13 Cluster Multi-node coordination for fleet-wide queries. Enables the AN server to query across all registered controllers.

Storage Engine

  • Backend: SQLite with WAL mode
  • Concurrency: busy_timeout configured for safe concurrent access from multiple threads
  • Encryption at rest: Vault paradigm uses AES-256-GCM; other paradigms use SQLite encryption extensions when configured
  • Retention: Time Series and Streaming paradigms support automatic retention policies (configurable per-series)
  • Backup: Automatic SQLite backup via the Admin paradigm, integrated with OTA Deploy backup cycle

Local vs Cloud

Aspect Local (Controller) Cloud (AN Server)
Location /var/lib/nexusedge/aegisdb/ AN server infrastructure
Sync Pushes to cloud every 60s (Pro+) Receives from all controllers
Retention Limited by SD card (configurable) Tier-gated (30-day to unlimited)
Query Local paradigm APIs Console + Cluster paradigm
Offline Continues operating, queues sync Marks controller offline

Write-Through Sync

Data flows through Firebase and AegisDB in a write-through pattern:

  1. Controller writes to local AegisDB
  2. Local AegisDB pushes to Firebase (real-time sync)
  3. Firebase triggers write to cloud AegisDB (durable store)
  4. Console reads from Firebase (real-time) or cloud AegisDB (historical queries)

If the network is down, writes queue locally and sync on reconnection. No data is lost.

NexusEdge Hailo Edition


Home

Getting Started

Platform

Data & Deploy

Security


Landing Page | Console

AutomataNexus LLC

Clone this wiki locally