[RFC] ztransport plugin
Alexander Belchenko
bialix at ukr.net
Tue Jan 10 10:21:24 GMT 2006
John A Meinel пишет:
> Alexander Belchenko wrote:
>
>>I'm working on plugin to create transport with transparent
>>gzipping/ungzipping weave files. I named it ztransport.
>
> I might point you in the direction of my 'compressed-weaves' branch.
> http://bzr.arbash-meinel.com/branches/bzr/compressed-weaves
I will look on this. Thank you for reminder.
> It was intended as a new branch format, because of specifically saving a
> lot of space. 4x is pretty nice. And inventory.weave compresses
> extremely well, because it has a lot of redundancy.
Initially I don't want to invent new branch format. I planning to use
ztransport only for pushing branches to some place (internet site, USB
stick flash drive) but keepeing working branches in current uncompressed
state because of speed.
> Doing it at the transport level is interesting. I think it would be
> easier to do it at the store level. Just do what we do know for the
> TextStore. Check for a plain (or .gz) first, and if you don't find it,
> look for the other one.
Transport level is very handy to write this plugin. Because it has the
infrastructure to easily add new transports (transport registry and
register_transport function). At first time I don't want to deeply dig
into main code and modify base classes.
Adding to WeaveStore ability to read gzipped weaves as well as plain
ones is good solution for transparent pulling/branching/merging from
branch with gzipped weaves. But I think it's better to implement with
new branch format. Because current v5/v6 format is not gzipping weaves
aware so it could break backward compatibility and confuse people. In
this case explicit (upgrade to new format that may support gzipped
weaves as well as ungzipped) is better than implicit (particular plugin
hack that make it possible).
But with modifying WeaveStore I think there will be next problem. As I
say I don't want to keep working branches in gzipped state because
gzipping/ungzipping on the fly have a cost. So anyway I need to
implement zpush command for pushing gzipped weaves.
> With that sort of system, it can be implemented in-place. Without
> needing a format upgrade. And also means you don't need a new transport.
However I will implement ZHttpTransport for testing purposes and then
will look into modifying WeaveStore at plugin level.
--
Alexander
More information about the bazaar
mailing list