Django REST api offline synchronization with PouchDB
Asked Answered
X

0

8

I am developing an application which is used by multiple clients and the main goal of the app is to be used online. But a specific requirement is, it should be able to work offline too (only for a single client(s) in an emergency situation and for short time - 24 hours maximum). now I am using Django REST framework for backend and Jquery/AJAX frontend for GET and PUT etc. requests which update PostgreSQL DB on the backend. Now little research on the internet suggests the I should use PouchDB on the frontend and/or CouchDB on the backend. But my questions are:

  1. Is it really possible?
  2. If yes, then which DB should be used for the backend database?
  3. When the offline client become available online, how we can synchronize the data generated online?
  4. Can we cache some data on clients machine for offline availability purpose?
  5. Is it still possible to use PostgreSQL for the backend? (I really want to use it !)
Xerosere answered 19/3, 2018 at 7:23 Comment(2)
Take a look at Eventual Consistency in CouchDB, there are case studies which look similar to your appMichel
PouchDB and CouchDB will be perfect because they handle the syncs as shown here, but yes you can use Postgres, but you'll have develop your custom sync operations - which might be hard depending on your scale and data.Stearne

© 2022 - 2024 — McMap. All rights reserved.