From user-return-17979-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Jun 22 02:59:37 2011 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 4D8C16A96 for ; Wed, 22 Jun 2011 02:59:37 +0000 (UTC) Received: (qmail 80506 invoked by uid 500); 22 Jun 2011 02:59:35 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 80022 invoked by uid 500); 22 Jun 2011 02:59:29 -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 80014 invoked by uid 99); 22 Jun 2011 02:59:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 02:59:28 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [204.13.248.66] (HELO mho-01-ewr.mailhop.org) (204.13.248.66) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 02:59:21 +0000 Received: from 67-6-215-137.hlrn.qwest.net ([67.6.215.137] helo=[192.168.0.2]) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72) (envelope-from ) id 1QZDed-000AVX-At for user@cassandra.apache.org; Wed, 22 Jun 2011 02:58:59 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 67.6.215.137 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+v558KybQNqdoA65e7jbH6W0LLyoqBIdY= Message-ID: <4E015A6F.4060105@dude.podzone.net> Date: Tue, 21 Jun 2011 20:58:55 -0600 From: AJ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Re: Storing Accounting Data References: <4E00D52A.6040409@dude.podzone.net> <4E01073B.6090200@dude.podzone.net> In-Reply-To: Content-Type: multipart/alternative; boundary="------------030700020902010101020800" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------030700020902010101020800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 6/21/2011 3:36 PM, Stephen Connolly wrote: > > writes are not atomic. > > the first side can succeed at quorum, and the second side can fail > completely... you'll know it failed, but now what... you retry, still > failed... erh I'll store it somewhere and retry it later... where do I > store it? > > the consistency level is about tuning whether reads and writes are > replicated/checked across multiple of the replicates... but at any > consistency level, each write will either succeed or fail _independently_ > > you could have one column family which is kind of like a transaction > log, you write a json object of all the mutations you will make, then > you go and make the mutations, when they succeed you write a completed > column to the transaction log... them you can repeat that as often as need > > you could have transactions posted as columns in a row, and to get the > balance you iterate all the columns adding the +'s and -'s > > by processing the transaction log, you could establish the highest > complete timestamp, and add summary balance columns being the running > total up to that point, so that you don't have to iterate everything > > - Stephen > Yeah, it's all more than I want to do. But, I just rediscovered Dominic's Cages . Has anyone tried it? > > --- > Sent from my Android phone, so random spelling mistakes, random > nonsense words and other nonsense are a direct result of using swype > to type on the screen > > On 21 Jun 2011 22:04, "AJ" > wrote: --------------030700020902010101020800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 6/21/2011 3:36 PM, Stephen Connolly wrote:

writes are not atomic.

the first side can succeed at quorum, and the second side can fail completely... you'll know it failed, but now what... you retry, still failed... erh I'll store it somewhere and retry it later... where do I store it?

the consistency level is about tuning whether reads and writes are replicated/checked across multiple of the replicates... but at any consistency level, each write will either succeed or fail _independently_

you could have one column family which is kind of like a transaction log, you write a json object of all the mutations you will make, then you go and make the mutations, when they succeed you write a completed column to the transaction log... them you can repeat that as often as need

you could have transactions posted as columns in a row, and to get the balance you iterate all the columns adding the +'s and -'s

by processing the transaction log, you could establish the highest complete timestamp, and add summary balance columns being the running total up to that point, so that you don't have to iterate everything

- Stephen


Yeah, it's all more than I want to do.  But, I just rediscovered Dominic's Cages.   Has anyone tried it?

---
Sent from my Android phone, so random spelling mistakes, random nonsense words and other nonsense are a direct result of using swype to type on the screen

On 21 Jun 2011 22:04, "AJ" <aj@dude.podzone.net> wrote:

--------------030700020902010101020800--