[RFC] Loggerhead's caching architecture

John Arbash Meinel john at arbash-meinel.com
Sun Apr 25 22:01:08 BST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Clatworthy wrote:
> John,
> 
> I've been pondering our (phone) discussion re caching in Loggerhead
> today. I agree that we ought to use history-db where we can rather than
> maintain custom caching inside loggerhead.
> 
> Here as the choices as I understand them.
> 
> 1. Making history-db completely optional. If's it there and configured,
> use it for caching, otherwise don't.
> 
> 2. Make history-db mandatory but make the disk cache optional.
> 
> 3. Make history-db mandatory and require the disk cache to be configured.
> 
> (1) is ideal from my perspective but the most work for you. I remain
> hesitant about (3), i.e. making a SQL db a mandatory part of every
> loggerhead deployment.
> 
> The downside to (1) and (2) is that some operations (like finding where
> a revision is merged) will be *really* slow on large branches when it's
> not there. FWIW, I'm OK with only enabling certain functionality when
> the disk cache is there. In fact, I think we ought to encourage that
> pattern: fast out of the box and controlled enablement of "expensive"
> features.
> 
> I think we definitely want configuration settings to control where the
> disk cache is located. Configuring the cache to be per (shared)
> repository needs to be trivial IMO. Other schemes - like per-project on
> Launchpad - need to be possible.
> 
> Maybe (2) is the right compromise. Can history-db be enhanced to support
> using a memory cache when the disk cache is not configured?
> 
> Ian C.
> 

I can probably do 2. I'm not sure how much effort it is going to be. In
the worst-case, we can just copy the file into loggerhead, rather than
making the plugin itself a dependency. The main bit is whether we want
to make it easy to share the bits that help between 'bzr log' and
loggerhead. (For example, the way you configure the current sql cache is
http_sql_dir, IIRC, which doesn't really make sense for history_db to
use...)

John
=:->


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvUrZMACgkQJdeBCYSNAAPe7wCfY0cWrcCSI+ecyxZO8hg3ECCF
DQ0AoK3oNrl13wT9p3/XDUpoZNl9dktn
=rQw2
-----END PGP SIGNATURE-----



More information about the bazaar mailing list