borgbackup / borgbackup/borgstore

implement gather

Open
#211 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
25
Forks
8
Avg merge
16m
Merged PRs (30d)
8

Description

Kind of https://en.wikipedia.org/wiki/Gather/scatter_(vector_addressing), but in borgstore context:

If an application (e.g. `borg`) needs just some pieces from a store object, it can do partial loads already.

If it needs multiple pieces from a store object, that means multiple partial loads and **multiple roundtrips**.

If a piece is only small and the roundtrip takes long due to connection latency, this is rather slow.

We could offer a `gather` method that takes the same kind of data structure as `defrag` as input, then gathers all the pieces from the object(s) and returns them to the caller.

The caller knows the sizes of the requested pieces, so they can split the returned data to get the individual pieces (or use memoryview).

Implementation notes:
- similar as `defrag` method, could likely reuse most of the code
- backend base class method that works everywhere
- rest backend overrides the method and just talks to the rest server to do it
- rest server calls the `gather` method of its backend

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.