Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 86600 invoked from network); 6 Feb 2011 21:02:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Feb 2011 21:02:55 -0000 Received: (qmail 48690 invoked by uid 500); 6 Feb 2011 21:02:52 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 48623 invoked by uid 500); 6 Feb 2011 21:02:51 -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 48615 invoked by uid 99); 6 Feb 2011 21:02:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Feb 2011 21:02:50 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a48.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Feb 2011 21:02:46 +0000 Received: from homiemail-a48.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a48.g.dreamhost.com (Postfix) with ESMTP id 246644F805B for ; Sun, 6 Feb 2011 13:02:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=subject :references:from:content-type:in-reply-to:message-id:date:to :content-transfer-encoding:mime-version; q=dns; s= thelastpickle.com; b=QKs5SNapAaETDa+0FyT7OAP05eDtbLLRTCH85bi/FdE T9OAxWYlnEJN/f9cWFI00/7feViQ8cpNUQSLAQcI/E/u3dr8bdPcx035yZ/Nbzbg JrGVrOxh/PmD6ou7ZHjiDytaO63b9q9pWHsBnzHB9vnrlyKUCHjZrvmkMdVAmZBw = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h= subject:references:from:content-type:in-reply-to:message-id:date :to:content-transfer-encoding:mime-version; s=thelastpickle.com; bh=m6m1UeosAeLJy21ot9zqWG2Li2g=; b=mo8FcWzU8DdwXDgd3TtcpMthG4u0 BCEvnixCAAn8DKO7jQoXxOdRurvTlIcTTqIzm3rRcm4Fl/N6SosZtzPtc/D3uiN7 SKkJnqnSee63e00zKm2Z59hrDbN3EPwRHYJKOiM+DV6mLJCJ7vRHdyO7+8oDGm1S k2Mth3DJyF0hPNg= Received: from [115.189.239.93] (unknown [115.189.239.93]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a48.g.dreamhost.com (Postfix) with ESMTPSA id CE1CE4F8058 for ; Sun, 6 Feb 2011 13:02:18 -0800 (PST) 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 References: <239C144D-D816-4011-BB93-5A734513C121@spadac.com> From: Aaron Morton Content-Type: text/plain; charset=us-ascii X-Mailer: iPad Mail (8C148) In-Reply-To: Message-Id: <34C71130-58C6-4D8F-AB2D-A9BD7E319FE3@thelastpickle.com> Date: Mon, 7 Feb 2011 10:02:10 +1300 To: "user@cassandra.apache.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (iPad Mail 8C148) If you mix mysql and Cassandra you risk creating a single point of failure a= round the mysql system. If you have use data that changes infrequently, a row cache in cassandra wil= l give you fast reads. Aaron On 5/02/2011, at 8:13 AM, Aklin_81 wrote: > Thanks so much Ryan for the links; I'll definitely take them into > consideration. >=20 > Just another thought which came to my mind:- > perhaps it may be beneficial to store(or duplicate) some of the data > like the Login credentials & particularly userId to User's Name > mapping, etc (which is very heavily read), in a fast MyISAM table. > This could solve the problem of keys though auto-generated unique & > sequential primary keys. I could use the same keys for Cassandra rows > for that user. And also since Cassandra reads are relatively slow, it > makes sense to store data like userId to Name mapping in MyISAM as > this data would be required after almost all queries to the database. >=20 > Regards > -Asil >=20 >=20 >=20 > On Fri, Feb 4, 2011 at 10:14 PM, Ryan King wrote: >> On Thu, Feb 3, 2011 at 9:12 PM, Aklin_81 wrote: >>> Thanks Matthew & Ryan, >>>=20 >>> The main inspiration behind me trying to generate Ids in sequential >>> manner is to reduce the size of the userId, since I am using it for >>> heavy denormalization. UUIDs are 16 bytes long, but I can also have a >>> unique Id in just 4 bytes, and since this is just a one time process >>> when the user signs-up, it makes sense to try cutting down the space >>> requirements, if it is feasible "without any downsides"(!?). >>>=20 >>> I am also using userIds to attach to Id of the other data of the user >>> on my application. If I could reduce the userId size that I can also >>> reduce the size of other Ids, I could drastically cut down the space >>> requirements. >>>=20 >>>=20 >>> [Sorry for this question is not directly related to cassandra but I >>> think Cassandra factors here because of its tuneable consistency] >>=20 >> Don't generate these ids in cassandra. Use something like snowflake, >> flickr's ticket servers [2] or zookeeper sequential nodes. >>=20 >> -ryan >>=20 >>=20 >> 1. http://github.com/twitter/snowflake >> 2. http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-uniq= ue-primary-keys-on-the-cheap/ >>=20