From cassandra-user-return-57-apmail-incubator-cassandra-user-archive=incubator.apache.org@incubator.apache.org Tue May 19 17:19:06 2009 Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 62986 invoked from network); 19 May 2009 17:19:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 May 2009 17:19:05 -0000 Received: (qmail 9737 invoked by uid 500); 19 May 2009 17:19:05 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 9723 invoked by uid 500); 19 May 2009 17:19:05 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 9714 invoked by uid 99); 19 May 2009 17:19:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2009 17:19:05 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,TVD_FW_GRAPHIC_NAME_MID X-Spam-Check-By: apache.org Received-SPF: unknown (nike.apache.org: error in processing during lookup of junrao@almaden.ibm.com) Received: from [32.97.182.144] (HELO e4.ny.us.ibm.com) (32.97.182.144) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2009 17:18:53 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e4.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n4JHEB3R027391 for ; Tue, 19 May 2009 13:14:11 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4JHIWmC249388 for ; Tue, 19 May 2009 13:18:32 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4JHIVcg011975 for ; Tue, 19 May 2009 13:18:31 -0400 Received: from d01ml604.pok.ibm.com (d01ml604.pok.ibm.com [9.56.227.90]) by d01av03.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n4JHIVD3011968 for ; Tue, 19 May 2009 13:18:31 -0400 In-Reply-To: Subject: Re: schema example To: cassandra-user@incubator.apache.org X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 Message-ID: From: Jun Rao Date: Tue, 19 May 2009 10:18:33 -0700 X-MIMETrack: Serialize by Router on D01ML604/01/M/IBM(Release 8.5|December 05, 2008) at 05/19/2009 13:18:31 MIME-Version: 1.0 Content-type: multipart/related; Boundary="0__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6" X-Virus-Checked: Checked by ClamAV on apache.org --0__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6 Content-type: multipart/alternative; Boundary="1__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6" --1__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable Evan, You can watch the video presentation at Facebook from http://code.google.com/p/the-cassandra-project/ (follow the link on the= right). The presentation talks about the schema used by FB for email search. Jun IBM Almaden Research Center K55/B1, 650 Harry Road, San Jose, CA 95120-6099 junrao@almaden.ibm.com = Evan Weaver = = To Sent by: cassandra-user@incubator.apache.= org eweaver@gmail.com = cc = Subj= ect 05/19/2009 09:49 Re: schema example = AM = = = Please respond to = cassandra-user@in = cubator.apache.or = g = = = Even if it's not actually in real-life use, some examples for common domains would really help clarify things. * blog * email storage * search index etc. Evan On Mon, May 18, 2009 at 8:19 PM, Jonathan Ellis wro= te: > Does anyone have a simple app schema they can share? > > I can't share the one for our main app. =A0But we do need an example > here. =A0A real one would be nice if we can find one. > > I checked App Engine. =A0They don't have a whole lot of examples eith= er. > =A0They do have a really simple one: > http://code.google.com/appengine/docs/python/gettingstarted/usingdatast= ore.html > > The most important thing in Cassandra modeling is choosing a good key= , > since that is what most of your lookups will be by. =A0Keys are also = how > Cassandra scales -- Cassandra can handle effectively infinite keys > (given enough nodes obviously) but only thousands to millions of > columns per key/CF (depending on what API calls you use -- Jun is > adding one now that does not deseriailze everything in the whole CF > into memory. =A0The rest will need to follow this model eventually to= o). > > For this guestbook I think the choice is obvious: use the name as the= > key, and have a single simple CF for the messages. =A0Each column wil= l > be a message (you can even use the mandatory timestamp field as part > of your user-visible data. =A0win!). =A0You get the list (or page) of= > users with get_key_range and then their messages with get_slice. > > > > Anyone got another one for pedagogical purposes? > > -Jonathan > -- Evan Weaver = --1__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6 Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline Content-transfer-encoding: quoted-printable

Evan,

You can watch the video presentation at Facebook from http://code.google.com/p/the= -cassandra-project/ (follow the link on the right). The presentatio= n talks about the schema used by FB for email search.

Jun
IBM Almaden Research Center
K55/B1, 650 Harry Road, San Jose, CA 95120-6099

junrao@almaden.ibm.com

3D"InactiveEvan Weaver <evan@cloudbur.st>

=
          Evan Weaver <evan@cloudbur.st>=
          Sent by: eweaver@gmail.com

          05/19/2009 09:49 AM
          Please respond to
          cassandra-user@incubator.apache.org

=
3D=
To
3D""
cassandra-user@incubator.apache.org
3D=
cc
3D""
3D=
Subject
3D""
Re: schema example
3D=3D""


Even if it's not actually in real-life use, some examples for common domains would really help clarify things.

* blog
* email storage
* search index

etc.

Evan

On Mon, May 18, 2009 at 8:19 PM, Jonathan Ellis <jbellis@gmail.com&g= t; wrote:
> Does anyone have a simple app schema they can share?
>
> I can't share the one for our main app. =A0But we do need an examp= le
> here. =A0A real one would be nice if we can find one.
>
> I checked App Engine. =A0They don't have a whole lot of examples e= ither.
> =A0They do have a really simple one:
>
http://code.google.com/appengine/doc= s/python/gettingstarted/usingdatastore.html
>
> The most important thing in Cassandra modeling is choosing a good = key,
> since that is what most of your lookups will be by. =A0Keys are al= so how
> Cassandra scales -- Cassandra can handle effectively infinite keys=
> (given enough nodes obviously) but only thousands to millions of > columns per key/CF (depending on what API calls you use -- Jun is<= br> > adding one now that does not deseriailze everything in the whole C= F
> into memory. =A0The rest will need to follow this model eventually= too).
>
> For this guestbook I think the choice is obvious: use the name as = the
> key, and have a single simple CF for the messages. =A0Each column = will
> be a message (you can even use the mandatory timestamp field as pa= rt
> of your user-visible data. =A0win!). =A0You get the list (or page)= of
> users with get_key_range and then their messages with get_slice. >
> <ColumnFamily ColumnSort=3D"Name" Name=3D"Messag= e"/>
>
> Anyone got another one for pedagogical purposes?
>
> -Jonathan
>



--
Evan Weaver

= --1__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6-- --0__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6 Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <1__=07BBFF28DFCD52D68f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6 Content-type: image/gif; name="pic09348.gif" Content-Disposition: inline; filename="pic09348.gif" Content-ID: <2__=07BBFF28DFCD52D68f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhWABDALP/AAAAAK04Qf79/o+Gm7WuwlNObwoJFCsoSMDAwGFsmIuezf///wAAAAAAAAAA AAAAACH5BAEAAAgALAAAAABYAEMAQAT/EMlJq704682770RiFMRinqggEUNSHIchG0BCfHhOjAuh EDeUqTASLCbBhQrhG7xis2j0lssNDopE4jfIJhDaggI8YB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gmAXI/sPvH ESfCwVt5hTgYiqQqtdRNHQIU1PJ33ZqmzgE90OwLaoJcnMop1WiMmgkPHQRIrwgFuNV90A3doNKT mrKIN07AnGcI9BQjhCBN4RfA1qIZnMqorJCogKfGQnxSCDilTVIA0yl5ciTovgLuBDKFUDE9aQcw 9SA+rjSNf9/M1gxrj6VwDTS0IUSElMzBfsj0NFXR2kwsV1A5IF1grLgLL/r1R40BZEnuBWgmQEyb jqRwSAt6bqMCOFkvKFN2GPPkUzIm/SCF8z8pVzpbjVnMsy0vOr1hw3SaSRUhpY09v0z0J1FnwzPl fmh+xl4WtR0zGu24I4KbMQm3lnVu2oNWxI9W/lcyzA+mCKF4DBikxb/+UWtOGRiFP8qEwAayIgIA Ow== --0__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6 Content-type: image/gif; name="ecblank.gif" Content-Disposition: inline; filename="ecblank.gif" Content-ID: <3__=07BBFF28DFCD52D68f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAABAIAAAAAAAP///yH5BAEAAAEALAAAAAAQAAEAAAIEjI8ZBQA7 --0__=07BBFF28DFCD52D68f9e8a93df938690918c07BBFF28DFCD52D6--