Skip to content

block cache sketch#64

Draft
kylebarron wants to merge 1 commit intodevelopmentseed:mainfrom
kylebarron:kyle/block-cache-sketch
Draft

block cache sketch#64
kylebarron wants to merge 1 commit intodevelopmentseed:mainfrom
kylebarron:kyle/block-cache-sketch

Conversation

@kylebarron
Copy link
Member

  • We should have separate public block caching APIs for sync and async backends. This way a backend doesn't have to know how to become sync or async itself.
  • The idea is that the underlying cache can be independent of whether the fetching is sync or async. (This assumes that there's no-overhead synchronous access to the cache. If we were to add file-based caching in the future, then maybe we'd want to have an async cache as well).
    • In the future we could even make the idea of a cache generic. Where the cache can declare specific methods like ranges_for_request, get, set. And then a generic SyncCacheStore and AsyncCacheStore could use a generic cache, while not tying the cache implementation to the name of the wrapper. (I.e. we currently have a BlockCache class, where the cache implementation is tied to the specific wrapper)
  • BlockStoreReader shouldn't implement a generic read method. Instead the block cache should just implement and expose publicly the same get_range & get_ranges or get_range_async & get_ranges_async as the underlying backend. Then we can have a generic Read wrapper that takes an arbitrary backend that supports get_range and get_ranges and implements file methods on them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant