Re: [Exim] Exim 4 config file: opinions sought

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Jeffrey C. Ollie
Data:  
Para: exim-users
Assunto: Re: [Exim] Exim 4 config file: opinions sought
On Wed, Mar 21, 2001 at 02:05:54PM +0000, Yann Golanski wrote:
> On Wed, Mar 21, 2001 at 05:37:03PM +0500, Dmitry G. Golub wrote:
> > IMHO the best syntax will be a highly redundant syntax like (HT|X)ML:
> > For example:
>
> God no! That would mean creating a parser that will need to check it
> everytime it is read -- it will make it horrendously slow.


I don't think that it would be "horrendously" slower. There are some
libraries out there that will parse XML documents pretty fast.

There would undoubtedly be a performance impact, but there are some
caching strategies that could help deal with that.

> Why bother? It adds complexity with no benefit.


The benefits of using a system like XML are many. Some of the benefits:

o the ability to verify the correctness of config files using external tools
o XML-ified editors make it easier to create correctly structured config files
o access to tools for progammatically dealing with config files outside of exim
o XML has standard methods for including external information and "macros"
o "buzzword compliance" (could be a downside for some people)

For instance, if we defined an XML DTD for Exim 3 config files and
wrote a quick tool to convert the old config file into an XML document
(not a staggeringly complex task, IMHO) you could then use an XSLT
processor to convert the Exim 3 config to Exim 4 config.

Of course, among the downsides are:

o config files become more verbose
o users need to learn at least some XML to be able to edit config files
o the tools for dealing with XML are not always the easiest to install
and use (but this will change over time I'm sure)
o unless PH writes his own parser (a difficult task) Exim will depend on
an external library

Personally, I'd rather see Exim itself stick to reading an simple,
easily parseable format. A third party project could be started up to
develop an XML DTD and tools to translate between an XML document and
an Exim config. In fact, while reading these last few messages on the
subject I started typing up a DTD just to see if it could be done. I
think that it can be done and might even finish it if I get enough
time.

Jeff