DEV Community

Discussion on: Have anyone tried CouchDB, and various offline implementations (PouchDB)?

Collapse
 
terreii profile image
Christopher Astfalk

Hi, PouchDB and CouchDB have been my main databases for the last few years.

Both are fast. PouchDBs Performance depends on the users drive.
There are also two other bottlenecks:

Both queries (mango and map-reduce) update their indexes only when they are queried. But they then only update what did charge. So your first query will be slow. On the other hand: you have fast writes.

PouchDB has to first download all data. This is not a problem if you don’t use its offline capabilities or if it is ok for your users to wait. To work around this I recommend you to use PouchDB over HTTP and once all data you need switch to the local data.

They focus on their sync capability. Which requires you to structure your data differently.
For example tags. Normally you would store tags some where else as the entity that tag and you would link them together. In CouchDB and PouchDB you Store them in the entity.

For the queries: Mango is easier to learn. Map-Reduce is more powerful, but harder to learn, and must eval your map code.

PouchDBs guide is good to start. PouchDB runs in their site (open your console). It works also offline! CouchDBs introduction explains the data layout really good (and a bunch of other things). It is shipped with CouchDB.

Sorry for the long answer.