monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] merging branch to allow 'automate stdio' over the n


From: Thomas Keller
Subject: Re: [Monotone-devel] merging branch to allow 'automate stdio' over the network
Date: Mon, 05 Oct 2009 09:58:36 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090605)

Timothy Brownawell schrieb:
> Stephen Leake wrote:
>> Any automate command that currently builds a workspace object would
>> have to be changed to use the session cached workspace object. That
>> could be done incrementally.
> 
> 
> The database is already cached, app_state contains a map<filename,
> database_impl*> . Perhaps the keystore and workspace should be handled
> the same way?
> 
> Or really, I suppose the app_state should just be turned into a caching
> factory, eg move the database_cache logic into a "database &
> app_state::get_database(filename)" and do something similar for
> keystore, workspace, etc. The app_state used to contain the db,
> keystore, etc, and making them all independent probably wasn't the best
> of ideas (being able to only initialize the ones you need probably was
> good, just implemented wrong).

This is actually how I implemented it in guitone as well, I have a
MonotoneManager class which gives me either a running mtn instance for a
particular database (given by a specific file name) or workspace (given
by a particular workspace root). The db access falls back on a mtn
running in a workspace in case the workspace has the same underlying db.
 What is a bit ugly with this approach is however that you have to
transport some kind of "state" down the road, in my case these are the
paths to either database or workspace, but I guess we do currently the
same with app_state as well which we need for lua and options anyways.

Thomas.

-- 
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]