we are working on a Couchbaselite/SyncGateway based Android application. We manipulate 3 different types of documents (sampleset, sample and file). The application let users take pictures which are stored as attachments in file document type (one attachment per document).
Our client has asked to increase the picture quality which will increase the attachment size as well. This leads us to the following question: Could big attachments slow document replication?
We want to assign more priority to regular documents (sampleset and sample) replication than files. File documents are not shared across users and are just pushed to the server, we’ve accomplished this by associating file documents to a channel to which only the user that took the picture has access to. On the other hand, regular documents are shared by all the users and their replication to everyone who is online is critical, as soon as they are created.
We are afraid that increasing the attachment size could affect the regular document replication which could lead to inconsistent data visualization across users. For instance, imagine that a user that is offline creates several regular documents and also file documents, once it gains connection all the documents are pushed to the server (in a random order?). Then, if attachments are replicated first, we would delay regular documents replication, affecting other users data visualization.
That said, is there any kind of implicit prioritization when replicating documents/attachments? If not, is there a way of assigning more priority to some documents than others? (for example, having separate Cblite instances for each document type)
Thanks in advance.