Hacker News new | past | comments | ask | show | jobs | submit login
What are the best uses of document stores? (stackoverflow.com)
29 points by mvid on Aug 15, 2010 | hide | past | favorite | 12 comments



CouchDB's killer feature (not mentioned on the linked page) is of course, offline replication. So you can take a copy of the database with you, work in disconnected mode, and synchronize later. And this can be done with any number of users, all writing and synchronizing independently.


People keep mentioning this. What are some real-world uses for this feature? Who is using CouchDB in this fashion, and what are they doing with it?


Here's a CouchApp that (with a non-demo dataset) we use internally for TODO management. I have a copy running on my laptop, on my MacMini at home, on the office server, in the cloud, and of course, on my Android phone. I synchronize them when I feel like it (but I could configure it to continuously synchronize in the background).

http://couchapp.couchone.com/focus/_design/focus/index.html#...

For more info on the method of serving HTML5 apps directly from CouchDB's web-server: http://couchapp.org/page/what-is-couchapp


One example of CouchDB offline replication:

http://one.ubuntu.com/


Of course, data synchronization is never automagic—the dirty little secret of all distributed systems. Merging is hard!


In CouchDB's document model this manifests itself as the challenge of of deciding how to split the results of user interactions across documents. Eg: don't store comments on the blog post document, keep them on their own documents, as they have different update patters. Of course this pattern doesn't answer everything, but it gets the vast middle of use cases.


I am using MongoDB for Cheméo[1]. It is a chemical component properties search engine. The document store is very nice as I can easily store in one document all the data related to a given component (all the properties, the source of the information, etc.).

I keep PostgreSQL for many things, but the "business related" data are stored in Mongo. This is running pretty well and it makes the agile part of the development easy, as one have nearly no impedance miss match between the code and the storage (the MongoDB drivers return ordered dictionaries and lists and I can access them from Python and PHP easily).

I was definitely faster from "idea to market" with Mongo.

[1] http://www.chemeo.com


typically when you need arbitrary many-to-many relationships or multiple range queries, it's hard to use a document database.


True, I have run into these limits with CouchDB. Anyways this is a cool storage and I found workarounds like pre- and post filtering or multiple-step lookups.


oh yeah I love couchdb and document databases in general, it's a wonderful and fundamental tech... it's just a certain amount of effort to stuff a particular problem into a btree format, so sometimes it's easier to work with something like postgres


Structured logging


This will be my next project. You can also use map/reduce for many interesting statistics right in the DB.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: