Comment 1 for bug 724526

Revision history for this message
Jason Gerard DeRose (jderose) wrote : Re: Add download manager, store queued downloads in dmedia/machine record

Okay, gonna give this a go. First of all, in terms of the semantics the TransferManager deals with, there are two jobs that can be performed:

  download(file_id, remotestore_id)

  upload(file_id, remotestore_id)

In both cases, `file_id` is the _id of the "dmedia/file" doc, and `remotestore_id` is the _id of the "dmedia/store" doc describing the store or service the file will be downloaded from, or uploaded to.

When an upload is started, a decision has to be made about which FileStore to source the file from (in case a file is on multiple local FileStore). When a download is started, a decision has to be made about which FileStore to save the file into. Like with imports, we eventually want to be able to save a file to multiple FileStore simultaneously, but for now we'll just deal with saving to one FileStore.

I'm gonna get uploading to/downloading from Amazon S3 working first as that would be really handy for us while at UDS-O. But there's a lot of smarts that will need to be built into the TransferManager over time. For example, when running on a desktop/mobile device, we want to know when an Internet connection is actually available, which I believe you can get from some DBus signal or another.