summaryrefslogtreecommitdiff
path: root/doc/design/assistant/syncing.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-05 16:27:09 -0600
committerGravatar Joey Hess <joey@kitenet.net>2012-07-05 16:27:09 -0600
commit880b55f27705ef86c1b5525a8777382af27befd3 (patch)
tree315deaffe075d9cd4250ec2256ef30c3d030bc35 /doc/design/assistant/syncing.mdwn
parent9eaba58dd9706fde7e0fb84364a16576db63a7e0 (diff)
parent5a753a7b8a46c7326b6431dcf5a6eb755534e80d (diff)
Merge branch 'master' into assistant
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 76e2e1832..343a0e4aa 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.
@@ -86,35 +89,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
This assumes the network is connected. It's often not, so the