@Roshan
Yes, I thought about that, but then I wouldn't be able to use the
Random Partitioner.

@Aaron

Do you mean like this: 'timeUUID+ row_key'  as the supercolumn names?
then when retriving the row_key from this column name, will I be
required to parse the name ? How do I do that exactly ?


>Some issues:
>- Will you have time collisions ?
No I wont be mostly having time collisions. If they happen in 1% case,
I dont mind.

>- Not sure what your are storing in the super columns, but their are 
>limitations.
I would be storing maximum 5 subcolumns inside and would be retrieving
them altogether.

>- If you are using cassandra 0.7, have you looked at the secondary indexes ?

Yes I did but I think they are not helpful in my case.

This is what I am trying to do :
******
This is from an older post that I made earlier on the mailing list:-
I am working on a project of Questions/answers forum that allows a
user to follow questions on certain topics from his followies.
I want to build user's news-feed that comprises of only those
questions that have been posted by his followies & tagged on the
topics that he is following.
Simple news-feed design that shows all the posts from network would be
easy to design using Cassandra by executing fast writes to all
followers of a user about the post from user. But for my application,
there is an additional filter of 'followed topics', (ie, the user
receives posts "created by his followies" && "on topics user is
following")

I was thinking of implementing this way:
Initially writing to all followers, the postID of posts from their
network, by adding a supercolumn to the rows of all followers in the
News-feed supercolumnfamily, with supercolumn name as timestamp(for
sort by time) and 5 sub-columns containing the topic tags of that
post.
At the read time, compare subcolumn values with the topics user is
following, if they match then show the post. (I would be required to
fetch the list of followed topics of the user at read time, hence
should I store the topic list as a supercolumn in this Newsfeed
supercolumnfamily only?)

An important point to note that, often, the posts will have zero
subcolumn which would mean that this post has to be shown without
validating with the user's list of followed topics.

There is another view for the users which allows them to see all the
posts from their followies(without topic filters). In this case no
checking of subcolumns for topics will be performed.

I got good insights from Tyler on this, but he was recommending me an
approach which although would be beneficial for reads performance, but
by way of too much denormalizing like 70-80x. I currently fear that
approach and would like to test upon this.
******
any comments, feedback greatly appreciated..

thanks so much!

On 1/14/11, Roshan Dawrani <roshandawr...@gmail.com> wrote:
> It's possible that I am misunderstanding the question in some way.
>
> The row keys can be Time UUIDs and with those row keys as column names, u
> can use comparator TIMEUUIDTYPE to have them sorted by time automatically.
>
> On Fri, Jan 14, 2011 at 9:18 AM, Aaron Morton
> <aa...@thelastpickle.com>wrote:
>
>> You could make the time an a fixed width integer and prefix your row keys
>> with it, then set the comparotor to ascii or utf.
>>
>> Some issues:
>> - Will you have time collisions ?
>> - Not sure what your are storing in the super columns, but their are
>> limitations http://wiki.apache.org/cassandra/CassandraLimitations
>> <http://wiki.apache.org/cassandra/CassandraLimitations>- If you are using
>> cassandra 0.7, have you looked at the secondary indexes ?
>> http://www.riptano.com/blog/whats-new-cassandra-07-secondary-indexes
>>
>> <http://www.riptano.com/blog/whats-new-cassandra-07-secondary-indexes>If
>> you provide some more info on the problem your trying to solve we may be
>> able to help some more.
>>
>> Cheers
>> Aaron
>>
>>
>> On 14 Jan, 2011,at 04:27 PM, Aklin_81 <asdk...@gmail.com> wrote:
>>
>> I would like to keep the reference of other rows as names of super
>> column and sort those super columns according to time.
>> Is there any way I could implement that ?
>>
>> Thanks in advance!
>>
>>
>
>
> --
> Roshan
> Blog: http://roshandawrani.wordpress.com/
> Twitter: @roshandawrani <http://twitter.com/roshandawrani>
> Skype: roshandawrani
>
>                                                    <#>
> <#>
> <#>       <#>
>

Reply via email to