Data RESTorage technical overview
Architectural Overview & Feature Whitepaper
Core Architectural Breakthroughs
1. Eliminating both the Query Language overhead and the Query Optimizer task
The Problem with Query Optimizers
The DRS Solution: Explicit Procedural Determinism
2. Deep Indexing & Hybrid Relational Projection
The Pitfalls of MongoDB & Document Stores
The DRS Solution: Targeted Relational Projection
3. Unified Atomic Transactions & Rollback
Data RESTorage (DRS) is a lightweight, zero-overhead hybrid document and relational backend engine designed to eliminate the complexity, resource overhead, and unpredictable query performance of traditional NoSQL document databases and heavy ORM stacks.
By replacing abstract query languages and dynamic query optimizers with deterministic, sculptured asynchronous modules (TypeScript/JavaScript) and introducing hybrid Deep Indexing, DRS provides predictable sub-millisecond execution, complete data integrity, and zero-friction development.
┌────────────────────────────────────────────────────────┐
│ REST Client (GET / POST - JSON / XML Payloads) │
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ Cascading Autoexec Middleware (Dataset/Schema/Entity)│
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ Target Operation Module: op-*.ts / op-*.mjs │
│ (Deterministic Business Logic & Execution Flow) │
└───────────────────────────┬────────────────────────────┘
│
┌─────────────────────────┴──────────────────────────┐
▼ ▼
[ 1. Complete Tree Document ] [ 2. Targeted Deep Indexing ]
Complex JSON document storage Relational SQL Index Table
(Leverages OS Kernel Page Cache) (MariaDB/PostgreSQL Projections)
│ │
▼ ▼
`drs.set(docId, json)` `drs.sql(query, values)`
Fast O(1) Key/File Access Flat, strongly-typed indices
│ │
└─────────────────────────┬──────────────────────────┘
│
▼
`drs.commit()`
Unified Atomic Transaction (Filesystem + Relational DB)
Traditional database engines (both SQL and NoSQL engines like MongoDB) rely on complex Query Optimizers that translate declarative queries (SQL, MQL, GraphQL) into physical execution plans.
op-*.ts / op-*.mjs).Querying deeply nested, tree-structured JSON data is one of the most resource-intensive tasks in document-oriented databases.
$unwind, $elemMatch, $lookup), leading to high CPU usage and in-memory aggregation limits.JOIN, WHERE, ORDER BY, and pagination) returning only matching document IDs (doc_id).drs.get(id)).Coordinating writes across disk and relational databases usually requires heavy distributed transaction managers (2PC/XA).
drs.set() (filesystem) and drs.sql() / drs.pgInsert() (database).drs.commit() atomically apply all pending file mutations and SQL transactions.dry_run: true), rolling back all changes automatically while returning the full execution outcome.HotPluggableDir. Edits to .ts or .mjs files take effect immediately on the next request without server restarts.tsc), bundlers, or third-party loaders (ts-node, tsx) required.autoexec Middleware: Middleware files (autoexec.ts / autoexec.mjs) execute in cascade at Dataset, Schema, and Entity levels, enabling DRY shared logic, context mutation, and early security guard exits.| Architectural Feature | Traditional NoSQL (e.g. MongoDB) | Traditional RDBMS + ORM | Data RESTorage (DRS) |
|---|---|---|---|
| Query Mechanism | Declarative MQL / Aggregations | Declarative SQL via ORM | Deterministic TypeScript/JavaScript Operations |
| Query Optimizer Risk | High (Plan regressions, index misses) | High (Suboptimal ORM-generated SQL) | None (Explicit procedural logic) |
| Deep Tree Indexing | Multikey / Wildcard (High RAM bloat) | Complex JSON columns or EAV tables | Hybrid Relational Projection (XPath to SQL) |
| Index on Computed Values | Requires Aggregation Pipelines / Triggers | Generated columns or manual triggers | Native (Computed in operation logic) |
| Memory Footprint | Heavy (Engine cache + index memory) | Moderate to High | Ultra-light (Relies on OS kernel page cache) |
| Transaction Scope | Multi-document (complex configuration) | Database only (ignores filesystem) | Unified Atomic (Filesystem + SQL DB) |
| Hot Reload / Deployment | Server restart or API rebuild | Rebuild, migrate, restart | Zero downtime (Instant file hot-reload) |
| TypeScript / JS Toolchain | External build tools required | External build tools required | Zero-config native execution |
| XML / Legacy Interop | Requires external transformation layer | Requires manual XML parsers | Native dual JSON / XML support |
Data RESTorage bridges the gap between unstructured document flexibility and high-performance relational search.
By eliminating the query planner, isolating document storage from index projection, and running native TypeScript/JavaScript directly on the incoming REST path, DRS provides unmatched execution predictability, minimal infrastructure footprint, and maximum development speed.