Is CouchDB good solution?

83 views
Skip to first unread message

Tomas Novak

unread,
Jun 23, 2016, 10:53:12 AM6/23/16
to PouchDB
Hi,

I'm new in documents databases and CouchDB.
I have app to track my spendig. On server is CouchDB and on client(mobile app, web browser) is PouchDB. When I add new item it sync bidirectional between PouchDB and CouchDB.

Questions:
1.) When I will add thousands of items so database on client side will growing up and that couldn't be good. Is any way how sync items only for last few days and when client wants to see older items he click on "show more"? When I remove documents on client PouchDB (because are old and I want more space, it will sync with CouchDB and that's what I don't want, I want remove just localy)

2.) Every item has typical properties like: inserted date, category, description, amount. Is document database like CouchDB good way to store this items. Typical operation is: select all items from last month and from category food. Is this kind of operation without problem on document database.

Thanks

Nolan Lawson

unread,
Jul 14, 2016, 2:10:07 PM7/14/16
to PouchDB
Hi,

PouchDB replication is currently not terribly good at dealing with lots of data and only showing the last little bit. In those cases, though, you can certainly use CouchDB on the server side and then read from the changes feed (e.g. the last n changes on the server), which is very efficient indeed. To do so, you can use PouchDB's http-based APIs (e.g. `new PouchDB('http://site.com/couchdb').changes()`).

Hope that answers your question; it's a pretty broad problem though and there are lots of ways of approaching it.

- Nolan
Reply all
Reply to author
Forward
0 new messages