Expand description
Axiom: A TEE-safe, high-performance storage subsystem
Axiom provides a complete storage solution with:
- Canonical store: Transactional KV + append-only event log (LMDB)
- Projection store: Queryable SQL tables derived from events (SQLite)
- Projector: Event processing with batching and backpressure
- Migrations: Schema versioning and evolution
- Event handlers: Extensible event processing pipeline
§Quick Start
use azoth::prelude::*;
// Open database
let db = AzothDb::open("./data")?;
// Write state + events atomically
let mut txn = db.canonical().write_txn()?;
txn.put_state(b"key", b"value")?;
txn.append_event(b"event_data")?;
txn.commit()?;
// Run projector
db.projector().run_once()?;Re-exports§
pub use backup::BackupOptions;pub use backup::EncryptionKey;pub use checkpoint::CheckpointConfig;pub use checkpoint::CheckpointManager;pub use checkpoint::CheckpointMetadata;pub use checkpoint::CheckpointStorage;pub use checkpoint::LocalStorage;pub use circuit_breaker::BreakerMetrics;pub use circuit_breaker::BreakerMetricsSnapshot;pub use circuit_breaker::BreakerState;pub use circuit_breaker::CircuitBreaker;pub use circuit_breaker::CircuitBreakerConfig;pub use db::AzothDb;pub use dead_letter_queue::DeadLetterQueue;pub use dead_letter_queue::FailedEvent;pub use dlq_replayer::BackoffStrategy;pub use dlq_replayer::DlqMetrics;pub use dlq_replayer::DlqMetricsSnapshot;pub use dlq_replayer::DlqReplayConfig;pub use dlq_replayer::DlqReplayer;pub use dlq_replayer::ReplayPriority;pub use event_format::Event;pub use event_format::EventCodec;pub use event_format::EventTypeRegistry;pub use event_format::JsonCodec;pub use event_format::MsgPackCodec;pub use event_handler::BatchConfig;pub use event_handler::BatchEvent;pub use event_handler::EventHandler;pub use event_handler::EventHandlerRegistry;pub use event_processor::ErrorAction;pub use event_processor::ErrorStrategy;pub use event_processor::EventProcessor;pub use event_processor::EventProcessorBuilder;pub use event_processor::ShutdownHandle;pub use incremental_backup::BackupRetention;pub use incremental_backup::BackupType;pub use incremental_backup::IncrementalBackup;pub use incremental_backup::IncrementalBackupConfig;pub use incremental_backup::IncrementalBackupManifest;pub use ipfs::IpfsClient;pub use ipfs::IpfsProvider;pub use ipfs_storage::IpfsStorage;pub use migration::FileMigration;pub use migration::Migration;pub use migration::MigrationHistoryEntry;pub use migration::MigrationInfo;pub use migration::MigrationManager;pub use transaction::PreflightContext;pub use transaction::Transaction;pub use transaction::TransactionContext;pub use typed_values::Array;pub use typed_values::Set;pub use typed_values::TypedValue;pub use typed_values::I256;pub use typed_values::U256;
Modules§
- backup
- Backup and restore with optional encryption and compression
- checkpoint
- Checkpoint system for periodic backups with pluggable storage backends
- circuit_
breaker - Circuit Breaker Pattern
- db
- Unified Axiom database interface
- dead_
letter_ queue - Dead Letter Queue
- dlq_
replayer - Automatic Dead Letter Queue Replay
- event_
format - Event format with structured payloads
- event_
handler - Event handler system
- event_
processor - Continuous Event Processor
- incremental_
backup - Incremental Backup System
- ipfs
- IPFS integration for Azoth backups
- ipfs_
storage - IPFS storage backend for checkpoints
- migration
- Database migration system
- prelude
- Axiom Prelude
- recovery_
file - Local recovery file management
- transaction
- Enhanced transaction API with preflight, state updates, and event logging
- typed_
values - Typed value support for the KV store
Macros§
- migration
- Helper macro to define a migration
- simple_
handler - Helper macro to create a simple event handler
Structs§
- Backup
Info - Information about a backup operation
- Backup
Manifest - Backup manifest for deterministic restore
- Canonical
Config - Configuration for canonical store
- Canonical
Meta - Metadata about the canonical store state
- Commit
Info - Information about a committed transaction
- Decoded
Event - Decoded event representation
- Lmdb
Canonical Store - LMDB-backed canonical store
- Lock
Manager - Lock manager for stripe locking during preflight phase
- Preflight
Result - Preflight validation result
- Projection
Config - Configuration for projection store
- Projector
- Projector: consumes events from canonical store and applies to projection
- Projector
Config - Configuration for the projector
- Projector
Stats - Sqlite
Projection Store - SQLite-backed projection store
Enums§
Traits§
- Canonical
Store - Canonical store: transactional KV + append-only event log
- Canonical
Txn - Transaction for canonical store operations
- Event
Applier - Event applier: apply events to projection store
- Event
Decoder - Event decoder: convert raw bytes to structured events
- Event
Iter - Iterator over events in the canonical store
- Projection
Store - Projection store: SQL database for derived tables
- Projection
Txn - Transaction for projection store operations
- State
Iter - Iterator over key-value pairs in the canonical store
Type Aliases§
- Event
Bytes - Raw event bytes (opaque to storage layer)
- EventId
- Event identifier - strictly monotonic u64
- Result