[Http-crcsync] First contact with a crcsync server

Patrick McManus mcmanus at ducksong.com
Thu Jul 9 08:46:21 EDT 2009


On Thu, 2009-07-09 at 11:23 +0100, Gervase Markham wrote:
> On 08/07/09 21:54, Patrick McManus wrote:

hi Gerv!


> 
> Surely the client will be advertising crcsync support in the 
> Accept-Encodings header? Then the server can send a normal response as a 
> set of compressed blocks as a way of saying "I know you don't have a 
> base for this, so the only benefit you'll get is the gzipping, but 
> that's good, and I'm also showing you I support crcsync. Do send me 
> crcsync-based headers in the future."
> 
> Would that work?
> 

well, as currently written you don't want to use accept-encodings
because crcsync does not generate content-encoded responses (using the
content-encoding header).. a-e and c-e are kind of explicitly wedded
together.

however, the client can just speculatively send an if-block if it has
one handy.. if the server wants to do deltas it can do so, if it does
not then it can just send something like "accept-crcysync: v1".. The
nice thing about this, and the point I am having trouble articulating,
is that it can include this as an advertisement even if it does not
apply the delta algorithm to that particular response. It separates
capability from execution. And that's important information if you're
going to use it to determine whether or not to send meaningful if-block
hashes on future transactions.

I think this is more or less what you suggest - everything in one round
trip.

However, I think I read a little more into pedro's original inquiry than
was there. But I think what I read into it was useful. There will be
times when you want to do this probing to determine whether or not to
generate a meaningful if-block. These are going to be cases where the
if-block generation is high risk (perhaps you need to read a large file
off disk) and high reward (you could avoid transferring lots of a big
file).. doing the explicit probe with options is the way to go about it
- not some overlaoded meaning of "if-block: 0".






> Gerv



More information about the Http-crcsync mailing list