commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From St├ęphane MOR <stephane_lis...@yahoo.fr>
Subject [Configuration] Proposals ...
Date Thu, 13 Jun 2002 01:15:00 GMT
Hi all,

At work, I am building a Configuration framework (I'll call it Sysconf 
at it is the name of the package by now ...)
, and I see that Jakarta also has one...

The goal of this mail is to try and propose certain things for that 
package .

There are differences between the framework that I'm building and this 
one. Sysconf will (have to) :
- be able to read AND write configuration files (among them, properties 
files)
- deal with legacy configuration files, and moreover the trickiest ones 
(smb.conf, ipsec.conf, httpd.conf, etc...)
- validate the fields before writing them (regexp, among other things)
- take care of the layout of the file (which is important when you deal 
about files like smb.conf)
- take an XML descriptor and read/write the files from that
- ease the writing of the XML descriptor using ${foo.bar} expressions 
(which is important when your file contains 10
  or more regexp patterns !!)
- optionnally manage the comments of the fields / entries
- manage cases where a field must be validated against another field 
(ie, if a field of a config file contains "a" & "b", a
  field of another config file might only accept "a" or "b" ...)

I'd like to know if anyone is interested in a package like the Sysconf one .
Anyway, I managed to have the dev work I produce to be Apache licensed, 
so I'm trying to avoid duplication of work.
As it uses exclusively Jakarta packages, I guess it is quite natural 
that it's Apache licensed ...

Here is what I've done so far :
- built the Object Model of the XML descriptor which looks like :
  Configuration
                         -> Expressions (currently called Properties, 
like in Ant, but Expressions is more Jexl-like, IMO ...)
                         -> Files
                                 |     -> Sections
                                 |             |
                                 |             |
                                 |-----> Entries
                                                      -> Fields
                                                                    -> 
Regexps, Strings, And, Or, ... (this may evolve ...)

- Created a SysconfReader that takes the XML descriptor, passes it to 
Betwixt (thanks, Martin, it works, now !! ;-) ),
  and returns a Configuration object
- started a FieldValidator (using Oro and others (probably Drools for 
the And & Or stuff...))
- started the expressions stuff (using Jexl)
- started a ConfigFileReader / Writer
- implemented tests for the OM / Validator (soon starting the Jexl / 
Reader / Writer tests, tomorrow probably)
- started the Javadocs (yerk ! I hate that boring stuff but otherwise I 
get lost myself ...) Anyway, till now it more of a proof of
  concept for my boss, so ...
- started to think about how to easily deal with properties files, but 
the Configuration package doesn't use an OM ...

Here it is, as you may guess it is pretty young but promises to avoid me 
a lot of work later, because I'll have to write
Turbine apps that manage configurations of Samba, Ipsec, (maybe Apache, 
cron) remotely ...

If anyone is interested, you can see the (maven-generated) website of 
the package here : http://www.hasgard.net/commons/sysconf/
(there are no links from the rest of the website yet, as it doesn't do 
many things yet ...)

Let me know if you feel that it can be useful ...
(My company is specialised in system administration, so I know that it 
will be useful to me, but I'd like to know about others ...)

Thanks,
St├ęphane

PS: yep, Martin, you can add this to Betwixt's "powered.xml" ! ;-)


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message