I have a mobile app that reads data from a few json files. The app does not modify the data in any way. The data is mostly static but there might be changes (addition/deletion/updates) every few days (5-6 days). These files are around 300-400KB in size.
I want to figure out a good way to store this data in the backend so I do not have to push app updates every time I have to update the static data. I am thinking of versioning the json files on the backend so the client can check if it has the latest version and then download the new file if there's an update.
On the client, I just read the static json into memory. Will that be an issue if the size grows bigger? Should I look into an alternative approach like storing the JSON in a realm DB?
Is there a better approach to sync such static data between the server and the client?
You're on the right path about wanting to "check the version" of the json file, since 400kb is not an insignificant size to download every time. There are multiple ways to do this, the simplest may be via exposing an endpoint from your backend that contains the Last Modified date of the json file, and storing a Last Updated date somewhere in your app via SharedPreferences, and only fetching the json file when these values don't match.