News for hackers. Stuff that matters.
Re:Realtime metrics using Redis bitmaps by antirez on Tuesday November 29, 2011 @06:28PM (#3292820)
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.

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.

Probably Lua scripting in 2.6 will enable a lot more interesting things combining server side execution and bitmaps. Thanks for sharing this work.

Re:Realtime metrics using Redis bitmaps by pjscott on Tuesday November 29, 2011 @11:09PM (#3293668)
For example, with Lua scripting, you could add custom commands for working with Bloom filters, to do fast approximate set membership testing:

http://en.wikipedia.org/wiki/Bloom_filter

I'm pretty excited about this.

Re:Realtime metrics using Redis bitmaps by rubyorchard on Tuesday November 29, 2011 @11:17PM (#3293693)
Great point and looking forward to Lua support in 2.6. GETRANGE and SETRANGE operations also allow buffered writes at the collection time because setting bit to 1 is an idempotent operation. They are particularly attractive in sharded environment where one can perform:

  WATCH
  bits = GETRANGE ...
  bits = bits | buffered_bits
  MULTI
  SETRANGE .... bits
  EXEC
Re:Realtime metrics using Redis bitmaps by pbrumm on Wednesday November 30, 2011 @10:14AM (#3295258)
It would be really cool if redis supported the ability to count the high bits in a string as a native command. No need to pull a 16k string down to client

Although it is another command in a growing list of them. maybe something for lua.

Re:Realtime metrics using Redis bitmaps by pjscott on Wednesday November 30, 2011 @02:40PM (#3296526)
This is something that should probably be implemented natively, for speed. Preferably with GCC's __builtin_popcount intrinsic, if it's available.
Re:Realtime metrics using Redis bitmaps by yesbabyyes on Tuesday November 29, 2011 @06:38PM (#3292869)
Bitmaps surely seem usable in Redis today - how can you do AND, OR, XOR on Redis bitmaps in Lua?

Also, will you create some kind of market for Redis scripts? That seems useful - even if it's just links to Github! ;)

Re:Realtime metrics using Redis bitmaps by jubos on Tuesday November 29, 2011 @06:35PM (#3292855)
Just curious, how does the Lua runtime perform with bitmap operations?