]]>
]]>

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

 
benchworks/specs/config.txt · Last modified: 2011/07/17 21:05 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Contact Us 24 Hours A Day
SupportContact us 24×7
Emergency? Contact us for help now!
Sales North America(888) 316-9775 or
(208) 473-2904
Sales
Europe
+44-208-133-0309 (UK)
0-800-051-8984 (UK)
0-800-181-0665 (GER)
Training(855) 55TRAIN or
(925) 271-5054

 

Share This
]]> ]]>