couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Rakotojaona <>
Subject Re: any good way of filtering out your own _changes?
Date Thu, 04 Oct 2012 09:07:30 GMT

On Wed, Oct 3, 2012 at 4:19 PM, svilen <> wrote:
> g'day
> so i have a local db that replicates bidirectional with several others.
> an app uses local db, listens to _changes and also puts
> things sometimes. Any way to avoid it seeing it's own changes?

If I understand you correctly, you have an app that both:
- listens to user input, outputs the message on the UI and stores it in the db
- listens to the db's changes, and outputs new messages

I think that when a user inputs a message, you could skip displaying
it and just store it in the db. This will trigger the _changes, and
the part that listens to this _changes will display the message,
whether it comes from the user (in this case it hasn't been displayed
yet) or from outside. If you use a local db, the delay between input
and output should remain low.


View raw message