Tidbits @ Kassemi

A collection of opinions, thoughts, tricks and misc. information.

Thursday, March 30, 2006

 

Zippo - A new handler for mod_python

Hello everyone,

I've just started (and, surprisingly, am almost done) with a new project of mine. You've all probably worked with turbogears and cherrypy, and you're aware of how wonderful they can make life for python web developers. I've been using cherrypy for a while now with a framework of my own very similar to turbogears. In fact, the std matching site that I developed runs on it. I called it zippo.

It got very complicated, as would be expected, and I decided recently I'd take a look into the code and start cleaning it up a bit further. That got me thinking of other development techniques, such as mod_python. I prefer mod_python over cherrypy, as it hooks directly into apache instead of needing to be run through its own server. It makes life a little easier to find hosting (although the folks at python-hosting.com do a good job). So I started to wonder if I could port the zippo cp stuff to mod_python. Sure enough, I found the way to do it, and created my own nifty handler. It's not nearly as full-featured as cherrypy, but it does the job well...

So far I've got the following functional:



I've still got a lot of work to do on refining it until it's ready for production, but I think I'm going to GPL it so all you people who never read my blog can use it, too. For a simple "Hello World" page I'm getting about 560 requests per second with ab (1.7 GHz Pentium4), and with a more complicated page involving user authentication and uncompiled cheetah templates, about 230 rps.. Not all that bad. Give me a few more days and I'll put out the first release.

-James

Comments: Post a Comment



<< Home

Archives

August 2005   September 2005   October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006  

This page is powered by Blogger. Isn't yours?