[Box Backup-dev] Timeouts

Chris Wilson boxbackup-dev@fluffy.co.uk
Thu, 7 Dec 2006 12:29:31 +0000 (GMT)


Hi Ben,

On Thu, 7 Dec 2006, Ben Summers wrote:

> Hmmm. A better plan would seem to be redesigning things to cope better with 
> unreliable connections.
>
> 1) Gather all changes to send before connecting in the first place (from file 
> system notifications or a slow scanning operation)

We can't gather file diffs that way, unless we store the encrypted block 
checksums on the client as well.

And if we did, then it might be a multi-gigabyte set of changes that we'd 
have to store until we connect.

> 2) Reconnect and continue when the connection fails.

Yes, that would be good. How would we handle that? I guess we can't just 
catch the exception and log in again, but it would be nice to be able to 
detect the progress of the upload (maybe store it in the context object) 
and restart from the same position after a failure.

Perhaps if we pushed the stack of pending directory entries into the 
context at each stage, then we'd be able to easily pick up where we left 
off? Would require a bit of rework to do all the readdir()s first.

What's so bad about the new timers implementation and keepalives that I 
spent a month writing, including full unit tests?

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |