aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/compactbinaryjson.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-04-13 12:57:51 +0200
committerGitHub Enterprise <[email protected]>2026-04-13 12:57:51 +0200
commit87248f58b4551870af8f08aac3e38e8887e32073 (patch)
tree2e0d7d18b5397ff7ebec3b5a30668af47dfb5941 /src/zencore/compactbinaryjson.cpp
parent5.8.4-pre1 (diff)
downloadzen-87248f58b4551870af8f08aac3e38e8887e32073.tar.xz
zen-87248f58b4551870af8f08aac3e38e8887e32073.zip
Add MemoryCidStore and ChunkStore interface (#940)
This PR introduces an in-memory `CidStore` option primarily for use with compute, to avoid hitting disk for ephemeral data which is not really worth persisting. And in particular not worth paying the critical path cost of persistence. - **MemoryCidStore**: In-memory CidStore implementation backed by a hash map, optionally layered over a standard CidStore. Writes to the backing store are dispatched asynchronously via a dedicated flush thread to avoid blocking callers on disk I/O. Reads check memory first, then fall back to the backing store without caching the result. - **ChunkStore interface**: Extract `ChunkStore` abstract class (`AddChunk`, `ContainsChunk`, `FilterChunks`) and `FallbackChunkResolver` into `zenstore.h` so `HttpComputeService` can accept different storage backends for action inputs vs worker binaries. `CidStore` and `MemoryCidStore` both implement `ChunkStore`. - **Compute service wiring**: `HttpComputeService` takes two `ChunkStore&` params (action + worker). The compute server uses `MemoryCidStore` for actions (no disk persistence needed) and disk-backed `CidStore` for workers (cross-action reuse). The storage server passes its `CidStore` for both (unchanged behavior).
Diffstat (limited to 'src/zencore/compactbinaryjson.cpp')
0 files changed, 0 insertions, 0 deletions