I am working on the following topic right now:
- about 8000 stores/objects(uniqueID, name, adress, latitude, longitude, geohash, amount of productX, amount of productY.)
- in the future there will be new stores and also some of the stores will be deleted
- I am planning to add a version attribute to each data: for example I start with version1. If I receive an update or a new store then it will have version2
- it is not needed to receive realtime changes. This data will be changed only a couple of times each month
- Flutter app with a feature: find n stores at this location
because the data is not changed frequently I was planning to put an updated local sqlite database to each build
I will use Realtime Database or Firestore to receive updated data within my app to avoid to publish a new version only because database was changed
Firestore: I will add only a new attribute to my document and I will request all data that is newer than my local database version and I will also have a collection that has all deleted items
Realtime database: here I would have something like this
-updates version1 newData: List of unique IDs deletedData: List of unique IDs
I read a lot about geo queries on firestore and I also found a working flutter plugin to do this filtering on serverside, but because my data is not changed that frequently I am very confused about the best approach.
Questions:
- Is my approach a good idea or should I forget about the local sqlite DB and use only Firebase/Firestore?
- If I will use the local database and will only observe updates from the backend, which of the services should I use in terms of pricing etc.? (Advantage Firestore: If I use Firestore I can easily switch to it by using the flutter plugin and forget about my local database)