Implexus is a path-based document database library and engine for Vala. It provides a hierarchical data storage system where documents are identified by application-assigned paths, similar to filesystem paths with folders.
Documents are identified by paths like /users/john/profile rather than opaque IDs. This makes the database intuitive to use and enables hierarchical organization.
Four entity types support different access patterns:
DBM-style key-value storage interface allows different backends while maintaining a consistent API.
Element types are serialized to/from binary format only - no GLib.Object specific logic. This keeps serialization simple and predictable.
Applications use the same Engine interface whether running in embedded mode or connecting to a remote server.
Built on Invercargill types:
Element interface for type-safe valuesProperties interface for document propertiesEnumerable<T> and Lot<T> for collection returnsSet<T> and ReadOnlySet<T> for set operationsExpressions for category and index queriesThe database engine runs as a library within the application process. Direct method calls, no network overhead.
var engine = new EmbeddedEngine(storage);
var container = engine.get_root().create_container("users");
A daemon process manages the database, clients connect via TCP. Same API through RemoteEngine.
var engine = new RemoteEngine.connect("localhost", 9090);
var container = engine.get_root().create_container("users");
Uses Invercargill data structures exclusively:
Invercargill.DataStructures.Vector<T> instead of GLib.List<T>Invercargill.DataStructures.Dictionary<K,V> instead of GLib.HashTable<K,V>Invercargill.DataStructures.HashSet<T> for setsInvercargill.DataStructures.Category<K,V> for categorized storageEnumerable<T> for lazy evaluation of potentially large result setsLot<T> for materialized collectionsReadOnlySet<T> for set-based operationsCategorys and Indexes use Invercargill.Expressions for:
┌────────────────────────────────────────────────────────────────┐
│ Application Layer │
└────────────────────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────┐
│ Engine Interface │
│ │
│ Provides unified API for embedded and remote operation │
└────────────────────────────────────────────────────────────────┘
│
┌───────────────┴───────────────┐
▼ ▼
┌───────────────────────────┐ ┌───────────────────────────────┐
│ EmbeddedEngine │ │ RemoteEngine │
│ │ │ │
│ Direct in-process calls │ │ TCP communication with │
│ │ │ implexusd daemon │
└───────────────────────────┘ └───────────────────────────────┘
│ │
└───────────────┬───────────────┘
▼
┌────────────────────────────────────────────────────────────────┐
│ Entity System │
│ │
│ Entity interface with four implementations: │
│ Container, Document, Category, Index │
└────────────────────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────┐
│ Storage Layer │
│ │
│ Storage interface for entity persistence │
│ DBM interface for key-value storage │
│ Binary serialization for Element types │
└────────────────────────────────────────────────────────────────┘
Implexus follows patterns from:
| Project | Patterns Used |
|---|---|
| Spry/astralis | Project structure, meson build |
| Invercargill | Element, Properties, Enumerable, Lot, Set, Expressions |
| Invercargill-Json | Element-to-binary serialization pattern |
| Inversion | Dependency injection for engine configuration |