[tahoe-dev] timeouts

David-Sarah Hopwood david-sarah at jacaranda.org
Mon Aug 10 14:27:39 PDT 2009


Brian Warner wrote:
> We'd have to decide what upload() really means though: how the user
> should express a difference between "please upload this in the future
> when it's convenient for you" and "please upload this right now and
> don't tell me you're done until it's really secure". And if they express
> the former, should they have a way to ask about the subsequent
> autorepair status? Like, should they get two notifications: one when the
> initial/weak upload is done, and another when the later repair is
> complete? I don't know.

Yes. This is what promises are for: "please upload this right now;
resolve this Deferred when a minimum number of shares have been uploaded,
and this other Deferred when the file has been stored reliably."

This promise-based API isn't really imposing additional complexity on
its client, because it is very easy to drop either of the Deferreds, or
wait for them immediately. How this is exposed to human users is a
different and more complicated question -- but note that if a human
submits an operation on multiple files in the same command, the
promise-based API is needed in order to avoid imposing artificial
ordering constraints between them.

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com



More information about the tahoe-dev mailing list