Meteor-Community-Packages / ground-db

GroundDB is a thin layer providing Meteor offline database and methods
https://atmospherejs.com/ground/db
MIT License
569 stars 76 forks source link

Is is possible to use something like PouchDB as the storage layer #90

Open oeway opened 9 years ago

oeway commented 9 years ago

Hi, I am looking for an offline app solution for both desktop and mobile, and it seems GroundMeteor is the best choice. But I am really concerned with the localStorage's 5MB quota, because I am going to store something larger than 5MB. On the other side, I tried another database named PouchDB(http://pouchdb.com/), it works great. As it advertised: PouchDB supports all modern browsers, using IndexedDB under the hood and falling back to WebSQL where IndexedDB isn't supported.

I can also use PouchDB with SQLite plugin for cordova, then there will be "no" size limitation. Besides that, there is a plugin for PouchDB named Crypto Pouch which I can used for encrypting the database.

So I am thinking whether we can make a wrapper to make PouchDB act as a localStorage, and then we can get rid of the size quota issue. Or maybe there are other solution to solve it?

Any idea? thanks in advance.

raix commented 9 years ago

We just need to add extra storage adapters to ground:store - I've been looking / reading a lot of code to find a nice library to use - but they all lack some features needed in ground db - why ground:store exists.

To add support for indexedDB etc. we just need to write a storage adapter for it. With same api as: https://github.com/GroundMeteor/localstorage - it should then plug right in with ground:store and ground:db

oeway commented 9 years ago

hi, thanks for your reply. Do you have any plan to add any extra storage adapter to get rid of the quota problem of localStorage?

raix commented 9 years ago

yep, but no eta so who ever gets there first,

lennylucas commented 8 years ago

Any further developments with adding support for indexedDB? Thanks