Storage limits with pouchDB and Electron


#1

My issue is that I am sure my application will exceed the storage limits set in place by Chrome, does anyone know if the limits can be set through Electron or of a better way to store the data that will work in the following way.

The application is being created using angularJS, jQuery and Bootstrap that needs to sync immediately to an online version of the app as well as to an Ionic app on IOS and Android. It has to be ‘offline first’ so that we can allow users to work offline with no issues and then all records sync from all platforms once the application detects it is online again.

To achieve this sync capability I am using pouchDB locally with couchDB on my main webserver. As far as I can tell pouchDB uses localStorage to store the database.


Running PouchDB within an Atom package
#2

You could use something Like NeDB which uses your local filesystem which has no storage limits whatsoever.


#3

You can set PouchDB to use the leveldb adapter which as far as I can tell is only limited by the storage available on the hard drive containing the database.

db = new PouchDB('dbname', { adapter: 'leveldb' })

#4

Thanks frabert and john, I have had a look into both solutions and they look great and get me around my issue.


#5

You have to make sure to instantiate the PouchDB in your main (Node.js) process, not in the renderer processes (when used within your web sites) to be able to use ‘leveldb’ adapter. You could check out my boilerplate project: https://gitlab.com/appelgriebsch/electron-boilerplate


#7

That’s not true. You can use the leveldb adapter in both the main and renderer processes.


#8

I’m having an issue setting up PouchDB 5.0.0 within Atom. Does anyone know of a working example package I might be able to look at?


#9

nedb:Long time no update,Although like mongodb,but no schema of concepts.
pouchdb:Updated frequently,but not stable,query api will be deprecated,but pouchdb-find immature.
sqlite:need compile.

So currently there are no Best Practices:tired_face: