counting # of views, calculating most/least viewed
Friday, April 10, 2009 at 2:10PM
ikatkov in General Discussion
I'm seeking for a design pattern or advice or directions.

I need to count views/downloads of a set of resources, let them to be identified by their respective URLs.
This is not a big problem. I also need to keep a list of viewed/downloaded resources in the last X days. This list needs to be updated every now and then to reflect real last X days of usage. So resources that were requested prior to X days get evicted from it.
So it's sort of a black box, you feed messages (download request) in and it gives you that list of URLs with counters on the other end.

How would you go about designing it?
Article originally appeared on (http://highscalability.com/).
See website for complete article licensing information.