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:
Any thoughts or suggestions is appreciated. Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Daily Counters
by BrowserUk (Patriarch) on May 06, 2013 at 16:55 UTC | |
by docbrown25 (Initiate) on May 06, 2013 at 17:53 UTC | |
by BrowserUk (Patriarch) on May 06, 2013 at 19:04 UTC | |
by BrowserUk (Patriarch) on May 06, 2013 at 19:27 UTC | |
by docbrown25 (Initiate) on May 06, 2013 at 19:59 UTC | |
by BrowserUk (Patriarch) on May 06, 2013 at 22:05 UTC |