incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Goodall <>
Subject Re: best way to send a STOMP message on attachment upload?
Date Thu, 12 Nov 2009 16:04:17 GMT
2009/11/12 Matteo Caprari <>:
> Hi.
> i need to notify an erlang process each time a couchdb database is updated.
> Reading the docs I learned how to use [update_notification] to fire a
> script that sends that message.
> It's fine, but  my feeling is that sending a message from couchdb
> would be faster than starting a new 'heavy' process each time.

Actually, update_notification processes are not started each time.
They stay running and communicating with the CouchDB unless they are
either killed, exit or die ... in which case CouchDB starts it up

However, I would recommend looking at the _changes API. It lets you
decouple these sorts of processes from the CouchDB server, making it
much easier to manage, distribute and upgrade. See for details,
specifically the 'longpoll' or 'continuous' feed.

- Matt

> I'd like to hear some comments. Thanks!
> --
> :Matteo Caprari

View raw message