Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 13647 invoked from network); 16 Feb 2011 23:34:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Feb 2011 23:34:37 -0000 Received: (qmail 54626 invoked by uid 500); 16 Feb 2011 23:34:35 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 54580 invoked by uid 500); 16 Feb 2011 23:34:34 -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 54567 invoked by uid 99); 16 Feb 2011 23:34:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 23:34:34 +0000 X-ASF-Spam-Status: No, hits=1.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dave@meebo-inc.com designates 74.125.149.203 as permitted sender) Received: from [74.125.149.203] (HELO na3sys009aog110.obsmtp.com) (74.125.149.203) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 23:34:29 +0000 Received: from source ([209.85.216.47]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKTVxe8NpfCownMg6V0cSoFWL6TSXkQ0PH@postini.com; Wed, 16 Feb 2011 15:34:08 PST Received: by mail-qw0-f47.google.com with SMTP id 2so1790454qwi.34 for ; Wed, 16 Feb 2011 15:34:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.89.84 with SMTP id d20mr1459244qcm.100.1297899247606; Wed, 16 Feb 2011 15:34:07 -0800 (PST) Received: by 10.220.53.141 with HTTP; Wed, 16 Feb 2011 15:34:07 -0800 (PST) In-Reply-To: References: <1297883949310-6033138.post@n2.nabble.com> <1297886441420-6033316.post@n2.nabble.com> Date: Wed, 16 Feb 2011 15:34:07 -0800 Message-ID: Subject: Re: Patterns for writing enterprise applications on cassandra From: Dave Revell To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016364ede489ba0d5049c6eb750 --0016364ede489ba0d5049c6eb750 Content-Type: text/plain; charset=ISO-8859-1 Re Anthony's statement: > So it can be done and frameworks like CAGES are showing a way forward. At > the heart of it, there will need to be a Two-Phase commit type protocol > coordinator that sits in front of Cassandra. Of which - one can be sure - there > will be many implementations / best practices in the coming months. I disagree. I think anyone who wants transactions should pick a database that supports them. Bolting a transactional system on top could perhaps be made to work at great cost if you always used CL ALL for every operation. I personally don't think it's possible, but I can't actually prove it. Consider how to enforce: 1) atomicity: you need some kind of undo/redo logging system with crash recovery to handle partially-executed transactions. This is a lot of tricky Cassandra-specific code. A locking system isn't good enough. 2) isolation: lock managers are f*&^ing hard, especially handling the failure cases. Performant deadlock detection is difficult. Getting sufficiently fine-grained locks would require Cassandra-specific code. I'm trying to argue that these features belong inside the database, and not bolted on top, so you should use a database that includes them. Plainly: don't use Cassandra for applications that require transactions. However, if you can express your app without the need of transactions, that where Cassandra really shines. +1 on Nate's recommendation to read the Helland paper. Contentiously, Dave On Wed, Feb 16, 2011 at 2:20 PM, Nate McCall wrote: > I found the following paper (PDF) very helpful in shaping my thoughts > about what it means to build systems without transactions. > > http://www.ics.uci.edu/~cs223/papers/cidr07p15.pdf > > "LIfe Beyond Distributed Transactions: an Apostate's Opinion" by Pat > Helland > > On Wed, Feb 16, 2011 at 2:00 PM, tijoriwala.ritesh > wrote: > > > > Thanks a lot Anthony. That does help me think on possible options... > > -- > > View this message in context: > http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-enterprise-applications-on-cassandra-tp6030077p6033316.html > > Sent from the cassandra-user@incubator.apache.org mailing list archive > at Nabble.com. > > > --0016364ede489ba0d5049c6eb750 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Re Anthony's statement:

> So it can be done and frameworks like CAGES are showing= a way forward. At=A0
> the heart of it, the= re will need to be a Two-Phase commit type protocol
> coordinator that sits in front = of Cassandra. Of which - one can be sure - there
> will be many impleme= ntations / best practices in the coming months.

I disagree. I thin= k anyone who wants transactions should pick a database that supports them. = Bolting a transactional system on top could perhaps be made to work at grea= t cost if you always used CL ALL for every operation. I personally don'= t think it's possible, but I can't actually prove it.

Consider how to enforce:
1) atomicity: you ne= ed some kind of undo/redo logging system with crash recovery to handle part= ially-executed transactions. This is a lot of tricky Cassandra-specific cod= e. A locking system isn't good enough.
2) isolation: lock managers are f*&^ing hard, especially handling = the failure cases. Performant deadlock detection is difficult. Getting suff= iciently fine-grained locks would require Cassandra-specific code.

I'm trying to argue that these features belong insi= de the database, and not bolted on top, so you should use a database that i= ncludes them.

Plainly: don't use Cassandra for= applications that require transactions.=A0However, if you can express your= app without the need of transactions, that where Cassandra really shines.<= /div>

+1 on Nate's recommendation to read the Helland pap= er.

Contentiously,
Dave

On Wed, Feb 16, 2011 at 2:20 PM, Nate McCall <nate@datastax.com= > wrote:
I found the following paper (PDF) very help= ful in shaping my thoughts
about what it means to build systems without transactions.

http://www.ics.uci.edu/~cs223/papers/cidr07p15.pdf

"LIfe Beyond Distributed Transactions: an Apostate's Opinion"= by Pat Helland

On Wed, Feb 16, 2011 at 2:00 PM, tijoriwala.ritesh
> Thanks a lot Anthony. That doe= s help me think on possible options...
> --
> View this message in context: http://cassand= ra-user-incubator-apache-org.3065146.n2.nabble.com/Patterns-for-writing-ent= erprise-applications-on-cassandra-tp6030077p6033316.html
> Sent from the c= assandra-user@incubator.apache.org mailing list archive at Nabble.com.<= br> >

--0016364ede489ba0d5049c6eb750--