One-way Sync of User Activity Logs

We’re building a mobile app where activity logging is a central feature for the business model. We’re in the middle of a PoC to use Couchbase and we’re experiencing difficulty with the log push mechanism (synchronization).
Activity logs in nature are supposed to get synced one-way in the following order: 1. Activity Log document created in a mobile 2. Synced on Couchbase server 3. Copied to our analytical database (Bigquery). Ideal scenario would be:

  1. When Syncing the Couchbase Lite with Couchbase Server, we clear the mobile hosted documents immediatley
  2. We don’t sync back from Couchbase server to the Couchbase Lite
  3. Once copying data from Couchbase server to Bigquery, we clear the Couchbase server

Currently, after syncing Couchbase Lite with server, Couchbase server documents are flagged as deleted and synced back with Mobile. This creates unnecessary traffic. Also technically, if a user has more than a single mobile, we’re not interested in syncing mobile #1 logs with mobile #2.

Your help will be greatly appreciated.

One possible way - If you are only interested in one-way sync, then you could use set the replicator on Couchbase Lite client to be push only mode. Then once the document has been pushed up, you can do a local purge of the document so all traces of it are removed from the local database. Document purges are not synchronized over. You can then proceed to remove it from the server side as you are currently doing.

Note on deletes : Deletes are intended to be synced by design. Otherwise clients will not be aware when a document is deleted. A deleted document does not contain the body . It includes the metadata that tells the recipients that the document is deleted so it can handle it appropriately. The bandwidth usage of traffic and the local storage requirements of the tombstoned documents should be quite insignificant of thats reason for concern.

On a related note (since you mentioned bigquery), have you checked out the Couchbase Analytics feature (now in Developer Preview) thats coming up in Couchbase Server 5.5. Would be great to know what you think.