Skip to main content
Observation storage and streaming layer for DimOS. Pull-based, lazy, composable.

Architecture

Store owns a storage location (file, in-memory) and directly manages named streams. Stream is the query/iteration surface - lazy until a terminal is called. Backend is a concrete composite that orchestrates ObservationStore + BlobStore + VectorStore + Notifier for each stream. Supporting Systems:
  • BlobStore - separates large payloads from metadata. FileBlobStore (files on disk) and SqliteBlobStore (blob table per stream). Supports lazy loading.
  • Codecs - codec_for() auto-selects: JpegCodec for images (TurboJPEG, ~10-20x compression), LcmCodec for DimOS messages, PickleCodec fallback.
  • Transformers - Transformer[T,R] ABC wrapping iterator-to-iterator. EmbedImages/EmbedText enrich observations with embeddings. QualityWindow keeps best per time window.
  • Backpressure Buffers - KeepLast, Bounded, DropNew, Unbounded - bridge push/pull for live mode.

Modules

Subpackages

Docs

Query execution

StreamQuery holds the full query spec (filters, text search, vector search, ordering, offset/limit). It also provides apply(iterator) - a Python-side execution path that runs all operations as in-memory predicates, brute-force cosine, and list sorts. This is the default fallback. ObservationStore implementations are free to push down operations using store-specific strategies instead: ListObservationStore delegates entirely to StreamQuery.apply(). SqliteObservationStore translates the query into SQL and only falls back to Python for operations it can’t express natively. Transform-sourced streams (post .transform()) always use StreamQuery.apply() since there’s no index to push down to.

Quick start

Implementations