You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Benoit Chesneau <bc...@gmail.com> on 2009/06/27 11:50:24 UTC

event on database creation

Hi all,

I'm looking for a way to have notification on database
creation/deletion. Any idee how it could be done. For now i just
polling list of all dbs in a node, but I wonder if there is any mean
to just listen ? I had a look on :

_changes: per database so not usefull here
update notification: my understanding is that it work only on stat level
_stats: ? Maybe this one  could help me by listening on
/_stats/couchdb/open_databases a get list of dbs when it changes, but
i'm not sure about it.

other way ? imo having a general _changes handler and listening on
_changes/db for per db may be usefull. What do you think about it ?

- benoit

Re: event on database creation

Posted by eric casteleijn <er...@canonical.com>.
Hi Benoit,

> _changes: per database so not usefull here
> update notification: my understanding is that it work only on stat level

I believe update notification can handle this, since database creation 
and deletion send different status messages to the update notification 
process, so you can use them for now, but they're kind of a pain, and 
they're going away at some, and when that happens, I'm not sure what the 
alternative is. I've filed a feature request bug in JIRA for some 
enhancements to the _changes feeds, so you could have a look there and 
see whether that would solve your problems:

https://issues.apache.org/jira/browse/COUCHDB-390

-- 
- eric casteleijn
http://www.canonical.com