3

I want to build a progressive web app which should work offline.

+----------------+                +---------------+
|  Browser       |                |  Server       |
|                |                |               |
|   +---------+  |                |               |
|   |         |  |                |               |
|   |  GUI    |  |                |               |
|   |         |  |                |               |
|   |         |  |                |  +----------+ |
|   +---------+  |                |  |   DB     | |
|       |        |                |  |          | |
|       |        |                |  |          | |
|   +---------+  |                |  |          | |
|   |   DB    |  |    Internet    |  |          | |
|   |         |  | -------------- |  |          | |
|   |         |  |      https     |  |          | |
|   +---------+  |                |  +----------+ |
+----------------+                +---------------+

I am searching for a framework which works in modern browsers and which can be provide a persistent data storage, even if the device is offline.

Required features:

  • persistent local storage
  • automatically syncing between DB in browser and on server
  • open source
  • Should work at least in one browser (chrome only is enough)
  • no plugins should be required in the browser
1

PouchDB has a sync feature: https://pouchdb.com/guides/replication.html

The diagram is similar to the one in the question: pouch-db-sync-

The PouchDB is a Javascript implementation of CouchDB which is API compatible with it. So you can use CouchDB on the server side and Pouch in the application itself and once the application comes online you can sync both. This is especially useful for progressive web applications who rely on an offline first approach.

PouchDB provides a fully asynchronous API. This ensures that when you talk to PouchDB, the UI doesn't stutter, because the DOM is not being blocked by database operations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.