Logical block storage which buffers new blocks being written to a backing store. Reads return a unified view of the existing and buffered blocks. The buffer can be flushed to write all the new blocks to the backing store.
Logical block storage which buffers new blocks being written to a backing store. Reads return a unified view of the existing and buffered blocks. The buffer can be _flushed_ to write all the new blocks to the backing store.
Cache stores provide logical block storage backed by two other stores, a primary store and a cache. Blocks are added to the cache on reads and writes, and evicted with a least-recently-used strategy to keep the cache under a certain total size. Operations on this store will prefer to look up blocks in the cache, and fall back to the primary store when not available.
Because the caching logic runs locally, the backing cache storage should not be shared among multiple concurrent processes.
Cache stores provide logical block storage backed by two other stores, a _primary store_ and a _cache_. Blocks are added to the cache on reads and writes, and evicted with a least-recently-used strategy to keep the cache under a certain total size. Operations on this store will prefer to look up blocks in the cache, and fall back to the primary store when not available. Because the caching logic runs locally, the backing cache storage should not be shared among multiple concurrent processes.
Block storage backed by files in nested directories. Each block is stored in
a separate file. File block stores may be constructed using the
file://<path-to-root>
URI form.
In many filesystems, performance degrades as the number of files in a directory grows. In order to reduce this impact and make navigating the blocks a bit more efficient, block files are stored in directories under the store root. All path elements are lower-case hex-encoded bytes from the multihash.
The directories under the root consist of the first four bytes of the multihashes of the blocks stored in them. Within each directory, blocks are stored in files whose names consist of the rest of their digests.
Thus, a block containing the content foobar
would have the sha1 digest
97df3501149...
and be stored under the root directory at:
root/111497df/35011497df3588b5a3...
This implementation tries to match the IPFS fs-repo behavior so that the on-disk representations remain compatible.
Block storage backed by files in nested directories. Each block is stored in a separate file. File block stores may be constructed using the `file://<path-to-root>` URI form. In many filesystems, performance degrades as the number of files in a directory grows. In order to reduce this impact and make navigating the blocks a bit more efficient, block files are stored in directories under the store root. All path elements are lower-case hex-encoded bytes from the multihash. The directories under the root consist of the first four bytes of the multihashes of the blocks stored in them. Within each directory, blocks are stored in files whose names consist of the rest of their digests. Thus, a block containing the content `foobar` would have the sha1 digest `97df3501149...` and be stored under the root directory at: `root/111497df/35011497df3588b5a3...` This implementation tries to match the IPFS fs-repo behavior so that the on-disk representations remain compatible.
Block storage backed by a map in an atom. Blocks put into this store will be
passed to load!
to ensure the content resides in memory. Memory block stores
may be constructed usin the mem:-
URI form.
This store is most suitable for testing, caches, and other situations which call for a non-persistent block store.
Block storage backed by a map in an atom. Blocks put into this store will be passed to `load!` to ensure the content resides in memory. Memory block stores may be constructed usin the `mem:-` URI form. This store is most suitable for testing, caches, and other situations which call for a non-persistent block store.
Logical block storage which writes to multiple backing stores to ensure durability. Lookups will try the backing stores in order to find blocks.
Logical block storage which writes to multiple backing stores to ensure durability. Lookups will try the backing stores in order to find blocks.
Suite of tests to verify that a given block store implementation conforms to the spec.
Suite of tests to verify that a given block store implementation conforms to the spec.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close