Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Firebase for syncing app and server database [closed]

We already have our full fledged scalable backend ready with CRUD APIs written. However, we want to make our app offline and want it to sync realtime with our server DB.

One of the weird option I was thinking of replicating server's DB (NoSQL) onto Firebase. Then use firebase SDK in the mobile app to make it sync realtime and provide robust offline capability.

I know, this might sound weird, but just wanted to become aware about the challenges regarding the same. Also, if anyone has attempted it in production, would like to know their thoughts on the same.

To sum it up, is it advisable to use this strategy in scalable production?

like image 617
Dinesh Singh Avatar asked Oct 20 '25 08:10

Dinesh Singh


1 Answers

Firebase is an excellent tool to develop realtime NO SQL DB with robust offline capability. According to my experience I was involved in developing the same for collecting reviews irrespective of user net connectivity.

Some data for the same :

 No. of reviews collected daily (online users): Around 3000
 No. of reviews collected daily (offline users): Around 100

Why was this solution chosen ?

  • No internet required. Firebase persistance keeps log of all write operations and syncs them back when user restores its connectivity.

  • No need to track api failures and error rates.

Now about scalability :

Recently Google launched Cloud Firestore which is far more scalable (has capabilities like chaining of queries) with far better intuitive features.

These articles give a great insight into its capabilities and why it can be better than firebase realtime database :

  • https://firebase.google.com/docs/database/rtdb-vs-firestore
  • https://medium.com/@beingrahul/firebase-cloud-firestore-v-s-firebase-realtime-database-931d4265d4b0

To sum it up at this time I would like to recommend you to explore Cloud Firestore as it seems more promising of the two.

Hope this helps !

like image 145
Shubham Avatar answered Oct 21 '25 22:10

Shubham