Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 34586 invoked from network); 21 Mar 2010 22:08:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Mar 2010 22:08:13 -0000 Received: (qmail 46122 invoked by uid 500); 21 Mar 2010 22:08:12 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 46096 invoked by uid 500); 21 Mar 2010 22:08:12 -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 46088 invoked by uid 99); 21 Mar 2010 22:08:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Mar 2010 22:08:12 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of charlie.mas@gmail.com designates 209.85.218.172 as permitted sender) Received: from [209.85.218.172] (HELO mail-bw0-f172.google.com) (209.85.218.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Mar 2010 22:08:05 +0000 Received: by bwz20 with SMTP id 20so596821bwz.6 for ; Sun, 21 Mar 2010 15:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:date:message-id :subject:from:to:content-type; bh=P9X/TeXtPLEiofpA5yj1GAdsGnPY+cxomEMPKD40JiA=; b=GhZJdbojY2ccChKwb0sDtjnZJVLiUQRzrc1t3/Q+7PiK1r+2CjmTHQCeEqf7gDiEQ7 eeK4JQObabB857u1xpPx0px7qMOd1DNDvx/Dz0Pzw/4FecfjPVImzhSPchxk+k21NlBz +SBM/idX6Ku1Xypv/hAJjZNgMXc44MbMRtLeQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; b=Q+eKsTjwiUkijEKtEGUf+mNyDCKjILorc8ciILE/gaoyDu0Zkl3YCzRsrNngvoxWJ1 Gf52RzFEUnre9k0ku4cJEvqyqiM/uvo5UpVp/vQWEfC+xVkUuKNIhO+WL0TNPuT2vvGE QcJTMvHbrBcK6l/Q0SU/hQe+9jPPnMh2sq2Hs= MIME-Version: 1.0 Received: by 10.204.2.196 with SMTP id 4mr653032bkk.121.1269209265162; Sun, 21 Mar 2010 15:07:45 -0700 (PDT) Reply-To: charlie.mas@gmail.com Date: Sun, 21 Mar 2010 22:07:45 +0000 Message-ID: <1960fb141003211507x5e070e7bqadb38ed1aef48db0@mail.gmail.com> Subject: Announcing OCM - The Object Cassandra Mapper From: Charlie Mason To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi All, I am going to be using Cassandra for a project I am working on. To enable me to use it more easily I have built a relatively simple ORM to simplify access to Cassandra and to provide some extra functionality. When I say ORM I am not talking about developing a Hibernate for Cassandra, OCM is much more light weight than that and tailored to the Cassandra data model. It has a simple Specification file format that defines how you want to map your data to objects in your chosen programming language. This is then fed into the OCM complier which generates a series of human readable source files in the specified language. This combined with base OCM library can be used by your app. It also generates the storage-config.xml file for you. Currently there is only a Java backend for the OCM complier, although it should be relatively straight forward to add support for other languages as all the code generation is done form simple Velocity templates. The Java backend uses the Hector library to interface with Cassandra and so benefits from load balancing and connection pooling. OCM has a few extra features on top of basic CRUD style persistence: Any column can be marked as Indexed. OCM automatically maintains a secondary table mapping the column to the key of parent Column Family. Changes made through OCM automatically update the index. It also provides a static method in the Java language to obtain a row using the indexed field e.g. usersByEmail for a standard user table with the user id as the key. Many2Many relationships can also be defined. These are implemented as a Supper Column in both tables. OCM maintains both of these automatically as and when they are updated or removed. The Range Scanner provides a simple interface to obtain records by scanning a accross a number of keys. It splits the range scan into a number of range slice calls, so you can gradually progress through very large scan ranges just be asking for the next row form OCM. Its available under the Apache license on Git Hub. http://github.com/charliem/OCM Let me know what you think or if you have any questions. Contributions are more than welcome if anyone else is interested in using it. Its still a bit rough around the edges although most of the basic functionality is working, at least for Java apps. Charlie M