summaryrefslogtreecommitdiff
path: root/doc/design/assistant/syncing.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-05 14:47:10 -0600
committerGravatar Joey Hess <joey@kitenet.net>2012-07-05 14:47:10 -0600
commitb1629356ce0db4146b26292054bd894ce0eec774 (patch)
treeb6d7b5fcd8d76c21df39c5b57029acbbbcd2f718 /doc/design/assistant/syncing.mdwn
parentbd2c4c982d79d72c67da838c71c869194d26ea4d (diff)
blog for the day
major milestone today!
Diffstat (limited to 'doc/design/assistant/syncing.mdwn')
-rw-r--r--doc/design/assistant/syncing.mdwn34
1 files changed, 4 insertions, 30 deletions
diff --git a/doc/design/assistant/syncing.mdwn b/doc/design/assistant/syncing.mdwn
index d4d89d03b..fc2ac3e5e 100644
--- a/doc/design/assistant/syncing.mdwn
+++ b/doc/design/assistant/syncing.mdwn
@@ -21,8 +21,11 @@ all the other git clones, at both the git level and the key/value level.
Watcher. **done**
* Write basic Transfer handling thread. Multiple such threads need to be
able to be run at once. Each will need its own independant copy of the
- Annex state monad.
+ Annex state monad. **done**
* Write transfer control thread, which decides when to launch transfers.
+ **done**
+* Check that download transfer triggering code works (when a symlink appears
+ and the remote does *not* upload to us.
* At startup, and possibly periodically, look for files we have that
location tracking indicates remotes do not, and enqueue Uploads for
them. Also, enqueue Downloads for any files we're missing.
@@ -80,35 +83,6 @@ reachable remote. This is worth doing first, since it's the simplest way to
get the basic functionality of the assistant to work. And we'll need this
anyway.
-### transfer tracking
-
-Transfer threads started/stopped as necessary to move data.
-(May sometimes want multiple threads downloading, or uploading, or even both.)
-
- startTransfer :: TransferQueue -> Transfer -> Annex ()
- startTransfer q transfer = error "TODO"
-
- stopTransfer :: TransferQueue -> TransferID -> Annex ()
- stopTransfer q transfer = error "TODO"
-
-The assistant needs to find out when `git-annex-shell` is receiving or
-sending (triggered by another remote), so it can add data for those too.
-This is important to avoid uploading content to a remote that is already
-downloading it from us, or vice versa, as well as to in future let the web
-app manage transfers as user desires.
-
-For files being received, it can see the temp file, but other than lsof
-there's no good way to find the pid (and I'd rather not kill blindly).
-
-For files being sent, there's no filesystem indication. So git-annex-shell
-(and other git-annex transfer processes) should write a status file to disk.
-
-Can use file locking on these status files to claim upload/download rights,
-which will avoid races.
-
-This status file can also be updated periodically to show amount of transfer
-complete (necessary for tracking uploads).
-
## other considerations
It would be nice if, when a USB drive is connected,