Smart server progress: take a look!
andrew at canonical.com
Tue Mar 6 12:27:36 GMT 2007
Nicholas Allen wrote:
> That sounds great! I'm really impressed how far bzr has come ;-)
> Just a few silly questions though: will (or does) the hpss make
> branching a lot quicker? At the moment I make daily tar balls of my
> repositories on the server in a cron job so that when someone wants to
> check out the code they don't bzr branch it but instead extract the tar
> ball and they are ready to go. Downloading a compressed tar ball is much
> faster than branching. So I'm wondering if the smart server can do
> something similar to this automatically (that is bundle up the revisions
> the user doesn't have, compress them and send them to the client)?
At the moment, probably not.
It will help in the future, though:
* in the fairly near term, it will be able to gzip the data for file-level
operations (e.g. fetching kndx files), which should be a noticeable
improvement on lower-bandwidth links, although probably not so much on a LAN.
* it should speed up lightweight checkouts quite a lot, so it may make these
more attractive than a full local branch for some uses. At the moment
lightweight checkouts aren't very good over the network. Obviously
lightweight checkouts over a network are never going to be as fast as a
local branch, though.
* if you already have a shared repository locally, it will be able to
determine the set of revisions that need transmitting faster, and will also
be able transfer those revisions more efficiently (i.e. with less
round-trips). Branching from the network into a shared repository is
already tolerable after the first time, though (far from great, but it is
* if you do a full branch of all the history (i.e. no shared repository, or
the first time you branch into a shared repo), it should be able to deliver
the data over the network about as efficiently as grabbing a compressed
tarball (i.e. with minimal round-trips). And unlike grabbing tarballs, it
ought to be able to get faster if you already have some of the data locally.
Basically, the smart server can't cut down on the amount of data that needs to
be transmitted to do a branch, but it can cut down on round-trips and do
compression where it makes sense.
History horizons, whenever they happen, will be able to cut down on the amount of
data that needs transmitting.
> Also can you put hooks on the server side for commits and so on (eg to
> send emails)?
There's no good way to configure it at the moment, but I believe the capability
is in the code, at least for the smart operations (obviously anything that falls
back to file-level access will bypass the hooks). The bzr+ssh:// transport
basically just runs a "bzr serve" command on the remote end, which would load
plugins and process the config file just like any other bzr invocation.
More information about the bazaar