Expand description
TensorBlob - Module 11 of Neumann
S3-style object storage for large artifacts using content-addressable chunked storage with tensor-native metadata.
§Features
- Content-Addressable: Chunks keyed by SHA-256 hash for automatic deduplication
- Tensor-Native: Metadata participates in graph/relational/vector queries
- Streaming: Large files never fully in memory
- Linked Artifacts: Objects connect to entities via graph edges
- Garbage Collected: Orphaned chunks cleaned up automatically
- Async-First: All I/O operations are async
§Example
ⓘ
use tensor_blob::{BlobStore, BlobConfig, PutOptions};
let store = BlobStore::new(TensorStore::new(), BlobConfig::default()).await?;
// Store an artifact
let artifact_id = store.put(
"report.pdf",
&file_bytes,
PutOptions::new()
.with_created_by("user:alice")
.with_tag("quarterly"),
).await?;
// Retrieve it
let data = store.get(&artifact_id).await?;Structs§
- Artifact
Metadata - Metadata about a stored artifact.
- Blob
Config - Configuration for the blob store.
- Blob
Reader - Streaming reader for downloading artifacts.
- Blob
Stats - Statistics about blob storage.
- Blob
Store - S3-style blob store with content-addressable chunked storage.
- Blob
Writer - Streaming writer for uploading artifacts.
- Chunk
- A content-addressed chunk of data.
- Chunker
- Chunker for splitting data into content-addressable chunks.
- Garbage
Collector - Background garbage collector for orphaned chunks.
- GcConfig
- Configuration for garbage collection.
- GcStats
- Result from garbage collection.
- Metadata
Updates - Updates to apply to artifact metadata.
- PutOptions
- Options for storing a new artifact.
- Repair
Stats - Result from repair operation.
- Similar
Artifact - Result from similarity search.
- Streaming
Hasher - A streaming hasher for computing checksums incrementally.
Enums§
Functions§
- check_
chunks_ exist - Check if all chunks for an artifact exist.
- compute_
hash - Compute SHA-256 hash of data.
- compute_
hash_ streaming - Compute SHA-256 hash of multiple data segments.
- find_
orphaned_ chunks - Find all chunks not referenced by any artifact.
- verify_
chunk - Verify a single chunk’s integrity by checking its content hash matches its key.