[rrd-users] Using RRD to calculate recently popular users

Simon Hobson linux at thehobsons.co.uk
Tue Dec 9 11:46:39 CET 2008


Gautham Pai wrote:

>We are trying to see if RRDTool is a good fit to build a popularity 
>service for a social network.

No, I don't think it will help you much, if at all.

>The requirements are:
>A unique score is given to every user based on various factors. The 
>number of such users could run into millions. We then feed this 
>score along with the userids to a datastore. We should then be able 
>to query the store for answers to questions like:
>* Who are the top 5 active users in the network?

RRD won't tell you that, you'd have to write a script to extract the 
data and sort it.

>* Who are the top 5 active users in the last one month and how has 
>their activity changed in the last week?

Ditto, RRD won't find the top users for you, but once you've found 
them then it could tell your what their activity has been.

>I read that RRDTool allows only numeric data to be captured. But we 
>need some book-keeping data too that needs to be stored and 
>retrieved later.

Correct, only numeric data is held, and the data elements are static 
- eg you cannot store (user, date/time, activity) tuples. You would 
have to either store a separate database for each user (that's a LOT 
of files), or stuff LOTS of users into one file (really hard to 
manage), or keep a number of files each of which stores data for a 
number of users (also very hard to manage).

>Is it possible to build such a service using RRDTool?

To be honest, I think the work involved in making it fit your needs 
would be more than using a common relational database which would 
probably be able to return most of the information you want using 
it's standard query facilities.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the rrd-users mailing list