Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 95771 invoked from network); 26 Apr 2010 17:36:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Apr 2010 17:36:18 -0000 Received: (qmail 96022 invoked by uid 500); 26 Apr 2010 17:36:17 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 96002 invoked by uid 500); 26 Apr 2010 17:36:17 -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 95994 invoked by uid 99); 26 Apr 2010 17:36:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Apr 2010 17:36:17 +0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=AWL,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.205.105.202] (HELO mail.endcrypt.com) (74.205.105.202) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Apr 2010 17:36:12 +0000 Received: from [192.168.1.3] (c-24-60-118-124.hsd1.ma.comcast.net [24.60.118.124]) by mail.endcrypt.com (Postfix) with ESMTP id 8206A318CB for ; Mon, 26 Apr 2010 17:35:50 +0000 (UTC) Message-ID: <4BD5CEF5.70500@endpoint.com> Date: Mon, 26 Apr 2010 13:35:49 -0400 From: Ethan Rowe Reply-To: ethan@endpoint.com Organization: End Point Corporation User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Re: ORM in Cassandra? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 04/26/2010 01:26 PM, Isaac Arias wrote: > On Apr 26, 2010, at 12:13 PM, Geoffry Roberts wrote: > > >> Clearly Cassandra is not an RDBMS. The intent of my Hibernate >> reference was to be more lyrical. Sorry if that didn't come through. >> > >> Nonetheless, the need remains to relieve ourselves from excessive >> boilerplate coding. >> > I agree with eliminating boilerplate code. Chris Shorrock wrote a > simple object mapper in Scala for his Cascal Cassandra client. You may > want to check out the wiki on GitHub > (http://wiki.github.com/shorrockin/cascal/). > > In my opinion, a mapping solution for Cassandra should be more like a > Template. Something that helps map (back and forth) rows to objects, > columns to properties, etc. Since the data model can vary so much > depending on data access patters, any overly structured approach that > prescribes a particular schema will be of limited use. > For what it's worth, this is exactly my opinion after looking at the problem for a bit, and I'm actively developing such a solution in Ruby. I spent some time playing with the CassandraObject project, but felt that despite all the good work that went in there, it didn't feel to me like it fit the problem space in an idiomatic manner. No criticism intended there; it seems to lean a little more towards a very structured schema, with less flexibility for things like collection attributes the members of which all have a key that matches a pattern (which is a use case we have). So, for my approach, there's one project that gives metaprogramming semantics for building the mapping behavior you describe: build classes that are oriented towards mapping between simple JSON-like structures and full-blown business objects. And a separate project that layers Cassandra specifics on top of that underlying mapper tool. The rub being: it's for a client, and we're collectively sorting out the details for releasing the code in some useful, public manner. But hopefully I'll get something useful out there for potential Ruby enthusiasts before too long. Hopefully a week or two. Thanks. - Ethan -- Ethan Rowe End Point Corporation ethan@endpoint.com