Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Offline to Online Sync DB

I'm Developing a system where my client wants me to provide offline service and an online backup along with an iOS, Android, and Windows App.

Things I Need:

  1. Support of Offline and online (master) DB that can sync when it's connected.
  2. Same for iOS and Android, but I'm little concern if those phones can handle this sort of job.
  3. What to use in case of Android and iOS in order to archive such goal.

Suggest me with whatever you got.

NB: I haven't decided anything but for the backend, I will use Python & Django. I'm still in the designing process.

like image 771
Omar Avatar asked Jun 19 '18 11:06

Omar


2 Answers

In android , support for offline use SQLite database as a local database.

Save data in SQLite when app in offline mode.

You need to write API's to send data to server.

When Internet Connectivity available you send local data to server.

Make one status column in which updated your status when data has been send to server then make status true. next time send only those data has status false.

like image 118
GParekar Avatar answered Oct 31 '22 05:10

GParekar


I suggest Firebase Database (Real-time database or Firestore)!!!

Using Firebase DB, when clients go offline, they write new data in their local cache so that users can enjoy your app just like it's online. And when returning to online, they automatically sync with a host DB and all devices, so users can enjoy a literally "real-time" experience.

Additionally, it provides a No-SQL scalable data structure that you really can save your time.

Plus, there is a free plan of Firebase, so you can freely try and build some mini-apps with Firebase DB.

like image 2
Yoji Yamamoto Avatar answered Oct 31 '22 04:10

Yoji Yamamoto