On Thu, Dec 15, 2011 at 3:13 AM, Wolfgang Vogl <aon.912508...@aon.at> wrote: > Hi, > > I have a couple of questions about working with Ruby on Rails and Cassandra. > > > > What is the recommended way of Cassandra integration into a Rails app ? > > active_column > > cassandra-cql > > some other gems? > > > > Is there any reference implementation? > > some projects on github that are using the gems?
Depends on what you're trying to use Cassandra for with Rails. In my project we're using a SQL DB for meta data and Cassandra as our heavy lifting datastore for time series data. After looking at the available Ruby drivers a few months ago (things have changed since then btw), I decided to go with JRuby + Hector. This fit in well with some other requirements I had which JRuby was a great fit (like real threads) and TorqueBox as my application server. Due to how my data is stored, it didn't really matter if I used Hector, CQL or ActiveRecord, I was going to need to write an abstraction layer on top to make it easier to store & retrieve data. And using Hector meant I was using one of the most mature, stable and tested libraries for accessing Cassandra. My project is big enough that not everything is done in RoR... there are some cron jobs as well doing some Map/Reduce like jobs as well. This is where JRuby+Hector really shines since for high performance you really need your client to be multi-threaded since the single threaded performance of Cassandra isn't anything to write home about. Anyways, I'm not sure I would recommend JRuby+Hector if this is the only reason you'd use JRuby over MRI, but if you might find the plethora of Java libraries useful it's definitely worth looking into. -- Aaron Turner http://synfin.net/ Twitter: @synfinatic http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin "carpe diem quam minimum credula postero"