Adds a "naive" implementation of a multipart download as well as an example to exercise and play with the API. I haven't had much time to play around with it but the initial performance seems off (slow) and requires further investigation.
The basic idea in this initial implementation:
do initial object discovery (possibly fetching first chunk of data with it)
spin up a worker to distribute work, this worker simply takes the remaining total range of the object and chunks it by the part size and puts each chunk range to fetch onto a bounded worker channel.
spin up N workers that read off the "work to do" channel. They pull requests off the channel for a single range, fetch it, and place the result onto completion channel
consumer reads from a new Body type that handles sequencing the chunks
I fully expect the Body type to change. Using AggregatedBytes seems limiting and we don't have much control over it. It's a very thin wrapper on SegmentedBuf from bytes-util.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description
Adds a "naive" implementation of a multipart download as well as an example to exercise and play with the API. I haven't had much time to play around with it but the initial performance seems off (slow) and requires further investigation.
The basic idea in this initial implementation:
Body
type that handles sequencing the chunksI fully expect the
Body
type to change. UsingAggregatedBytes
seems limiting and we don't have much control over it. It's a very thin wrapper onSegmentedBuf
frombytes-util
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.