zot icon indicating copy to clipboard operation
zot copied to clipboard

[Feat]: for better UX, stream blobs as you fetch when on-demand sync is enabled

Open rchincha opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe.

Currently, we fetch blobs and store locally and then serve. It could cause some clients to error out. So basically, on-demand is mainly a trigger. A better UX for clients would be to stream to them as the blobs are fetched.

Describe the solution you'd like

For this feature, we may have to enhance or replace the containers/image library entirely and use our own custom library.

You may need a pattern like so (or a combo): https://pkg.go.dev/io#MultiWriter https://pkg.go.dev/io#TeeReader

Also, a SyncWatcher so that we pull only once and fan-out to pending clients

Describe alternatives you've considered

No response

Additional context

No response

rchincha avatar Apr 30 '23 00:04 rchincha