I know that this is a question that regularly surfaces…
Couchbase does not currently have a “change feed” similar to CouchDB; I’ve read several times that such a feature was “coming soon”, but AFAIK it’s still not there. Any update on the topic?
Yes, that would fit how DCP works and it can do what you need. That said, it is not public interface yet and we need to do more work (both on the server and on the client) to make it reliable in all corner cases and also in terms of general performance.
That said, in the meantime you can work around that by implementing a view which contains your events based on a timestamp (in the key) and then you query for specific time ranges on a given interval. Since in an event sourced system you do not delete events anyways, this might work quite nicely.
Thanks for your reply, will be looking forward to this feature to become public. Obviously (and as you mention) an update on the client-side is equally important in order to receive push updates.
Your suggestion of using views sounds actually quite good. The only risk is that a client pushes an event with a timestamp that would put the event before the reader’s current cursor, something that would not happen if we rely on the DB version that increases monotonically.
That is true, you’d need to make sure that the client also uses timestamps that are not “in the past”. I don’t have a specific roadmap for DCP official support, but we are actively working on it because it is needed in other places as well (for example our Kafka and Spark integrations).