NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia

Home Page:https://sia.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Siac Download Queue

DavidVorick opened this issue · comments

Currently, to identify a download in the download queue, siac has to grab the full list of downloads from the api, and then iterate over them. It compares the source and destination for a match to the download that it is looking for, which isn't complete, as you could potentially download the same file to the same destination multiple times.

Instead, when you create a download you should be given a UID for the download that you can use to query the API for information about that download specifically. And then you should have an endpoint which allows you to fetch only that download from the download queue (much less data to receive and iterate over), so that we can make download progress checking more efficient.

This is a particular performance concern because siac requests the download queue repeatedly while it is reporting the progress of a file.