Deliverance

Sun 01 November 2009 by Peter Ward

I've been trying out deliverance, and it is a really nice way of theming websites.

My motivation to use it is this: I want a website, which has various apps (in my case, Trac, HGWeb, SVN, and more), and I want to give all the pages a common theme. Instead of learning each of those application's theming languages (which would all be different, and some don't even have theme support), I want something to work as a "filter" at the web-server level...which is what Deliverance does, basically.

Unfortunately, it has a few things which annoys me. For one, it implements it's own web-server (deliverance-proxy uses paste.httpserver), and doesn't let you choose how to deploy it (e.g.: mod_wsgi on apache would be nice for me). Also, only half of it has been written as WSGI middleware (well, let's make that easily accessible WSGI middleware) - the bit which takes a theme and rules and transforms the content is available as deliverance.middleware.DeliveranceMiddleware. Unfortunately, link rewriting, response and request modifications aren't included in that, so you have to use deliverance-proxy to get them. :(

I've drawn two diagrams to illustrate my thoughts of how Deliverance should work, the first being how I currently understand it to be, and the second showing how I would like it to be. A disclaimer: representing Deliverance in a diagram was tricky, so it's not 100% accurate. Please don't take my lack of pedantry in drawing diagrams for a lack of understanding of how Deliverance works.

How deliverance works (according to me):

A diagram showing the scope of Deliverance - it notably includes deliverance-proxy, the front-end server.

How I think Deliverance should work:

A diagram showing my thoughts on the future of Deliverance - notably, it's entirely one bit of middleware, and just wraps another application (which could use URLMap and Proxy to simulate the previous behaviour)

Some notes on things I'd like to see changed:

  • Deliverance becomes completely usable as a WSGI application - any server can run all the components of Deliverance, instead of just deliverance-proxy.
  • Deliverance wraps another application, which then does any proxying. This way, XML configuration files are replaced with Paste Deploy ini files (using URLMap and Proxy for previous behaviour).
  • Allow different rules to use different themes (I've coded up some preliminary support - see #17 for more details).

Comments