incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Eddy" <peter.e...@gmail.com>
Subject Re: Practical storage limit
Date Sun, 13 Jul 2008 18:25:10 GMT
On Sun, Jul 13, 2008 at 12:46 PM, Jan Lehnardt <jan@apache.org> wrote:
> To get on write view update semantics, you can write a little daemon
> script that runs alongside CouchDB and is specified in couch.ini
> as DbUpdateNotificationProcesses. This deamon gets sent a
> notification each time the database is changed and could in turn
> trigger a view update every N document inserts or every Y seconds,
> whichever occurs first. The reason not to integrate each doc as
> it comes in is that it is horribly inefficient and CouchDB is designed
> to do view index updates very fast, so batching is a good idea.

Thanks for this information, Jan. I think this solution is a lot
better than trying to figure out when it's necessary to update views
in application code. However I'd still argue that people will want
this as their default behavior most of the time, and I wonder if it
wouldn't be more efficient to just build the daemon functionality into
the server, maybe with tunable N and Y values.

- Peter

> To get a list of all views in a database, you can do a
> GET /db/_all_docs?startkey=_design/&endkey=_design/ZZZZ
> (we will have a /db/_all_design_docs view to make the ZZZZ-hack
> go away).
>
> That should solve your problem.
>
> Yes, such a daemon should be shipped with CouchDB, but we
> haven't got around to work on the deployment infrastructure yet.
> Any contributions to this are very welcome. I think the developer's
> choice of language for helper scripts is Python, but any will do,
> whatever suits you best.
>
> Cheers
> Jan
> --
> The FaQ entry is at the bottom of this page.
> http://wiki.apache.org/couchdb/FrequentlyAskedQuestions
> BTW: Is there a FaQ module or whatever for MoinMoin? it
> would be nice to get a MediaWiki-like table of contents at
> the top. Noah?
>

Mime
View raw message