Jabberwocky

CouchDB

Posted in rails, ruby by elisehuard on January 19, 2009

One of the Open Source uses of MapReduce is CouchDB, developed by Damien Katz. CouchDB is a document-oriented database – the data is stored in documents that are organized in key-value pairs (JSON). The database engine is written in Erlang, and the queries are formulated not in SQL but in Javascript.

An informative talk on CouchDB by one of the comitters of CouchDB, Jan Lehnhard, at the BBC (who are known for their impressive, forward-thinking IT department).

Why use CouchDB ?

  • when your documents will probably vary a lot (no predefined structure)
  • when your queries will not change (“Relational databases to static data and dynamic queries, CouchDB does dynamic data and static queries) – calculating ‘views’ takes time – once they’re calculated every updated is processed incrementally
  • when your queries can be expressed in map-reduce form
  • when you need your data to be spread around, and to be really scalable generally

There’s several plugins that allow you to use CouchDB on Rails or with Ruby. There’s an interesting (albeit not free) Peepcode screencast on the subject.

ActiveCouch tries to prod the CouchDB adapter into looking like ActiveRecord, but in my opinion that’s not such a good fit. One that definitely deservers mentioning is CouchRest, by one of the core developers of CouchDB, Chris Anderson.

Anyhow – i’d be curious to see some production applications using CouchDB. It’s good to keep in mind that there are other options than relational databases.

note: I had originally put mapreduce and couchdb in one post, but they are two distinct subjects.

Advertisements

One Response

Subscribe to comments with RSS.

  1. […] This post is a good write-up of the more well-known ones. I’ve already posted about CouchDB. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: