What's a good metric for finding the most active forum thread or game in your database?
Imagine you run a forum like 4chan. You want the most active threads to appear on the first page. You tried sorting topics by last_updated, but the result is chaotic: the threads you see on each refresh are effectively random, and jumping to the second page may show you many of the same results. There must be a more stable algorithm for determining active threads!
Imagine you run a website where people can play and watch games. You want people to see how exciting these games can be the moment they visit your front page. Interacting in your game can be boiled down to generating individual events. But you can't just sort by last_updated because some people play very slowly, and you want to find games that are exciting.
For bonus points, think about how you'd construct a SQL query for maximum activity, or how you could implement this in a server-side cache. Best answers do not require a cron job to preen the data.