13 Feb 2005 titus   » (Journeyer)

Beta, beta, beta

zdnet has an article about how beta software "releases" are becoming increasingly prevalent. Google, of course, would be the case in point. Of course, this is part of google's release strategy: "underpromise and overdeliver". Web apps really can get away with this, because it requires no user installation to upgrade to the latest version.

More WSGI

Implemented wsgiMemcached and wsgiPullAdvogato. So, you can now do this:

app = wsgiPullAdvogato.wsgiPullAdvogato()
app = wsgiMemcached.wsgiMemcached(app)

and you'll have a Web app that pulls down posts from Advogato via XML-RPC and caches the results via memcached.

The advogato pull is simple and error-prone, but functions; the memcache middleware works fine, but I'm unhappy with its implementation as middleware. As is, it requires that downstream apps be able to report if a given URL is stale; otherwise the caching system doesn't know when to recache an entry. While I don't think there's any way around changing the app to support caching, right now the system breaks if the downstream app doesn't have this function. After sleeping on it, I think I'll try implementing it as a service passed in via the environ dictionary. Maybe that will be cleaner...

Hmm, then I can write another piece of middleware that looks at the If-Modified-Since headers, groks the cache, and decides whether or not to send. Hmm. (Here is a simple article on HTTP Conditional Get.)

This pipelining ability of WSGI is really nice; I'm constantly thinking of new uses for it. The ability to deploy a Web app in multiple environments by changing only a few lines of code is also very nice -- I did some benchmarking last night, and I switched between CGI and SCGI serving in about 30 seconds.

--titus

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!