flashingpumpkin/django-riak-sessions — pull request #5 by danostrowski (2012-05-23 20:32:18+00:00)
Title: Hey, so I added secondary index support...

So, while using Riak sessions in production ... well, basically map/reduce is terrible. Particularly JS based map reduce. I'm using a 3 node cluster and we only have about 250k sessions stored... but, basically running a map reduce to remove old sessions crashes nodes, errors out, etc.

We're using leveldb for secondary index support. So, I patched this library to add 2i support and store the expire and raw key name. Using 2i queries on the sessions is pretty fast and will work for deleting old sessions.

I don't really have any updated tests, but it works for me in production and it's super simple.