| Comments

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

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.