incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sasha Dolgy <sdo...@gmail.com>
Subject Re: online chat scenario
Date Tue, 15 Feb 2011 13:49:44 GMT
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.  sometimes
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 => 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 be
returned as part of a 'get' request?

-sd


On Tue, Feb 15, 2011 at 2:12 PM, Michal August├Żn
<augustyn.michal@gmail.com>wrote:

> The schema design depends on chatrooms/users/messages numbers. I.e. you can
> 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 <panov.andy@gmail.com>
>
> I never did it. But I suppose you can use "chatroom name" as key and store
>> messages & nicks as columns in JSON and timestamp as columnName.
>>
>
>


-- 
Sasha Dolgy
sasha.dolgy@gmail.com

Mime
View raw message