couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <>
Subject Re: database dynamic hot plug (attach / detach)
Date Thu, 21 Jun 2012 12:14:59 GMT
On Thu, Jun 21, 2012 at 1:47 PM, CDR <> wrote:
> Thank you to have enlighten my questions.
> To summarise, two choices:
>  - start a  server for each db, then merge queries from the n server to
> produce an output.
>  - patch couchdb to add support of 'attach' and 'detach'
> functionalities. But still end with mutliple view (one per db per fs)
> that require result merging to produce an output.
> I think the first one sound more reasonable :)
> Just by curiosity, the attach and detach have to be coded in Erlang,
> involving file open and close. Is their a request queue, current IO or
> something like that inside couchdb? I guess I just need to watch server
> shutdown code.
> Regards.
There is an LRU cache keeping track of live database and check if
there are still alive. Imo it will be easier if we make the couch_core
embeddable and pluggable so we could have smth like :

couch_db:open(<<"dbname">>, [{dir, "/path/to/dbdir"}]) .  It needs to
be a dir to handle compaction and other indexing features from couch.

The only question is how do you want to handle it using the HTTP api.

- benoit

View raw message