4 ms·
That sounded like fun, so: Bloom filters in redis: https://gist.github.com/3936629 https://gist.github.com/3936629 Turns out it's kinda hard to get a decent h
by burke 14y ago
That sounded like fun, so:
Bloom filters in redis: https://gist.github.com/3936629 https://gist.github.com/3936629
Turns out it's kinda hard to get a decent hashing algorithm working in redis-lua-land, but I'm sure an implementation of murmurhash wouldn't be so hard if one had a few hours.
EDIT: It's worth mentioning, too, that we've been using a collection of lua scripts to manage inventory reservations at Shopify since March, and the tech has worked very well for us.
- pjscott 14y agoI was thinking that you could have the client pass in a couple of hash values, and then use linear combinations of them to get a bunch of independent-enough hashes. This is mathematically fine, and hash functions are a dime a dozen when you're not in redis-lua-land. Paper justifying this technique: http://www.eecs.harvard.edu/~michaelm/postscripts/tr-02-05.pdf http://www.eecs.harvard.edu/~michaelm/postscripts/tr-02-05.p...