Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

All of the points so far are very valid. But I guess I didn't make myself very clear. I'm not looking to support a position that you should use different config syntaxes just willy nilly.

What I'm am essentially building is a config file interface, much like DBI that would all you to divorce how a particular application is configured from the actual code. This isn't for any one particular application, but a library for use in building applications. A config file abstraction layer if you will.

Code cares about very few things when it comes to configuration information. Most in fact are simple scalars of information. Database name, password, number of items to show on a page, etc. Some are lists such as allowed IP ranges. But very little else. Looking at all of the various config file parsers on CPAN show that they all basically provide the same types of operations, just with a different syntax for each ( well most, some have exactly the same syntax, just a different API ).

By admin, I mean whoever is installing, configuring, and/or maintaining the system once it is in production. This could be the same person who wrote it, a different person in the same department, or someone in another country who just happens to be using your software.

I would hope that people would stay consistent within their own realms ( their home, their department, their company, etc. ). But I see this as actually helping with that. Say my shop likes to configure everything in a SQL database. We've written a neat config management tool to make and track changes, etc. Along comes some application we need to fold into our mix, but it uses a INI style flat file configuration. Is having this one app use a different style the end of the world? No. Is it a pain? Sure. Is it a reason to not use the application? Could be, depends on the exact scenario. Wouldn't it be nice if I could use basically whatever configuration method *I* choose and have the application not care?

One situation I run into quite often is that you have a web application written in say mod_perl and you are using PerlSetVars to pass in configuration information. Being a web application written in mod_perl this seems perfectly resonable and expected. Later in life you realize you are going to need to run a couple of cron jobs to do some batch processing in your app that you had not originally forseen. It would be really nice if the cron jobs could simply share the same configuration information as the web portion, but that would non-trivial. So you end up either rewriting the web app's config code to use a flat file format they can both share or duplicate your config via commandline arguments to the cron jobs. In a situation where you have only a few applications to maintain this isn't hard to remember what is where and why. But now expand that situation to where you maintain 75+ different applications written by several different people over the course of the last 7 years. Now it's pretty darn easy to change say a database password or other piece of configuration information in your Apache config, but neglect to make the change in your crontab. That one cron not running could be difference between having a job and not having one. ;)

Here is another example that I hope helps illustrate my point. Suppose you have an application that originally was only supposed to support one instance. Not that there are any real limitations in the application, just that it was never dreamed that you'd want to run multiple of them. So following with that the programmer used a simple configuration system you don't like. For the purposes of this example, let's say we don't like XML config files, or Apache config files, or GUI config apps with a binary registry, whatever... it doesn't matter. For whatever reason you either simply don't like the config system, there are problems with it when using multiple instances of the application, or it simply does not fit in with the overall scheme you are using in a particular realm.

Now suppose you need to run hundreds of them. Maybe in a web hosting scenario. You've got this really great customer management application that handles nearly everything for you in a database, but now you have to write special code to build these text config files, publish them onto the server, etc, etc, etc. If the application had been written to where it was "config system agnostic" you would simply need to change the instance entry in that one file and presto your preferred way of configuration is available.

The goal is to support as many different configuration "systems" as possible. It probably will not be possible to support every feature of every variant of everything out there. But ya' gotta start somewhere. :)

Frank Wiles <frank@revsys.com>
www.revsys.com


In reply to Re^2: RFC: Application Configuration Management by ides
in thread RFC: Application Configuration Management by ides

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-25 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found