It's been a while, and you may have noticed: 2006 is over. Nevertheless, i'll summarize some stuff I did the days after Christmas.
Who can you trust?
For some stupid reason I didn't visit Berlin to attend the 23rd Chaos Communication Congress as I had planned to do. Number 23, of all things! Well, as the next annual Chaos Communication Congress with a significant number, the 42nd will be pretty soon ... whatever.
Anyway, thanks to the great work the guys did, live audio/video streaming of the lectures in the four auditoriums was available most of the time. However, due to problems with the servers (or so) for Ogg Theora encoding and streaming, only WMV was available, but hey. At least I was able to watch nearly all talks that were interesting to me. Take a look at the stream recordings to satisfy your inquisitiveness of what you have missed.
One of the many listed projects was Infon Battle Arena (description in Congress Wiki), a multiplayer simulation of creature bots. Since those have to be programmed in Lua, I took the chance to get more practical experience with that language.
Aside from the next congress, another major event from the Chaos Computer Club will take place this year: The Chaos Communication Camp, held only every four years, is scheduled for August 8th to 12th and will be located near Berlin (placemark for Google Earth).
Postcards from WSGI-land
While digging deeper, my positive impression of WSGI strenghtens. For example, Paste Deploy has shown me its capabilities: Instead of doing imports and nesting in Python code, the application and middleware stack can easily be composed in simple .ini configuration files. Along with that, parameters can be set there so they will be passed to middlewares or application as intended.
This way, it is possible to set the database URI inside the configuration file (SQLObject includes a middleware module since the 0.8x branch; SQLAlchemy does this to my knowledge, too) or define different combinations of debugging functionality (or none at all).
Typical excerpts from what I currently employ (but slightly simplified by removing the composite section to offer static file serving) follow.
common.ini:
[app:your_app]
paste.app_factory = your_app_pkg:make_app
[pipeline:dynamic]
pipeline = egg:Paste#cgitb egg:Paste#httpexceptions egg:Paste#registry egg:SQLObject your_app
[DEFAULT]
database = mysql://user:passwd@localhost/db
development.ini:
[app:main]
app2 = dynamic
[pipeline:dynamic]
pipeline = egg:Paste#printdebug config:common.ini#dynamic
[DEFAULT]
debug = True
production.ini:
[app:main]
use = config:common.ini#dynamic
Compared to the production setup, the development setup extends the middleware pipeline by adding the printdebug middleware and activating the wrapped CGI traceback module (cgi) in its [DEFAULT] section. Please note that the entry point for the RegistryManager (registry) was not in Paste up to version 1.1.1; I sent Ian the missing lines and he included it in the 1.2 release (whereas 1.2.1 is the current version at the time of writing this).
The .ini files can either be utilized with the paster script that comes with Paste Script (the commands would be paster serve production.ini and paster serve --reload development.ini, respectively) or by calling paste.deploy.loadapp() on them in dispatcher scripts so the app can be deployed behind another webserver, e.g. via CGI or FastCGI (about which I wrote some time ago).