Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 46339 invoked from network); 15 Feb 2011 13:50:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2011 13:50:39 -0000 Received: (qmail 33817 invoked by uid 500); 15 Feb 2011 13:50:37 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 33673 invoked by uid 500); 15 Feb 2011 13:50:34 -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 33664 invoked by uid 99); 15 Feb 2011 13:50:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 13:50:34 +0000 X-ASF-Spam-Status: No, hits=4.0 required=5.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sdolgy@gmail.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qy0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 13:50:25 +0000 Received: by qyk34 with SMTP id 34so2169539qyk.10 for ; Tue, 15 Feb 2011 05:50:04 -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:from:date :message-id:subject:to:content-type; bh=tGmhOLZGhGwMB2/SlWv4uK6pLVf1sN5aSBqg+t8/e5c=; b=No26qKi6PjUO+5oPiYdMRIXGs2cNmzS8+mkB8LgtZZ1lY72c9cwAyC6Vi8VYu3YJ6t KjjmB+mOxYHBwKvggo2NS5xdxhbv03EqJg0GSYvOdxGWlSxIdDssR2UpNNmB6atrZbCD sjQdaL4Mw2w0Bd7UrDqOK8RS3anI4oIQrAh3c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=vpBmes6WKn9WjIhQMM6TIM9DnZN6Zh43c4n0RoHWlh0jfhTo+UvjtZg1OYpCAplfDp OW4ov3dTKDT9rj48D+caSn0l5WtZi7r5vl7ZLmTrv5j8Odzqv/LP3kB2pNzxD9cTBZSM 0C9v39fx+SyTeSv9GsVuxQ7c9ZWTYduEAzrPc= Received: by 10.229.239.141 with SMTP id kw13mr3912240qcb.172.1297777804793; Tue, 15 Feb 2011 05:50:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.226.203 with HTTP; Tue, 15 Feb 2011 05:49:44 -0800 (PST) In-Reply-To: References: From: Sasha Dolgy Date: Tue, 15 Feb 2011 14:49:44 +0100 Message-ID: Subject: Re: online chat scenario To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e68b68b20d5735049c527124 X-Virus-Checked: Checked by ClamAV on apache.org --0016e68b68b20d5735049c527124 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable thanks for the response. thinking about this, this would not allow for the sorting of messages into a chronological order for end user display. i had thought about having each message as its own column against the room or the user, but i have had some inconsistencies in retrieving the data. sometime= s i get 3 columns, sometimes i get 50...( i think this is because of the random partitioner) i had thought about this structure: [messages][nickname][message id =3D> message data] [chatrooms][room_name][message id] this way i can pull all messages a user ever posted, not specific to a room. what i haven't been able to do so far is print the timestamp on the row or column. does this have to be explicitly added somewhere or can it b= e returned as part of a 'get' request? -sd On Tue, Feb 15, 2011 at 2:12 PM, Michal August=FDn wrote: > The schema design depends on chatrooms/users/messages numbers. I.e. you c= an > have one CF, where key is chatroom, column name is username, column value= is > the message and message time is the same as column timestamp. > You can add day-timestamp to the chatroom name to avoid large rows. > > Augi > > 2011/2/15 Andrey V. Panov > > I never did it. But I suppose you can use "chatroom name" as key and stor= e >> messages & nicks as columns in JSON and timestamp as columnName. >> > > --=20 Sasha Dolgy sasha.dolgy@gmail.com --0016e68b68b20d5735049c527124 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
thanks for the response.=A0 thinking about this, this would not allow = for the sorting of messages into a chronological order for end user display= .=A0 i had thought about having each message as its own column against the = room or the user, but i have had some inconsistencies in retrieving the dat= a.=A0 sometimes i get 3 columns, sometimes i get 50...( i think this is bec= ause of the random partitioner)
=A0
i had thought about this structure:
=A0
[messages][nickname][message id =3D> message data]
[chatrooms][room_name][message id]
=A0
this way i can pull all messages a user ever posted, not specific to a= room.=A0 what i haven't been able to do so far is print the timestamp = on the row or column.=A0 does this have to be explicitly added somewhere or= can it be returned as part of a 'get' request?=A0
=A0
-sd
=A0
=A0
On Tue, Feb 15, 2011 at 2:12 PM, Michal August= =FDn <aug= ustyn.michal@gmail.com> wrote:
The schema design depends on cha= trooms/users/messages numbers. I.e. you can have one CF, where key is chatr= oom, column name is username, column value is the message and message time = is the same as column timestamp.=20
You can add day-timestamp to the chatroom name to avoid large rows.

Augi

2011/2/15 Andrey V. Panov <= panov.andy@gmail.= com>=20

I never did it. But I suppose yo= u can use "chatroom name" as key and store messages & nicks a= s columns in JSON and timestamp as columnName.




--
Sasha Dolgy
sasha.dolgy@gmail.com
--0016e68b68b20d5735049c527124--