Live data from Hacker News

Show HN: PouchDB - The JavaScript database that syncs

pouchdb.com

31–40 of 42 posts

Re: Show HN: PouchDB - The JavaScript database that syncs

#31
post #29

Earlier quoted context omitted.

It is able to work offline, but if a connection is available it syncs data (obviously the syncing doesnt work if there is no connection)

so what you're saying is, say you're working on your tablet/mobile/pc with an intermittent connection, it will continue working and update the db when a connection becomes available? is this the main benefit compared to the solution mentioned earlier?

Close but not quite, PouchDB is the database, you never need to be online to use it and it isnt queuing writes, its doing them locally.

The ability to sync is to let you use the same data across various devices.

Re: Show HN: PouchDB - The JavaScript database that syncs

#33
post #5

I just put up this website, its ugly but working on the content, in particular I want it very easy to understand wtf it is and get started, would love to hear your feedback.

Dale - I've been really interested in this project since I work with CouchbaseLite. Hope you get good feedback. I'm particularly interested in setting this up with Sync_gateway. https://github.com/couchbaselabs/sync_gateway

PouchDB is part of the Sync Gateway test suite. So it should "just work"

Re: Show HN: PouchDB - The JavaScript database that syncs

#34

I've been keeping an eye on PouchDB for a while; it looks like a lot of fun. How does authentication with the Couch server work, though? I don't see anything on the FAQ or after a brief perusal. CouchDB's apparently lax attitude toward security years ago was what kept me away, but I've always hoped/assumed that it improved since then. Has it?

CouchDB had some quirks related to user accounts as it has the added burden of trying to be an application server as well as a database server. 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'…

> With PouchDB a lot of the application server logic doesnt apply

How do I keep one user from accessing another user's data?

Re: Show HN: PouchDB - The JavaScript database that syncs

#35
post #34

Earlier quoted context omitted.

CouchDB had some quirks related to user accounts as it has the added burden of trying to be an application server as well as a database server. 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'…

> With PouchDB a lot of the application server logic doesnt apply How do I keep one user from accessing another user's data?

By giving each user their own database :)

Re: Show HN: PouchDB - The JavaScript database that syncs

#37

I don't understand why they don't shim in using local storage for IE8 and 9?

Somewhere between IE support not being a hugely requested feature and that the limitations and speed of localStorage wouldnt make a very useful database. I think support will likely pop up at some point, it isnt very hard to write a new adapter, but right now I would rather focus on making it work very well in modern browsers.

Re: Show HN: PouchDB - The JavaScript database that syncs

#38
post #35
post #34

Earlier quoted context omitted.

> With PouchDB a lot of the application server logic doesnt apply How do I keep one user from accessing another user's data?

By giving each user their own database :)

What will stop one user from accessing another user's database?

Re: Show HN: PouchDB - The JavaScript database that syncs

#39

I don't understand why they don't shim in using local storage for IE8 and 9?

Somewhere between IE support not being a hugely requested feature and that the limitations and speed of localStorage wouldnt make a very useful database. I think support will likely pop up at some point, it isnt very hard to write a new adapter, but right now I would rather focus on making it work very well in modern browsers.

I'm not sure how well localStorage would even work to be honest... as a key/value store though... prefixing "pouchdb_" + KEYNAME as the localstorage key would probably work. Notifications would probably be the biggest issue, I don't know pouch very well.

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.

Re: Show HN: PouchDB - The JavaScript database that syncs

#40
post #38
post #35

Earlier quoted context omitted.

By giving each user their own database :)

What will stop one user from accessing another user's database?

You can configure databases to require the correct user to authenticate before touching it..
Post reply on HN