From: Tollef Fog Heen Date: Sat, 27 Dec 2008 13:12:24 +0000 (+0100) Subject: Rudimentary ideas about flow X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbc637e63fb0c9e5df1b352792cf90f2b40d102e;p=voouiri Rudimentary ideas about flow --- diff --git a/flow.txt b/flow.txt new file mode 100644 index 0000000..062af27 --- /dev/null +++ b/flow.txt @@ -0,0 +1,27 @@ +S = Server +C = Client + +For binary data, we use the chunked encoding like what's defined in +RFC2616. The format is: "$size_of_chunk\r\n$chunk_data". We assume +that all data, filenames, signatures and delta are all binary. + +C: SIG\r\n$filename\r\n$signature +"I have $filename with $signature" +S: (OK|MISSING|NEWER|DELETE) +if OK: + File already exists in the same version on the server +if MISSING: + The server does not have a record of the file (so please upload it) + C: PUT $filename\r\n$delta + Delta is relative to an empty file. +if NEWER: + The server has a newer version of the file + C: DELTA $filename $signature + "Please give me the delta of $filename, from $signature" + S: $filename\r\n$delta +if DELETE: + The server has a record of the file being deleted, and the client + should do likewise. + +XXX: Conflicts. Client-side cache of signatures? Needs "generation" +on server too.