Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 57071 invoked from network); 19 May 2009 16:50:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 May 2009 16:50:10 -0000 Received: (qmail 49251 invoked by uid 500); 19 May 2009 16:50:10 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 49218 invoked by uid 500); 19 May 2009 16:50:10 -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 49209 invoked by uid 99); 19 May 2009 16:50:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2009 16:50:10 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of eweaver@gmail.com designates 209.85.217.177 as permitted sender) Received: from [209.85.217.177] (HELO mail-gx0-f177.google.com) (209.85.217.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2009 16:50:02 +0000 Received: by gxk25 with SMTP id 25so310351gxk.12 for ; Tue, 19 May 2009 09:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=B9tuFrwK2vITxrrtNdNFz9jq8+ccU73f7lwi0NfWp54=; b=NeYfGw62m6S+LSi40z0GK5auHKALBZpCo/cBNydGzzdzg9LNl1riNny1ja+llemXi3 dkaFrGoFe+QT58oDPBD3Qm8ipUirmmZxqrCM75wPGkhyVAmkHvL8sd9vWrlDKITpxYbt QYc1/ePPAXBUfu669G4E7kYoeHjRp2DS4/Mgs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=cYDpYA8ayqJfE4jijoopmYJgJ8y88EBKo/xI0XpSTpyVmwTLpuv6JSYZSXqBOZI8D0 D6TlNXkoJo+v+/F162IU2YTS5QpBy8zFHzcK7+Uy1e51sHWYAcXw5SwoyiXX5L0h/C49 vZF/Xu3bBnS02Gm9lUSzrtYc7VBe24lgzLuWk= MIME-Version: 1.0 Sender: eweaver@gmail.com Received: by 10.150.51.21 with SMTP id y21mr560108yby.264.1242751781392; Tue, 19 May 2009 09:49:41 -0700 (PDT) In-Reply-To: References: From: Evan Weaver Date: Tue, 19 May 2009 09:49:21 -0700 X-Google-Sender-Auth: ecf786fda197aec5 Message-ID: Subject: Re: schema example To: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 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 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 either. > =A0They do have a really simple one: > http://code.google.com/appengine/docs/python/gettingstarted/usingdatastor= e.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 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 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 > --=20 Evan Weaver