cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Questions about data modeling
Date Thu, 24 Jun 2010 14:00:41 GMT
About the most popular item, you could probably store the k most popular
items in a ColumnFamily with appropriate columns, and every time someone
casts a vote, check whether they need updating/replacement.


> I'm currently trying to wrap my head around Cassandra which is definitely
> not easy for a mind deeply entrenched in SQL :)
> I see how blogs/tweets etc. can be modeled in Cassandra. However, I have a
> sightly different problem.
> Let's say we let the user see a random
> item(article/picture/recipe/you-name-it) and vote for it. We should show
> the most popular items, the last articles/pictures the user has voted for
> etc.
> 1. How can I show the most popular items?
> 2. How can I present the user with a random item he hasn't seen yet?
> For the first question I figured I could have a <ColumnFamily
> CompareWith="LongType"  Name="Rating"/> and store lists of items per each
> rating, updating them as necessary. Can't figure out a way to correctly
> implement question number 2.

View raw message