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-cassandra>Was this what you were referring to? I found this one interesting, and keep coming back to it but have some concerns that this is the best way to achieve the same result. -sd On Tue, Feb 15, 2011 at 8:50 PM, Aaron Morton <aa...@thelastpickle.com>wrote: > 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 (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 but don't > sacrifice to much time doing that to keep the real time component. > Here is a presentation of how the chat is made in Facebook, it may be > useful to you : > > > <http://www.erlang-factory.com/upload/presentations/31/EugeneLetuchy-ErlangatFacebook.pdf> > http://www.erlang-factory.com/upload/presentations/31/EugeneLetuchy-ErlangatFacebook.pdf > > It's more focused on erlang, but it might give you ideas on how to deal > with that problem (I am not sure that DB are the best way to deal with > that... but it's just my opinion). > > Victor Kabdebon > <http://www.voxnucleus.fr>http://www.voxnucleus.fr > > > > 2011/2/15 Sasha Dolgy < <sdo...@gmail.com>sdo...@gmail.com> > >> 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.mic...@gmail.com> >> augustyn.mic...@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.a...@gmail.com>panov.a...@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.do...@gmail.com>sasha.do...@gmail.com >> > > -- Sasha Dolgy sasha.do...@gmail.com