Ian Bicking: the old part of his blog

WSGI and paste.proxy

At TOPP we've been working on a project to apply page styles through filtering (very similar in spirit to XSLT-based templating). I'll talk more about that later -- I think it's a really neat project that will let us offer hosted services to activists that look just like native services, while also letting us integrate all our natively hosted apps regardless of platform.

When we started working with the project it used mod_python for doing the filtering. This was hard to setup and hard to test, so we abstracted it out some and I hacked together an implementation using WSGI middleware.

Then we were trying to figure out how to deploy it. We've worked some on making Zope 2 a WSGI app, but I wasn't that confident in using that in production yet, and anyway I wanted to use this now, on the live site, instead of waiting, so we can use this for real internally before we expose it externally. And we want other people to use this stuff too, and if deployment is hard it's a real drag on participation.

At that point it occurred to me that an HTTP proxy would be very useful. And then I realized I already had all the tools I needed, I just needed to plug them together and put a command-line interface in front.

And it all Just Worked. WSGI is awesome.

Created 21 Oct '06