Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 42509 invoked from network); 3 Feb 2011 19:14:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2011 19:14:04 -0000 Received: (qmail 34037 invoked by uid 500); 3 Feb 2011 19:14:02 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 33989 invoked by uid 500); 3 Feb 2011 19:14: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 33979 invoked by uid 99); 3 Feb 2011 19:14:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Feb 2011 19:14:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of matt.kennedy@spadac.com designates 98.175.4.190 as permitted sender) Received: from [98.175.4.190] (HELO mailer.spadac.com) (98.175.4.190) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Feb 2011 19:13:55 +0000 Received: from SPATCEX003.spadac.com ([10.2.110.199]) by SPATCEX003.spadac.com ([10.2.110.199]) with mapi; Thu, 3 Feb 2011 14:13:34 -0500 From: "Matthew E. Kennedy" To: "user@cassandra.apache.org" Date: Thu, 3 Feb 2011 14:13:33 -0500 Subject: Re: Using a synchronized counter that keeps track of no of users on the application & using it to allot UserIds/ keys to the new users after sign up Thread-Topic: Using a synchronized counter that keeps track of no of users on the application & using it to allot UserIds/ keys to the new users after sign up Thread-Index: AcvD1nOQ2UN6Sfz2TzWtOZOPwTmHJg== Message-ID: <239C144D-D816-4011-BB93-5A734513C121@spadac.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Unless you need your user identifiers to be sequential for some reason, I w= ould save yourself the headache of this kind of complexity and just use UUI= Ds if you have to generate an identifier. On Feb 3, 2011, at 2:03 PM, Aklin_81 wrote: > Hi all, > To generate new keys/ UserIds for new users on my application, I am > thinking of using a simple synchronized counter that can keep track of > the no. of users registered on my application and when a new user > signs up, he can be allotted the next available id. >=20 > Since Cassandra is eventually consistent, Is this advisable to > implement with Cassandra, but then I could also use stronger > consistency level like quorum or all for this purpose. >=20 >=20 > Please let me know your thoughts and suggesttions.. >=20 > Regards > Asil