Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

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.

Tagged , , , , , , ,

4 comments

  1. 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.

    @miguel_pilar - 7th May 2009 16:16 - #

  2. 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.

    Simon Willison - 7th May 2009 17:50 - #

  3. 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.

    Jereme Monteau - 7th May 2009 18:07 - #

  4. 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.

    @miguel_pilar - 7th May 2009 22:56 - #

Comments are closed.
A django site