Expand description
Plugin Architecture
SochDB uses a plugin architecture to keep the kernel minimal while allowing rich functionality through extensions.
§Design Philosophy
- Core is Minimal: The kernel contains only ACID-critical code
- Extensions Add Features: Storage backends, indices, observability are plugins
- No Bloat: Users only pay for what they use
- Vendor Neutral: No lock-in to specific monitoring/storage systems
§Plugin Categories
StorageExtension: Alternative storage backends (LSCS, RocksDB, etc.)IndexExtension: Custom index types (vector, learned, etc.)ObservabilityExtension: Metrics, tracing, logging backendsCompressionExtension: Compression algorithms
§Example: Adding Prometheus Metrics
ⓘ
// In a separate crate: sochdb-prometheus-plugin
struct PrometheusPlugin { /* ... */ }
impl ObservabilityExtension for PrometheusPlugin {
fn record_metric(&self, name: &str, value: f64, tags: &[(&str, &str)]) {
// Push to Prometheus
}
}
// Usage:
let db = KernelDB::open(path)?;
db.plugins().register_observability(Box::new(PrometheusPlugin::new()))?;Structs§
- Extension
Info - Information about an extension
- Null
Observability - Null observability extension - does nothing
- Plugin
Manager - Plugin manager - registry for all extensions
- Storage
Stats - Storage statistics
Enums§
- Extension
Capability - Capabilities an extension can provide
Traits§
- Compression
Extension - Compression algorithm extension
- Extension
- Base trait for all extensions
- Index
Extension - Index extension
- Observability
Extension - Observability extension
- Storage
Extension - Storage backend extension