couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <>
Subject Re: Document update notifications
Date Wed, 08 Apr 2009 18:01:04 GMT

That looks like a solid patch, but unfortunately I think that the
comet notification will end up superseding the functionality. The
basic ideas of the comet framework are to post a JavaScript function
to the server to allow clients to filter db updates. I'm pretty sure
this is under active development so stay tuned for updates.

Paul Davis

On Wed, Apr 8, 2009 at 7:05 AM, Devendra Gera <> wrote:
> Hi,
> This is my first message to this mailing list. Please direct me to the
> right place if this isn't it.
> We are planning to use CouchDB as a central store for objects which also
> need to be pushed to various nodes. These nodes get the objects, work on
> them and then update them at the central store again. The distribution
> and nodes is being handled by a queueing solution.
> In order to achieve a single-step publish process, I wanted a hook into
> CouchDB whenever a document is created, updated or deleted. The hook
> would then push the object into the queue. Also, when a document changes
> (we look at a particular "status" field, but it could be any change), we
> wanted a hook to send out a notification to a destination specified
> within the object.
> I looked at the "update_notification" hook and while it was interesting,
> it did not allow me to see the actual change in the document. So I went
> ahead and implemented a "doc_update_notification" which is extremely
> similar to the update_notification, but sends the old as well as the new
> doc as part of the notification. Note that it sends *only* bodies by
> design.
> The patch for 0.9 is available at :
> And the patch for 0.8.1 is available at :
> The patches are small and simple. I would appreciate any comments. I
> suppose the doc update notifications should be No-Ops if one does not
> want them. Right now, for example, a doc delete would always result in a
> doc retrieval because it has to be sent in a notification. This is true
> even when one doesn't have doc update notifications enabled. If someone
> is interested, I will work towards making that possible, making it a
> generic solution.
> Thanks,
> --gera.

View raw message