Andy | 18 Nov 05:18 2010
Picon

simple use cases for couch db


So Ive been obsessively reading about and researching CouchDB over the past couple weeks.  I even wrote my
own Java client since the ones on the market weren't up to my standards :)  I've probably read 200 articles on
google explaining the downsides to CouchDB.  I've read the Use Cases on Couch.io.  Ive read Jan's book, 10
times.  And still I have this one overwhelming question - what can I use it for???  

Im a java developer.  I work in a large enterprise but I also do lots of home projects.  At work we use Oracle with
Hibernate for Java ORM.  At home I use MySQL.  For attachments I use a CDN.  Can anyone explain what real uses I
could use CouchDB for?  Does it help reporting, does it let me index info for that little search bar on most
sites, etc?  It sounds like it isn't great for reporting since people are mixing it with Solr and Lucene and
Elastic Search, correct?  It would be cool to write a site with no middleware (php, java, etc) but I dont plan
on doing that anytime soon.  I did just read a great thesis on that though :)  The offline access feature will
be huge one day.  

Its people like me that kinda like what we hear, we know we love REST and JSON and built in http server, the
replication and clustering and load balancing honestly doesn't mean that much to me.  The no transactions
freaks me out, so does the no ad-hoc querying, but I'd love to learn more.  I would like to use it if I just knew
for what.  Just a few simple use cases that aren't super specific to someones bizarre business process.  How
has it helped you?  Sorry, Ive been waiting all week to ask this question.  I REALLY think this is a great
community and I can't wait to learn more and help promote the uses of this technology.  Thanks-
 		 	   		  
Keith Gable | 18 Nov 05:33 2010
Picon

Re: simple use cases for couch db

On Wed, 2010-11-17 at 22:18 -0600, Andy wrote:
<snip due to Evolution refusing to wrap your message>

Without touching the replication or offline/online stuff as I haven't
used it yet...

CouchDB is useful any time that you would be using a serialized (aka XML
aka JSON aka YAML) column in a relational database. It also works better
for mainly read situations and situations where your queries can be
prewritten and made into Map/Reduce. CouchDB can be used to augment a
RDBMS when you do need to store variable amounts of related structured
data, and it wouldn't surprise me that if at some point someone actually
builds CouchDB into an RDBMS to handle the serialized columns.

The biggest hurdle you have to overcome though is Map/Reduce. Many
queries can't be done in Map/Reduce without some thought, and you have
to think about the startkey/endkey used to query the views as the
"WHERE" portion of your query. It's not nearly as flexible as SQL is,
but it definitely works and is a tool you can use when appropriate.

Apps I'd use CouchDB for: CRM, log aggregator, any app which has
relationships between drastically different object types that should be
in the same table due to a basic commonality (and/or the fact that
JOINing 10 tables together is not fun), MusicBrainz or equavilent,
metadata-heavy apps, metadata aggregators.

I'm not sure I'd use the attachment functionality for larger files
though. But nothing is stopping you from having a "file_uri" property
and pointing it at S3 or whatever.

(Continue reading)

David Rose | 18 Nov 05:43 2010
Picon

Re: simple use cases for couch db

At SXSW, we started using CouchDB last fall because we needed to
create an API for 3rd-party developers to write mobile apps using our
event schedule data. So we copied the needed data from a collection of
legacy databases into a CouchDB, threw in a few views, and, voila... a
fast, well-documented, easy-to-use API. Now, a year later, we've
stopped using the legacy databases altogether, in favor of putting the
data straight into the CouchDB. In-house, we're re-writing our the
apps that drove the schedule portion of our website to use the same
API that our 3rd-party developers are using.

David Rose

On Wed, Nov 17, 2010 at 10:18 PM, Andy <andrhahn@...> wrote:
>
> So Ive been obsessively reading about and researching CouchDB over the past couple weeks.  I even wrote
my own Java client since the ones on the market weren't up to my standards :)  I've probably read 200
articles on google explaining the downsides to CouchDB.  I've read the Use Cases on Couch.io.  Ive read
Jan's book, 10 times.  And still I have this one overwhelming question - what can I use it for???
>
> Im a java developer.  I work in a large enterprise but I also do lots of home projects.  At work we use
Oracle with Hibernate for Java ORM.  At home I use MySQL.  For attachments I use a CDN.  Can anyone
explain what real uses I could use CouchDB for?  Does it help reporting, does it let me index info for that
little search bar on most sites, etc?  It sounds like it isn't great for reporting since people are mixing
it with Solr and Lucene and Elastic Search, correct?  It would be cool to write a site with no middleware
(php, java, etc) but I dont plan on doing that anytime soon.  I did just read a great thesis on that though :)
 The offline access feature will be huge one day.
>
> Its people like me that kinda like what we hear, we know we love REST and JSON and built in http server, the
replication and clustering and load balancing honestly doesn't mean that much to me.  The no
transactions freaks me out, so does the no ad-hoc querying, but I'd love to learn more.  I would like to use
(Continue reading)

Nicholas Orr | 18 Nov 06:58 2010
Picon

Re: simple use cases for couch db

I've been using it for querying read only data, specifically car data. So I
see it as being really useful for storing factual data (catalogs) that
doesn't change, because once a 2010 Toyota Camry is released it never
becomes a 2009 Jeep Cherokee. The applications I'm involved in use car data
for getting specs, proving information to users, being able to calculate
various things and all of this is read and map/reduce is awesome for this
use case. Having a single document for a single car as a single document and
using map/reduce provides instant totals in comparison to MySQL joins...

If you have fairly static dataset (where once an document is created it
doesn't change except for typos) couchdb + map/reduce is really great :)

Nicholas

On Thu, Nov 18, 2010 at 3:18 PM, Andy <andrhahn@...> wrote:

>
> So Ive been obsessively reading about and researching CouchDB over the past
> couple weeks.  I even wrote my own Java client since the ones on the market
> weren't up to my standards :)  I've probably read 200 articles on google
> explaining the downsides to CouchDB.  I've read the Use Cases on Couch.io.
>  Ive read Jan's book, 10 times.  And still I have this one overwhelming
> question - what can I use it for???
>
> Im a java developer.  I work in a large enterprise but I also do lots of
> home projects.  At work we use Oracle with Hibernate for Java ORM.  At home
> I use MySQL.  For attachments I use a CDN.  Can anyone explain what real
> uses I could use CouchDB for?  Does it help reporting, does it let me index
> info for that little search bar on most sites, etc?  It sounds like it isn't
> great for reporting since people are mixing it with Solr and Lucene and
(Continue reading)

Richard Metzler | 18 Nov 21:45 2010

Re: simple use cases for couch db

When I think for usecases of CouchDB I tend to think in *documents*.
After all, CouchDB is a document oriented database. So everything that would
require me to use a sheet of paper to accomplish a certain task in the real
world should easily map to a document in CouchDB.

But there are some limitations in CouchDB that make it hard to write certain
real world applications. One of it is the absence of privacy restriction on
document level. (see
http://stackoverflow.com/questions/4101962/restricting-resource-access-in-couchdb-to-exactly-2-users
)

I read that you are working in a large enterprise and I had the idea of a webapp
for applying for holidays/vacation. You basically have a calender and users can
apply for taking days off and their supervisor has to approve it.
Creating the basic app would be quite easy but modeling the security
restrictions might need an extra application layer.

Andy | 18 Nov 23:05 2010
Picon

RE: simple use cases for couch db


Thanks guys for all the info!  It sounds like you have found some grea uses for couchDB.  It has already got my
brain thinking in new ways.  I will try to put together some use cases of my own and share with the group when
ready.  Thanks!  

Andy

 
> To: user@...
> From: richard@...
> Subject: Re: simple use cases for couch db
> Date: Thu, 18 Nov 2010 20:45:43 +0000
> 
> When I think for usecases of CouchDB I tend to think in *documents*.
> After all, CouchDB is a document oriented database. So everything that would
> require me to use a sheet of paper to accomplish a certain task in the real
> world should easily map to a document in CouchDB.
> 
> 
> But there are some limitations in CouchDB that make it hard to write certain
> real world applications. One of it is the absence of privacy restriction on
> document level. (see
> http://stackoverflow.com/questions/4101962/restricting-resource-access-in-couchdb-to-exactly-2-users
> )
> 
> 
> I read that you are working in a large enterprise and I had the idea of a webapp
> for applying for holidays/vacation. You basically have a calender and users can
> apply for taking days off and their supervisor has to approve it.
> Creating the basic app would be quite easy but modeling the security
(Continue reading)

Keith Gable | 18 Nov 23:06 2010
Picon

Re: simple use cases for couch db

> I read that you are working in a large enterprise and I had the idea of a webapp
> for applying for holidays/vacation. You basically have a calender and users can
> apply for taking days off and their supervisor has to approve it.
> Creating the basic app would be quite easy but modeling the security
> restrictions might need an extra application layer.

This is probably possible with CouchDB but I'd seriously think it'd be
easier to write a Rails (or your favorite framework here) app that
does it with CouchDB as the datastore. Just because you can do it all
in JavaScript in CouchDB doesn't necessarily mean you should. But then
there are some apps which totally make sense being done that way.


Gmane