2008/10/19

JRuby with CouchDB

Months ago we talked about a better logging system at the office with one of my colleagues, a Java backend guy. They constantly feel the pain managing the sessions, users and all in an old school system so I started to investigate for a better database in the first place. I did remember to CouchDB as an interesting thingy written in Erlang, a blazingly powerful language, and started playing with it.

It is amazing. It is still in incubation stage but will be one of the best databases in earth. You got all the niceties of Erlang: painless replication, clustering, gazillions possible threads etc. And you know what? No SQL - it is a document orientated database where you can write your views in JavaScript for a JSON structured database!

As Aimee showed us we can connect to CouchDB from Rails so I wanted to discover the possibilities doing this in JRuby. We have a few modules but not supporting automagically the JRuby world due to the misconcern of some Ruby programmers (sorry to say that). So I forked a few popular CouchDB-Ruby adapters and made some updates.

I'm pretty sure with some enhancements RelaxDB and ActiveCouch will be mature soon.

2 comments:

JanL said...

Hi! Thanks for the nice write-up (best DB on earth! :D). We don't believe that the traditional ORM model works well for CouchDB. See http://upstream-berlin.com/2008/09/25/a-couchdb-primer-for-an-activerecord-mindset/ for a discussion. You might want to start looking at CouchRest fo your JRuby efforts. Just a pointer :)

Cheers
Jan
--

Janos Hardi said...

Hi Jan, thanks for the tips, will definitely take a look on CouchRest and all possible solutions that fit JRuby needs :) Keep up the amazing work!