Storage
Overview
Section titled “Overview”Seerflow uses Protocol-based storage interfaces. Backends are swappable via a single config line:
storage: backend: sqlite # or postgresqlSQLite (Default)
Section titled “SQLite (Default)”Zero-config storage with WAL mode for concurrent reads during writes.
Features
Section titled “Features”- Auto-created on first run (
~/.local/share/seerflow/seerflow.db) - WAL mode with optimized PRAGMAs (64 MiB cache, 256 MiB mmap)
- FTS5 full-text search on log messages
- Batch writes via WriteBuffer (1000 events or 100ms)
- ~30K events/sec batched write throughput
Schema
Section titled “Schema”Four tables created automatically:
events— indexed columns + msgpack BLOBentity_events— junction table for entity-to-event queriesalerts— with dedup key UNIQUE indexmodel_state— key-value store for ML model checkpoints
Configuration
Section titled “Configuration”storage: backend: sqlite data_dir: ~/.local/share/seerflow # default sqlite_path: /custom/path/seerflow.db # overridePostgreSQL (Production)
Section titled “PostgreSQL (Production)”For production deployments with higher concurrency requirements.
storage: backend: postgresql postgresql_url: ${DATABASE_URL:-postgresql://localhost/seerflow}PostgreSQL backend is planned for Sprint 13.