5 ms·
Surprised to see this on HN, but I am one of the maintainers of this (I expect Nolan will end up finding this too) so happy to answer any questions about it.
by daleharvey 10y ago
Surprised to see this on HN, but I am one of the maintainers of this (I expect Nolan will end up finding this too) so happy to answer any questions about it.
- grizzles 10y agoIs the project sponsored by Couchbase? If not, have you thought about publishing a storage API that the replication protocol calls so that it could be adapted to work with any backend db? What about P2P sync - (eg. serverless) has anyone thought of making PouchDB do that?
- daleharvey 10y agoNot sponsored by Couchbase at all (I worked at Couchbase during its formation, this started near the end of my time there). For pluggable storage engines our node.js adapter uses leveldown, so any *down backend can be plugged in. https://pouchdb.com/adapters.html https://pouchdb.com/adapters.html has some more information about this. For p2p yup its been something quite a few people have been using pouchdb for, one of the more notable examples has been http://thaliproject.org/ http://thaliproject.org/, the core storage format is entirely compatible with p2p (inherited from couchdb)
- davidbanham 10y agoThe idea of making pouch sync with other databases is covered in their faq: https://pouchdb.com/faq.html#sync_non_couchdb https://pouchdb.com/faq.html#sync_non_couchdb Basically, your other data base probably handles conflicts in a different way to Couch that would make syncing this way nonsensical. If you're happy to handle that yourself, the Couch replication protocol is well documented and there are plenty of libraries written for it.
- fredguth 10y agoAFAIK, Couchbase is a CouchDB as a service tuned for speed. PouchDB is a CouchDB implementation in the browser. I don't think your sync with other db would be easy and I believe there is no such desire in the project roadmap.
- rakoo 10y agoNo, Couchbase is more or less a merge of Membase and Couchdb. With Couchdb it only shares its lineage and its creator; apart from that they are entirely different beasts.
- fineline 10y agoIt also shares more than half its name. The recognisable bit. The other bit is the generic and largely interchangeable "base" / "db". I don't know if it's intentional, but there's no wonder people get them confused.
- fredguth 10y agoAFAIK, Couchbase is a CouchDB as a service tuned for speed. PouchDB is a CouchDB implementation in the browser. I don't think your sync with other db would be easy and I believe there is no such desire in the project roadmap.
- fredguth 10y agoAFAIK, Couchbase is a CouchDB as a service tuned for speed. PouchDB is a CouchDB implementation in the browser. I don't think your sync with other db would be easy and I believe there is no such desire in the project roadmap.
- lacampbell 10y agoFunny coincidence, I was actually reading the docs for it last night, and I am struggling to understand the lifetime of a local database. From how I understand it, a local database will persist until the browser clears its cache. What happens in the situation where the cache clearing takes place while you are using the pouchdb database? Can that condition be handled? I thought pouch might be a good fit for a web app you could use offline - you'd need connectivity to login or whatever, and sync the database initially. Then you'd modify the local one and sync it when it's all done, saving round trips to the server. But that also raises the question - on the server side, is one database per user feasible? IIRC Couch can only handle 100 or so different databases on one instance. And you can't do views across them.
- brazzledazzle 10y agoI've been wondering the same. What would the alternative be? Sync between two pouchdb instances (one client and one server) and then sync the server-side pouchdb to couchdb?
- davidbanham 10y agoClient side pouch happily syncs directly with server side couch
- brazzledazzle 10y agoRight, but how do you scale that out on the server-side while protecting data on a per-user basis? Sorry if I'm missing something obvious.
- exclusiv 10y agoI let the user decide to logout and destroy or just logout if it's a trusted device but obviously the local db could be accessed. Most users don't logout and I set a long cookie expiration. You could also encrypt data.
- 10y ago
- tzm 10y agoSurprised? A post about PouchDB appears on HN approx every 90 days, most hit the front page. Great project, but it's more popular than you may realize.
- deleted 10y ago[deleted]