Offline-First Use Cases


Hi. I’m doing some research for mobile application and storing data. I have a use case where:
I want to allow the user to start using the application offline first so that if they decide to use the cloud and sync their data they can use it on other devices or web apps.

My concern is, if the user has a large set of data, I assume it will take as long as need due to bandwidth and size of the local database…but should still sync.

My question is: Can I activate sync in the future when the feature is purchased? A user may have a large dataset at this time.


The actual question is a little vague.

Realm can be used as a purely local database or it can be sync’d with Realm Cloud. Realm is pretty quick so if a user ‘moves’ from a local Realm database to a sync’d database, you will need to ‘copy’ the data into Realm Cloud but other than that, it’s pretty transparent.

Sync’ing happens automatically so when data is written, Realm handles all that in the background, so from a user perspective, ‘moving to cloud’ should take seconds. Even with a big dataset as it’s offline first, sync second.

Read the white paper on The Offline-First Approach to Mobile App Development


Thanks. I updated the statement. It was late last night. I read the whitepaper and although it talks about Offline First, I don’t see anything about syncing in the event the local database is very large (ie: user decides a year later to sync)


I provided the information about 'sync’ing at a later time in my above comment

and that’s what you’ll need to do; copy the objects from the local realm to the sync’d realm and then if you’re done with the local realm, delete it. While it sound’s like a time consuming task, don’t forget that copying the data is actually copying it locally and Realm will push/sync that data to the cloud in it’s own time, in the background. So the process is pretty quick even with a large dataset.