Hi
I use couchbase lite android with a continuous push pull replicator.
I have certain documents that are written to multiple times a second and I have noticed this causes huge strain on the replicator and on the server that processes the incoming changes as it receives each change individually. The main reason I write every change to the db is because of the persistence.
I had a few thoughts myself
-
Have a collection specifically for this document and switch the sync on and off as I need, down side is I forsee a lot of edge cases where the sync isn’t switched on when it is needed which is very difficult to debug as all we will see is the document not in the state we need it.
-
Place a sync filter on the replicator that looks at a flag on this document that I set when I want the document to sync. Down side is its a lot of work on the replicator as its processing every change coming in multiple times a second.
-
Cache the document somewhere else and copy it to the database whenever I want to sync it. Same downsides as 1.
I was wondering if anyone has any advice on different strategies / if there is some mechanism built into couchbase to help minimize this strain.
Thanks in advance
2 posts - 2 participants