Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 64099 invoked from network); 11 Feb 2011 15:14:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2011 15:14:44 -0000 Received: (qmail 42345 invoked by uid 500); 11 Feb 2011 15:14:42 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 42153 invoked by uid 500); 11 Feb 2011 15:14:38 -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 42140 invoked by uid 99); 11 Feb 2011 15:14:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Feb 2011 15:14:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bill.speirs@gmail.com designates 209.85.213.44 as permitted sender) Received: from [209.85.213.44] (HELO mail-yw0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Feb 2011 15:14:28 +0000 Received: by ywk9 with SMTP id 9so1233929ywk.31 for ; Fri, 11 Feb 2011 07:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=jUDi/5S9ocFXScbzOqDA3MThruFKishX+cF68mduOGs=; b=a2jox+3TXM1UW9xIppkn9qw8ZCDE8XeFcT9Tpz0dAw6/quSM3YHNngPVdN5CGKgIF2 ZWvigDJzWT5qBkT6N0abytlFmaPdc4VdsQ4p+TqSPbaUry0KoMGoJqMF5TJlOZKDm2Wm tsrXdoTCMDndeZj1sFfr3zhuI0k/+2Ums/CJE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=bMoHrIV1dFQ6AoC2U+4bmtJznjlDcyOQkbVEebCl5/Y/3adGPkSsRtCgJxxHwRd44j 4SvLmjpTSyLOCN4mtBjFkVKLa5wh8v/bCr0FdtajRwxFFb+DX7O4XA6XzWVFApbHTfgH rtcSZoxezbQdc4OeMyvwU3R7W4ONjHZS2v3Gg= MIME-Version: 1.0 Received: by 10.101.13.2 with SMTP id q2mr271419ani.148.1297437246547; Fri, 11 Feb 2011 07:14:06 -0800 (PST) Received: by 10.100.46.9 with HTTP; Fri, 11 Feb 2011 07:14:06 -0800 (PST) In-Reply-To: References: Date: Fri, 11 Feb 2011 10:14:06 -0500 Message-ID: Subject: Re: How to store news lists in optimal way? From: Bill Speirs To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I don't know enough about Lucene to comment, but option #2 seems like a bad idea. You shouldn't grow your database by the number of Column Families as there are bad implications to doing this. Option #1 or #3 seems plausible depending upon how much data you have. Hope this helps... Bill- On Fri, Feb 11, 2011 at 4:26 AM, Nikolay Fominyh wrot= e: > Hello. > > We have a problem with finding way to store user news list. > Our task - we have 2 group of filters: > 1) News Types(photo, video, audio, etc... ) > 2) User Lists(user, friends, friends friends, etc..) > > Our solution ways: > 1) Store matrix of filters for each user. > UserNews: > =A0 user_id1: > =A0 =A0 =A0 =A0: (date, uuid) > =A0 =A0 =A0 =A0_: list(date, news_uuid) > =A0 =A0 =A0 =A0_: list(date, news_uuid) > =A0 =A0 =A0 =A0.... > =A0 =A0 =A0 =A0: (date, uuid) > =A0 =A0 =A0 =A0_: list(date, news_uuid) > =A0 =A0 =A0 =A0_: list(date, news_uuid) > =A0 =A0 =A0 =A0... > =A0 ... > =A0 user_idN: > =A0 =A0 =A0 =A0: (date, uuid) > =A0 =A0 =A0 =A0_: list(date, news_uuid) > =A0 =A0 =A0 =A0_: list(date, news_uuid) > =A0 =A0 =A0 =A0.... > =A0 =A0 =A0 =A0: (date, uuid) > =A0 =A0 =A0 =A0_: list(date, news_uuid) > =A0 =A0 =A0 =A0_: list(date, news_uuid) > =A0 =A0 =A0 =A0... > > Numbers of filters in this way more than 100.. > > 2) Store news lists for each user in personal column family. > UserNews_: > =A0 =A0date_uuid: > =A0 =A0 =A0 =A0 : indexed > =A0 =A0 =A0 =A0 : indexed > =A0 =A0 =A0 =A0 > > In this case we have huge number of column families. > > 3) Store news lists in SQL Database and News in Cassandra. > > 4) Use Apache Lucene for indexes on filters. > > Question: What of this ways is most optimal? Is there another ways of sol= utuion? > >