views:

132

answers:

1

What is the best way to generate and maintain several ranking lists for the home page of a website/webapp? e.g. hot posts, most recent posts, most comments, most consecutive wins etc.

Currently, I'm thinking about using a cron job scheduler to run the queries to gather the statistics, run an algorithm on the statistics and then finally generate the ranking lists which will then be saved to a temporary table in mysql.

However, I'm not sure if this is the most efficient way to go about this. I'd imagine the use of some caching will help as well.

Note: I'm using the grails web application framework.

Thanks.

+1  A: 

You might also want to consider using Quartz plugin to schedule your tasks.

http://grails.org/Quartz+plugin

Thanks for the tip. It seems like an useful plugin.
Walter