Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A10B9D16 for ; Fri, 16 Dec 2011 18:39:59 +0000 (UTC) Received: (qmail 33831 invoked by uid 500); 16 Dec 2011 18:39:57 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 33802 invoked by uid 500); 16 Dec 2011 18:39:57 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 33794 invoked by uid 99); 16 Dec 2011 18:39:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2011 18:39:57 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of synfinatic@gmail.com designates 209.85.160.44 as permitted sender) Received: from [209.85.160.44] (HELO mail-pw0-f44.google.com) (209.85.160.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2011 18:39:47 +0000 Received: by pbdd12 with SMTP id d12so2528026pbd.31 for ; Fri, 16 Dec 2011 10:39:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=Du2oWCFDJ1oXLknK3JOZykXTGwP/eFiOzxYn3zGdpGg=; b=kDa+AFIRb2kczx0VYCaKAns41dOfUqZ+iAUdA4xp8rMlOf0+Tkd2Ky/pJaEA10wnkY ubDzS5LMevivcMf2i2kOPpKB3camAIqM+F1/3IAG+AJW6YdClbuXMA+9FGDuycu5aiJ+ Gga5zLDQt7UagYGGfy73cKXDpzJKn/U292qzw= Received: by 10.68.73.104 with SMTP id k8mr17626635pbv.104.1324060764303; Fri, 16 Dec 2011 10:39:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.186.3 with HTTP; Fri, 16 Dec 2011 10:39:03 -0800 (PST) In-Reply-To: <000a01ccbb1a$867a0830$936e1890$@aon.at> References: <000a01ccbb1a$867a0830$936e1890$@aon.at> From: Aaron Turner Date: Fri, 16 Dec 2011 10:39:03 -0800 Message-ID: Subject: Re: Using Cassandra in Rails App To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Dec 15, 2011 at 3:13 AM, Wolfgang Vogl wrote= : > Hi, > > I have a couple of questions about working with Ruby on Rails and Cassand= ra. > > > > 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. --=20 Aaron Turner http://synfin.net/=A0 =A0 =A0 =A0=A0 Twitter: @synfinatic http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Win= dows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. =A0 =A0 -- Benjamin Franklin "carpe diem quam minimum credula postero"