Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 56064 invoked from network); 24 Jun 2010 15:20:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Jun 2010 15:20:02 -0000 Received: (qmail 13432 invoked by uid 500); 24 Jun 2010 15:20:00 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 13385 invoked by uid 500); 24 Jun 2010 15:20:00 -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 13377 invoked by uid 99); 24 Jun 2010 15:19:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jun 2010 15:19:59 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dmitriid@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jun 2010 15:19:54 +0000 Received: by fg-out-1718.google.com with SMTP id d23so2094915fga.7 for ; Thu, 24 Jun 2010 08:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=rpJn2boRWy7P+5X17O35/05w3dmzq4Urz3Bvb02jrE4=; b=kn4BMtyjHrfFNfLnes2EaiaO2kRq4R3ca5uz9LWhsjscUj9oUkUydNcodPBg6XF/JM ygog9VLTnPBcZEzlFKD35DvDN/pevXr9zPUnT1JHPDTWLW4HMj3fujxAjesyroblUcds EPQ4VTm55RHS4uU6R/k5UuYXxXC0Sc+nrvHD4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=DpKm8k0p4gMIjnf5IYO4D4Fna1fCORTDvl2fgJ8ioPdqV4m/5meEX4ByZTBFjnznV9 DkzN5guzaXPe8/AMm5t+Ezy6VyX7f+OV81VRr67+1PNbZfFaXdfs3XKr9xPgUvmL7Xj4 72Hd/kkT7Ys1E3JF22dfYZ+8EDsJ/yLYIoYXY= MIME-Version: 1.0 Received: by 10.102.16.36 with SMTP id 36mr3191956mup.124.1277392773173; Thu, 24 Jun 2010 08:19:33 -0700 (PDT) Sender: dmitriid@gmail.com Received: by 10.103.212.9 with HTTP; Thu, 24 Jun 2010 08:19:33 -0700 (PDT) In-Reply-To: <18611.150.140.17.75.1277388041.squirrel@webmail.ceid.upatras.gr> References: <18611.150.140.17.75.1277388041.squirrel@webmail.ceid.upatras.gr> Date: Thu, 24 Jun 2010 18:19:33 +0300 X-Google-Sender-Auth: iZOMsWfzYakOKpLRFKIFflzvlHE Message-ID: Subject: Re: Questions about data modeling From: Dmitrii Dimandt To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Indeed. So simple it didn't even cross my mind :) Thank you! On Thu, Jun 24, 2010 at 5:00 PM, wrote: > About the most popular item, you could probably store the k most popular > items in a ColumnFamily with appropriate columns, and every time someone > casts a vote, check whether they need updating/replacement. > > Alexander > >> I'm currently trying to wrap my head around Cassandra which is definitel= y >> not easy for a mind deeply entrenched in SQL :) >> >> I see how blogs/tweets etc. can be modeled in Cassandra. However, I have= a >> sightly different problem. >> >> Let's say we let the user see a random >> item(article/picture/recipe/you-name-it) and vote for it. We should show >> the most popular items, the last articles/pictures the user has voted fo= r >> etc. >> >> 1. How can I show the most popular items? >> 2. How can I present the user with a random item he hasn't seen yet? >> >> For the first question I figured I could have a > CompareWith=3D"LongType" =A0Name=3D"Rating"/> and store lists of items p= er each >> rating, updating them as necessary. Can't figure out a way to correctly >> implement question number 2. >> > >