online chat scenario

2011-02-15 Thread Sasha Dolgy
hi everyone, is anyone using cassandra as a backend repository for storing and serving online chat information? are you able to share your design thoughts? have you encountered problems with the data structure you've implemented? i was playing with some ideas and each time i come back to

Re: online chat scenario

2011-02-15 Thread Andrey V. Panov
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.

Re: online chat scenario

2011-02-15 Thread Michal Augustýn
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

Re: online chat scenario

2011-02-15 Thread Sasha Dolgy
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.

Re: online chat scenario

2011-02-15 Thread Victor Kabdebon
Hello Sasha. In this sort of real time application the way you insert (QUORUM, ONE, etc..) and the way you retrieve is extremely important because your data may not have had the time to propagate to all your nodes. Be sure to use adequate policies to do that : insert to a certain number of nodes

Re: online chat scenario

2011-02-15 Thread Aaron Morton
There was a by here last year who did something similar and did a nice write up. Cannot find it right now, some googleing may help. Aaron On 16/02/2011, at 2:56 AM, Victor Kabdebon victor.kabde...@gmail.com wrote: Hello Sasha. In this sort of real time application the way you insert

Re: online chat scenario

2011-02-15 Thread Sasha Dolgy
Hi Aaron, I did come across this: http://www.juhonkoti.net/2010/09/25/example-how-to-model-your-data-into-nosql-with-cassandra http://www.juhonkoti.net/2010/09/25/example-how-to-model-your-data-into-nosql-with-cassandraWas this what you were referring to? I found this one interesting, and keep