Expand description
Where what is worth keeping is kept: bytes by content, and names that point at them. The hole the core left, plugged with directories, hashes and atomic renames.
| map | key | what it is for |
|---|---|---|
| blobs | the digest of the content | weights, artifacts, intermediate data |
| names | whatever you call it | a cache key, an artifact’s id |
Two and not one because a cache key is not a content hash: it is the hash of the recipe, known before the value it names exists. Content addressing alone could not answer do I already have what this recipe produces?
A blob is written once and never changes; a binding is a small record written by atomic rename. That is what lets a network folder be shared by everyone at once with no lock server, and it turned out to work unchanged against a bucket.
| who | what it keeps | under what name |
|---|---|---|
a worker’s Serving::store | artifacts, so a catalog is not sent twice | artifact:<kind>:<id> |
Cache | what a node produced | value:<key> |
Recorder | what happened, one record per forward | run/<id>/<n> |
Cache is the Keeper and Recorder the
Watcher — the same division from both ends. A
queryable index is derived from these records and can be thrown away;
making it the truth would mean a single writer, which is where NFS breaks.
Structs§
- Bound
- A name, what it points at, and what was said about it.
- Cache
- Names what a graph produces, and keeps it in a store.
- Digest
- The identity of some bytes, written as
sha256:and hex. - Local
- A store kept in a directory.
- Recorder
- Writes down what happened, one record per
forward. It owns its store where aCacheborrows one: a cache is made for oneforwardand a recorder counts them.
Enums§
- Store
Error - Why something could not be kept, or found.
Traits§
- Store
- Keeps bytes by their content, and names that point at them.
Functions§
- bytes_
of - A value in bytes, refusing what only exists in this process.
- name_of
- Where a value is bound, which is not where an artifact is.
- value_
of - And back. Nothing may be left over: leftovers are as suspicious as missing bytes, and no format checks that for you.
Type Aliases§
- Meta
- What you want to remember about something you stored, in the order you say it. Text and not a closed type because the vocabulary is the caller’s; what this crate does with it is write it down and hand it back.