[Server-devel] Apache proxy CRCsync & mozilla gsoc project?

Toby Collett thjc at plan9.net.nz
Mon Mar 30 14:26:18 EDT 2009


One thing we need to do is think about the headers carefully, as this is the
aspect of the project we could promote as a web standard. There is a large
amount of flexibility we could put in to this, but as Rusty has said, if
there is a way someone can implement a protocol wrong they will. So we need
to keep it as simple as possible.

At the moment we append the block size and hashes for the blocks to the
request. The response has a content encoding set, and will need a strong
hash added. The number of blocks is fixed at 20 for the moment, with a hash
size of 30 bits, which felt like a nice balance between overhead and
performance. This keeps our header at around the 128 byte mark when you have
base64 encoded the hashes (we dont pad the base64 encoding, so
30bits->5bytes).

The other aspect we need to standardise is the encoding of the response.
Again at the moment this is a very simplistic binary encoding. The response
is encoded in sections, each beginning with either a 'L' to indicate a
literal section or a 'B' to indicate a matched block (actually we could make
one a default and save a few bytes here). A literal section then has a 4
byte int in network byte order for the size of the literal section, followed
by the data. a block section has a single byte indicating the block number.

There is no error checking in the encoding itself, this is assumed to be
taken care in other layers, and we through in a strong hash on the whole
file to make sure this is correct. There is a risk if we get a corruption of
the literal length byte that we could try read a very large amount of data,
not sure if this is acceptable.

Toby



2009/3/31 Gervase Markham <gerv at mozilla.org>

> On 25/03/09 18:20, Toby Collett wrote:
>
>> Not a GSoC project, just a project(crcsync is the name at the moment).
>> Initial target is a double proxy server, one each end of the slow link,
>> with dreams of web standards and browser integration following.
>>
>> Seems to me that both projects need the same upstream server extension
>> to be able to send the deltas down. Current state of the apache modules
>> is that all the major pieces are in place but not a lot testing and no
>> optimisation has been carried out yet.
>>
>
> OK. So maybe the browser integration for this, or at least the groundwork
> for it, is what our SoC project should be. Particularly if you have Apache
> modules that work already.
>
> See
> https://wiki.mozilla.org/Community:SummerOfCode09:WebPagesOverRsync
> for where we are at the moment. We are getting incredible amounts of
> interest in this project - more than all the others combined. It seems like
> an idea whose time has come.
>
> Gerv
>



-- 
This email is intended for the addressee only and may contain privileged
and/or confidential information
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/server-devel/attachments/20090331/17f6f5e5/attachment.htm 


More information about the Server-devel mailing list