Hey there
I'm building something like "Google Analytics" for Appengine but in real time
(Including qps, hourly & daily graphs, backend counters, monitors with alerts, etc...)
The cool thing is that it only uses memcache to increase counters/stats so its
really quick to use in prod code. Every minute I gather all counters and write them to datastore.
It seems to work perfectly for my app (~250qps with about 1000 different counters, and about
1000 counter increases per second)
I can also measure how correct my data is (if stuff flushed in memcache, but so far that never happened),
but it's all based on one assumption:
If I call:
memcache.incr("a", intitail_value=0)
...
memcache.incr("b", initial_value=0)
....
memcache.incr("b", initial_value=0)
....
if "a" is still in the memcache "b" will also be in the memcache and wont have been flushed, correct?
or in other words: If the entity size for two items in the memcache is the same,
does the memcache work like either a LRU or FIFO cache?
Any response is greatly appreciated...
-Andrin