Flow Analysis & Time-based Bloom Filters
igvita.com
igvita.com
[1]: In the comments: "The simple backend I added treats each key as an individual bucket, and based on my rough testing, Redis added about ~130 bytes of overhead per key - which, of course, is a huge difference compared to the bit vector."
[1] http://redis.io/commands/getbit [2] http://redis.io/commands/setbit
The "bit" per key was prior to setbit/getbit functionality. The new implementation is, in fact, very efficient.
https://github.com/igrigorik/bloomfilter-rb/blob/master/lib/...
As the point is to use Redis's expiration feature, which obviously does not apply to individual bits.
Second, an alternative solution might be using multiple, smaller Bloomfilters, and dumping the oldest BF shard whenever the most recent one fills up. This wouldn't be appropriate for all use cases, but it's simpler, and potentially superior in some cases.
So if I'm understanding this, the time-based aspect comes solely from the fact that Redis/the backend is storing the timestamp of entries and also deleting them behind the Bloom filter's back?
Well, that's a lot simpler than the strategies I was imagining.
Thanks!