|XP is just a number|
Daily Countersby docbrown25 (Initiate)
|on May 06, 2013 at 15:13 UTC||Need Help??|
docbrown25 has asked for the
wisdom of the Perl Monks concerning the following question:
Hi All - Looking for some suggestions of how I can/should implement a daily counter solution for a large number of items/users (ie. millions). I need to be able to quickly lookup up the current count for a user and either increment it or skip the user based on a set limit. All the counters will be reset at every day midnight..
My first thought was to just use a BerkeleyDB file, tie it as hash, check the user_id and count, then either imcrement or skip if a limit is reached. Should i create a new file daily or reset all the values in the file?
Does any have any suggestions for alternatives that might be better? Should I use a db mysql? sqlite?
Here is my critera for this:
- must me able to be accessed my multiple scripts at the same time.
- fast lookups
- In the future might need to accessed from multiple servers
Any thoughts or suggestions is appreciated. Thanks