httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Prucia <>
Subject flood: config file version
Date Sun, 10 Aug 2003 21:06:23 GMT

This is what I have mentioned earlier this day. This introduces a
CONFIG_VERSION define, which is used to represent a certain config file
format. Every time we change config fle format (adding features, moving things
around), we bump this number. This makes easy to determine, that somebody is
using an outdated config file and that it just might not work.

Why such thing? We're using a 'pull' model. We pickup what we need from config
virtually ignoring everything else. This is not like HTTP Server, where every
configuration directive must make sense, or the web server won't even start.
In addition, when some element is missing we asume some reasonable default. So
it is possible that running old config against new release of flood which uses
new config file format, will produce bad results or no results at all. So we
bump CONFIG_VERSION define every time we introduce new feature, or change
config file structure. Running such new flood release against old config
files would produce a warning, to keep user aware of the problem. If this
patch gets accepted, I'll update all config files to config version 1.0.

This brings up another problem. We don't really have config file, but data
mixed with config. The config part (farm, farmer and profile) is the easy
stuff, but the data part (url's) might just be a large block of characters. We
can't just say: ohh... we moved some attributes around, please rewrite your
urllist from scratch. So we have to come up with some tool to convert one file
format to another, when big changes will come. I think since we're in XML
world, an stylesheet would be the best solution.

Another benefit of having versioned config files, is that when we'll have a
bunch of 'URL grabbing apps' (my 'Flood URL Bag' is just around the corner :)
it would be extremally helpfull, to know what config file format to output.
Such applications would probably have their own development cycle, outside
flood repository, so they can't really stay in sync with flood.

Anyway... this is how I see it. Please review it and yell if you find
something, that is really obscure.

Jacek Prucia

View raw message