Zatvobor / ember-couchdb-kit

An Ember.js adapter for Apache CouchDB
MIT License
43 stars 13 forks source link

PouchDB #77

Open simonexmachina opened 11 years ago

simonexmachina commented 11 years ago

We're interested in using PouchDB to provide offline persistence in a way that will sync up to the server when the client comes online. At this early stage I think we'd need an abstraction layer between Ember Data and the underlying CouchDB (via HTTP) or PouchDB (via its JavaScript API).

OpakAlex commented 11 years ago

check how works http://cordova.apache.org/#about with PouchDB

simonexmachina commented 11 years ago

From the PouchDB website it says "you can use PouchDB within Apache Cordova":

PouchDB is one of multiple projects that implement the CouchDB protocol and these can all be used to sync the same set of data. For desktop applications you may want to look into embedding CouchDB (or rcouch), for mobile applications you can use PouchDB within Apache Cordova or you can look at Couchbase lite for iOS and Android.

PouchDB can use a number of adapters that allow it to use different underlying browser storage mechanisms, so I'd say in this case it's using Cordova's SQLite.

simonexmachina commented 11 years ago

Interestingly PouchDB is also a CouchDB client so we should be able to use the PouchDB API as the abstraction layer for switching between a remote CouchDB server or local storage database.

Zatvobor commented 11 years ago

Interesting request. We'll think about possible/further steps.

Zatvobor commented 11 years ago

I've just checked the PouchDB internals. In fact, we can use the PouchDB as a communication layer for CouchDB and have ability to work offline as a bonus...

Would you interested to contribute? Let's discuss this in details

simonexmachina commented 11 years ago

Yep definitely interested, but not sure at this stage whether the project I'm working on will use a CouchDB-based solution or another persistence technology. Should know next week, so I'll let you know.

Zatvobor commented 11 years ago

Sure. We've been using the CouchDB for many different projects. Feel free to ask for help. Anyway just let me know.

simonexmachina commented 11 years ago

Somebody's already done some work on making PouchDB more Ember-like here

OpakAlex commented 11 years ago

Yes, but it doesn't use ember-data.