TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Realtime metrics using Redis bitmaps

184 点作者 rubyorchard超过 13 年前

7 条评论

antirez超过 13 年前
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 未加载
pshc超过 13 年前
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 未加载
cmdrkeene超过 13 年前
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 未加载
wahnfrieden超过 13 年前
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 未加载
yread超过 13 年前
How do they know that user ids are contiguous?
评论 #3294975 未加载
joshu超过 13 年前
Compressed bitmaps would be cool too.
评论 #3303146 未加载
mythz超过 13 年前
Cool!