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 1E1454F6D for ; Sat, 25 Jun 2011 20:16:05 +0000 (UTC) Received: (qmail 10160 invoked by uid 500); 25 Jun 2011 20:16:02 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 10136 invoked by uid 500); 25 Jun 2011 20:16:01 -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 10128 invoked by uid 99); 25 Jun 2011 20:16:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2011 20:16:01 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=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; Sat, 25 Jun 2011 20:15:52 +0000 Received: from 67-6-222-36.hlrn.qwest.net ([67.6.222.36] helo=[192.168.0.2]) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72) (envelope-from ) id 1QaZGM-0000Yd-Vb for user@cassandra.apache.org; Sat, 25 Jun 2011 20:15:31 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 67.6.222.36 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/gHDMv0jPSWg5ugt+3mUZee7KmUKn9QhY= Message-ID: <4E0641DA.6040207@dude.podzone.net> Date: Sat, 25 Jun 2011 14:15:22 -0600 From: AJ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Re: Concurrency: Does C* support a Happened-Before relation between processes' writes? References: <4E04D867.4090900@dude.podzone.net> <4E056512.30100@dude.podzone.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 6/25/2011 8:24 AM, Edward Capriolo wrote: > I played around with the bakery algorithm and had ok success the > challenges are most implementations assume an n size array of fixed > clients and when you get it working it turns out to be a good number > of cassandra ops to acquire your bakery lock. > I was thinking rather than making certain that there is a column reserved for each node and having to keep it updated, you can just over allocate a large number that would always be enough, like 100. A slice of 100 byte-sized values shouldn't be a significant perf hit vs 3 or 4. If you only have 3 nodes in your cluster and the last 97 go unused, that would be ok; it would be as if those non-existent "customers" never take a number. For optimizing for C*, I think you can get away with minimal getSlices for the loops. If you're lucky, you can fall through all of them using the results from only 1 getSlice. Only if a process is "entering" or has a higher priority number will you need to wait and then do another getSlice and only a slice for the remaining columns. I think my logic is correct; do you agree? Did you have other problems other than performance?