More powerful parser may be a possible solution. There are two options seen
1. Fully customised configuration grammar. In this case we are flexible with configuration file format. The parser can be written on Perl (YAPP+lexer routine) or on C (lex/yacc)
<var tpcc_warehouses> range=100 </var> <var tpcc_connections> range=1,4,8,16,32,64 iterations=3 restart_mysqld=NO </var>
OR just
var tpcc_warehouses range=100 var tpcc_connections range=1,4,8,16,32,64 iterations= restart_mysqld=NO
+ The most convenient format
- custom parser development is required
2. XML syntax:
It could be more readable and writable by humans:
- XML Format is not supposed to be used by human, I would not like to see it in manually editing config — Vadim Tkachenko 2009/01/21 04:45
<tpcc_connections range="1,4,8,16,32,64" iterations=3 restart_mysqld="NO"/> <innodb_buffer_pool value="3G"/>
But in this case we still should write code to parse data like “1,4,8,16,32,64”.
Or it could be more machine readable:
<tpcc_connections iterations=3 restart_mysqld="NO"> <range>1</range> <range>4</range> <range>8</range> <range>16</range> </tpcc_connection>
+ Ready parser libraries
+ Syntax, structure, types, ranges, allowed values could be automatically validated with XML Schema
+ Easier integration with other software
+ Easy to extend
- Hardly human readable format
- Trade off between “easy to parse” and “easy to write/read by human” (additional parsimg of values like “1,4,8,16,32,64” may be required.
I both cases there two implementation options:
- Perl
- C language
TBD: pros and cons here


