|
9 | 9 | <a href="https://github.com/Kevinsillo/anvildb/actions/workflows/tests.yml"><img src="https://github.com/Kevinsillo/anvildb/actions/workflows/tests.yml/badge.svg" alt="Tests"></a> |
10 | 10 | </p> |
11 | 11 |
|
12 | | -<p align="center"><strong>Embedded JSON document database powered by a Rust core, with language wrappers via FFI.</strong></p> |
| 12 | +<p align="center"><strong>Embedded JSON document database powered by a Rust core, with language wrappers via FFI or subprocess.</strong></p> |
13 | 13 |
|
14 | 14 | <p align="center">Zero external dependencies. No MySQL, PostgreSQL, SQLite, or PDO required. Just your filesystem and raw speed.</p> |
15 | 15 |
|
@@ -50,26 +50,17 @@ Want to create a wrapper for another language? See the [Wrapper Development Guid |
50 | 50 |
|
51 | 51 | ## Architecture |
52 | 52 |
|
| 53 | +```mermaid |
| 54 | +graph TD |
| 55 | + App[Application] --> Wrapper[Language Wrapper] |
| 56 | +
|
| 57 | + Wrapper -->|FFI · direct| Core[Rust Core Engine] |
| 58 | + Wrapper -->|Subprocess · stdin/stdout| Server[anvildb-server] --> Core |
| 59 | +
|
| 60 | + Core --> FS[("Filesystem (.anvil)")] |
53 | 61 | ``` |
54 | | -Application |
55 | | - | |
56 | | - v |
57 | | -Language Wrapper (PHP, Python, etc.) |
58 | | - | | |
59 | | - | FFI (direct, fastest) | Process (no extensions needed) |
60 | | - | JSON strings + handle | JSON lines over stdin/stdout |
61 | | - v v |
62 | | -Rust Core Engine anvildb-server |
63 | | - | - Write Buffer (dirty tracking + batched flush) |
64 | | - | - LRU Cache (auto-invalidated) |
65 | | - | - In-memory Indexes (Hash / Unique / Range) |
66 | | - | - Query Engine (filter, join, sort, paginate) |
67 | | - | - Schema Validation |
68 | | - | - Codec (deflate compression + optional AES-256-GCM) |
69 | | - | - Atomic Storage (temp file + rename) |
70 | | - v |
71 | | -Filesystem (.anvil compressed + metadata.json) |
72 | | -``` |
| 62 | + |
| 63 | +**Core internals:** Write Buffer · LRU Cache · In-memory Indexes (Hash, Unique, Range) · Query Engine (filter, join, sort, paginate) · Schema Validation · Codec (deflate + AES-256-GCM) · Atomic Storage |
73 | 64 |
|
74 | 65 | ## Performance |
75 | 66 |
|
|
0 commit comments