cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya Narayan <ady...@gmail.com>
Subject Re: Design for 'Most viewed Discussions' in a forum
Date Wed, 18 May 2011 17:42:20 GMT
I would arrange for memtable flush period in such a manner that the time
period for which these most viewed discussions are generated equals the
memtable flush timeperiod, so that the entire row of most viewed discussion
on a topic is in one or maximum two memtables/ SST tables.
This would also help minimize several versions of the same column in the row
parts in different SST tables.


On Wed, May 18, 2011 at 11:04 PM, Aditya Narayan <adynnn@gmail.com> wrote:

> *************
> For a discussions forum, I need to show a page of most viewed discussions.
>
> For implementing this, I maintain a count of views of a discussion & when
> this views count of a discussion passes a certain threshold limit, the
> discussion Id is added to a row of most viewed discussions.
>
> This row of most viewed discussions contains columns with Integer names &
> values containing serialized lists of Ids of all discussions whose views
> count equals the Integral name of this column.
>
> Thus if the view count of a discussion increases I'll need to move its 'Id'
> from serialized list in some column to serialized list in another column
> whose name represents the updated views count on that discussion.
>
> Thus I can get the most viewed discussions by getting the appropriate no of
> columns from one end of this Integer sorted row.
>
> ************
>
> I wanted to get feedback from you all, to know if this is a good design.
>
> Thanks
>
>
>
>
>
>

Mime
View raw message