cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evan Weaver <>
Subject Re: schema example
Date Tue, 19 May 2009 16:49:21 GMT
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