Re:Efficient way to calculate active users
by amix on Wednesday June 11, 2014 @11:29AM
(#7878503)
There is a better way to do this by using bitmaps (especially bitmaps in Redis). I recommend looking at https://github.com/Doist/bitmapist
[ Parent
| on HN ]
Re:Efficient way to calculate active users
by kiran_kulkarni on Wednesday June 11, 2014 @11:38AM
(#7878553)
Technically HyperLogLog works on bitmaps, this library leverages this fact and uses Redis bitmaps instead of an in-memory implementation.
Although we are fans of Redis, if you implement it natively you can avoid network latency. Implementing it natively is not a problem because of the commutative nature of HyperLogLog
Further, If one is planning to use Redis it will be better to use built-in HyperLogLog datastructure provided by Redis 2.8.9 as documented here http://antirez.com/news/75