Hi all,
we are fairly new to CB transiting (conceptually for now) from MongoDB and we have a scenario, where we can use a best practise suggestion.
Scenario:
We are designing an event app for 100-200K users that pulls content around a festival.
Within that data we have content that may get updated in a low frequency (correction to the event program) and content that has high frequency (e.g. parking lot occupancy).
Each content type is displayed in its own view, respectively activity.
Now, I came to following strategy:
(1) start app: Create an DBManager and database instance.
create pull one-shot replication for data on all channels to populate the app or refresh all content.
(2) onStop/onDisappear (view is overlayed by another one): stop replication (unless not required as a one-shot pull)
(2) go into parking view: create another replication instance and start a continuous pull for channel ‘parking’,
(3) leave parking view: stop replication
(4) same as (2, 3) for the program view just on another channel
That way we hope to reduce traffic for users that don’t look at the parking view.
We were also looking at liveQuery for filtering. But, since it works on top of the continuous replication, we need to filter the content on replication level using channels.
I appreciate any comment like “yes, you got it right” or "“no, do it like this” :).
Thanks for your help,
Ulf