Is there a way to prioritize the push of a type of document ?
For example, in our application, we push two documents : a document A and a document B. They have a strong business link. When there is a push synchronization, the document A can be send first. But we need the document B first on the server side.
The merge of both documents into one new document is not a valid solution.
Also, on this blog post, it said :
On the client-side, on initial launch, do a one-shot pull replication of the highest priority channel by specifying the channels filter. Once the sync of the documents in channel completes, the app can kick off another replication for the remaining channels.
But the status
completed should not be used in this case or I don’t understand this part of the document :
The replication change object also has properties to track the progress (
change.status.total). But since the replication occurs in batches and the total count can vary through the course of a replication, those progress indicators are not very useful from the standpoint of an app user. Hence, these should not be used for tracking the actual progress of the replication.
In the push filter documentation, I find this interesting part :
A push filter allows an app to push a subset of a database to the server, which can be very useful in some circumstances. For instance, high-priority documents could be pushed first, or documents in a “draft” state could be skipped.
But there is no example, so this is hard to understand how we can achieve this, with only the
Push Filter feature.