Show HN: PouchDB - The JavaScript database that syncs
pouchdb.com
pouchdb.com
Some beginning tutorials/intros to pouchdb: http://pouchdb.com/getting-started.html http://briantoth.github.io/Tutorial/2013/03/19/pouchdb-intro... http://mattgwwalker.wordpress.com/2013/04/08/pouchdb-2/
Todo Tutorial using AngularJS and PouchDb http://twilson63.github.io/ngTodoPouch/
Building Offline Applications With AngularJS and PouchDB http://mircozeiss.com/building-offline-applications-with-ang...
Other Apps Using PouchDB https://github.com/daleharvey/pouchdb/wiki/Who-or-What-Is-Us...
including this offline conference app https://github.com/axemclion/conference
PouchVision - inspect and interact w/pouch instances http://brudolph.pouchvision.jit.su/
Puton - bookmarklet for inspecting/editing pouch dbs http://puton.jit.su/
PeerPouch (PouchDB-over-WebRTC) - in development at one point https://github.com/natevw/pouchdb
Thanks
With PouchDB a lot of the application server logic doesnt apply and you can use CouchDB as a private data server that requires any connection to be authenticated, in the example we use basic auth but other methods are available and none of the security quirks with 'couchapps' apply.
And yes it is a lot of fun :)
How do I keep one user from accessing another user's data?
The server is really exciting, we mostly built it so we can reuse CouchDBs test suite however with it being so easy to install its becoming pretty invaluable
In the browser PouchDB will store its data in IndexedDB or WebSQL, in node its LevelDB, with the HTTP adapter you can use any product that implements the CouchDB HTTP Api protocol, currently this is CouchDB, Cloudant, PouchDB-Server and Couchbase Lite (previously TouchDB)
The important part is that it can only sync with a backend that implements the same replication protocol.
var db = new PouchDB('dbname');
db.put({
_id: 'dave@gmail.com',
name: 'David',
age: 66
});
db.changes({
onChange: function() {
console.log('Ch-Ch-Changes');
}
});
db.replicate.to('http://example.com/mydb');
Shouldn't you set up the event listener before "db.put()"?Can PouchDB sync with MySQL / my current non CouchDB database?
No, the data model of your application has a lot of impact on its ability to sync, relational data with the existence of transactions make this harder. It may be possible given some tradeoffs but right now we are focussing on making PouchDB <-> (PouchDB / CouchDB) sync as reliable and easy to use as possible.
I just know that IE8 will probably be pretty relevant for another 2-3 years or so, and IE9 for a couple years after that. I don't like it any more than anyone else, but that's the world we live in.
Writing custom code to do that on a mysql stack is very hard.
The ability to sync is to let you use the same data across various devices.
You exit the tunnel, you gain connectivity PouchDB syncs your data to the CouchDB on the server. Other devices can now sync from the server.