cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Rao <>
Subject Re: schema example
Date Tue, 19 May 2009 17:18:33 GMT


You can watch the video presentation at Facebook from (follow the link on the
right). The presentation talks about the schema used by FB for email

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

             Evan Weaver                                                   
             >                                                          To 
             Sent by:         
             05/19/2009 09:49          Re: schema example                  
             Please respond to                                             

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



On Mon, May 18, 2009 at 8:19 PM, Jonathan Ellis <> wrote:
> Does anyone have a simple app schema they can share?
> I can't share the one for our main app.  But we do need an example
> here.  A real one would be nice if we can find one.
> I checked App Engine.  They don't have a whole lot of examples either.
>  They do have a really simple one:

> The most important thing in Cassandra modeling is choosing a good key,
> since that is what most of your lookups will be by.  Keys 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.  The 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.  Each column will
> be a message (you can even use the mandatory timestamp field as part
> of your user-visible data.  win!).  You get the list (or page) of
> users with get_key_range and then their messages with get_slice.
> <ColumnFamily ColumnSort="Name" Name="Message"/>
> Anyone got another one for pedagogical purposes?
> -Jonathan

Evan Weaver

View raw message