Alternative to change notifications
Hi,
Does couchbase has similar functionality as ChangeNotifications(http://guide.couchdb.org/draft/notifications.html) in couchDB ?
From available documentation the options I see is to use TAP client.( There are comments that TAP interface is still being finalized) Is this the only option ?
Regards,
Ajith
Hi mike, thanks and I am looking into the java tap client.
I would like to know if I can use tapclient for the scenario - I have number of clients apps and each updates db. Now on updating db, each client should signal a server(or another module) in specific conditions, that it has done the updates. This can be done by an external msg queue or if db has proficiency to notify that a specific document(or all docs having keys msg*) has been updated.
Can we use Tap API for the filtered notifications ? Will it affect performance of couch DB ? Moreover in case of cluster replication does couchdb manage this behind the scenes, or is there to be taken care of ?
First off, just to be clear I am talking about Couchbase architecture in relation to tap stream.
>> Can we use Tap API for the filtered notifications ?
You can't filter notification server side, this will have to be done on the client. In the future we will provide support for server side filtering.
>> Will it affect performance of Couchbase ?
This depends heavily on the type of tap stream you are using. Doing a tap dump can have performance implications for your cluster. A tap dump will send all keys from the server and this requires pulling a lot of keys off of disk and into memory. What you want to do is a tap backfill. This will send all of the key mutations from the time the tap stream has started and should have much of an affect on performance.
>> Moreover in case of cluster replication does Couchbase manage this behind the scenes, or is there to be taken care of ?
This is all managed by Couchbase.
This is all managed by Couchbase.
I think this is supposed to be "and should _not_ have much of an affect". Emphasis added by me. :)
Couchbase has similar functionality to the changes feed but it is not quite the same. Tap streams are used to stream data out of the server and the most important use case for them is in cluster replication. We have tap clients available that can be used to do this and I recommend starting with the java tap client which is included in our java SDK. If you would like a more in depth explanation on the differences please let me know and I can provide one.