Similar to this demo, my app have a long live chat room, but I only want the part of the messages for this room be synced to devices. I can do it by defining the syn function to only sync the messages before some day, for example, only the messages in last 30 days could be synced to the devices.
But there is a problem to view the other messages that not synced to devices. for example using pull-to-refresh to view the old messages. What I could consider is to use our own app server to fetch these old messages page by page.
But this has another problem, that is, to display the messages, I have to code two part logic: some uses the synced docs, others uses remote HTTP access to our own app server. This will make the app complicated. so I might use our own app server to server all the messages, and this make the sync gateway not used.
So my question is:
Any better way for this case, that is, support the archiving message and at the same time could browse it?
This let me ask a general question, what pattern which the sync gateway is appropriate to be used?
Thanks for you help.
Guofeng