ericflo's django-tokyo-sessions. A Django sessions backend using Tokyo Cabinet, via Tokyo Tyrant and the PyTyrant library. A fast key/value store is a much better solution for sessions than a relational database.
ericflo's django-tokyo-sessions. A Django sessions backend using Tokyo Cabinet, via Tokyo Tyrant and the PyTyrant library. A fast key/value store is a much better solution for sessions than a relational database.
I think that http://bit.ly/PzNyL is a better solution, Redis is much faster than Tokyo at the cost of some guarantees. Considering that losing sessions is not typically a dealbreaker (In redis sessions can be lost if redis crashes and the database isn't saved) I think it's a good alternative to keep in mind.
Redis looks very neat (I've played with it in the past) but there's no way I'd trust it with any data at the moment - it doesn't strike me as a very mature project yet. Tokyo Cabinet has some pretty solid pedigree, plus 11,000 read/writes a second is more than enough for my purposes.
Is this better strictly for performance reasons or are there other benefits to using the tokyo stuff? Hearing lots of good things about tokyo lately.
Simon: true, it's not mature, but for sessions I'd trust it. Web apps should be robust enough that a session loss shouldn't cripple them.
Jereme: going to the DB for sessions shouldn't be happening because it happens on every page view, so yes, performance reasons, the entire session mechanism seems kludgy to me and I wish there were a better way to do it.