Local and Cloud Blob Storage

← Persistence
STRVCT

SHA-256 content-addressable binary asset storage for images, audio, video, and files.

Overview

While domain object properties are serialized into standard JSON record rows, large binary assets (images, audio files, PDFs) are managed by SvBlobPool.

Binary assets are stored using Content-Addressable Storage (CAS):

  • The key for any binary blob is its SHA-256 hash digest string.
  • Object slots store hash reference strings (e.g., "hash:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") rather than inline base64 data.
  • Duplicate uploads of identical binary files automatically resolve to the same SHA-256 key, providing zero-effort binary deduplication.
Binary Asset / Upload Image, audio, or PDF file SHA-256 Hash Digest Computes content key SvBlobPool / Cache IndexedDB & Cloud Store Domain node slots store only SHA-256 hash strings; binary content is fetched asynchronously on demand.

Local & Cloud Sync Flow

  1. Local Writes: When a binary file is added, SvBlobPool computes its SHA-256 hash asynchronously and stores the ArrayBuffer in a dedicated IndexedDB blob store.
  2. Lazy Cloud Fetching: When rendering an image or playing an audio file, SvBlobPool checks local IndexedDB first. If missing, it fetches the raw binary from the cloud blob store using its SHA-256 key and caches it locally.
  3. Automatic Deduplication: Two different domain nodes referencing the exact same image share a single binary record in storage.