TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Realtime metrics using Redis bitmaps

184 pointsby rubyorchardover 13 years ago

7 comments

antirezover 13 years ago
It is very good to see this article and Redis bitmaps exploited, since it is an extremely memory efficient way to store data, and given the encoding, it is extremely fast to also fetch big amount of information this way.<p>I really suggest to also looking at GETRANGE and SETRANGE operations that allow to access sub-ranges of a large bitmap fetching or setting arbitrary ranges fo bits.<p>Probably Lua scripting in 2.6 will enable a lot more interesting things combining server side execution and bitmaps. Thanks for sharing this work.
评论 #3293668 未加载
评论 #3293693 未加载
评论 #3295258 未加载
评论 #3292869 未加载
评论 #3292855 未加载
pshcover 13 years ago
How does it compare with just using sets? Usually only a small fraction of your total userbase is online any given day, especially as dead accounts accumulate... wouldn't the bitmaps be inefficiently sparse?
评论 #3293000 未加载
评论 #3292772 未加载
cmdrkeeneover 13 years ago
Here's a quick ruby implementation:<p><a href="https://github.com/cmdrkeene/bitmap-counter" rel="nofollow">https://github.com/cmdrkeene/bitmap-counter</a>
评论 #3296234 未加载
wahnfriedenover 13 years ago
An honest question: what use are realtime metrics if you can't act on them in realtime? If it takes a day or more to gather enough data to make a decision and react to it with code or otherwise, then anything more than daily metrics seem like a distraction. I suppose it can be useful if you have some automated systems in place or if you're using it for alarms.
评论 #3294187 未加载
yreadover 13 years ago
How do they know that user ids are contiguous?
评论 #3294975 未加载
joshuover 13 years ago
Compressed bitmaps would be cool too.
评论 #3303146 未加载
mythzover 13 years ago
Cool!