Stupid Human Programming
Talk on software development.








Subscribe to "Stupid Human Programming" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


Saturday, November 26, 2005
 

A Pretty Good Configuration System Even Socrates Might Like

How do you configure your system? I've worked on configuration many many times, but I've never done it right. I have come closer this time, but it's not perfect yet.

Ok, so what?

Here's what you'll get if you open up the prize hidden inside:

1. You get a highly configurable system where every stakeholder in the system gets a chance to configure the system in a rational well defined order using a powerful general mechanism. You can configure the same thing from the command, line, from the environment, from a configuration file, or over a command port at runtime.

2. You have an automatic way to provide an interactive interface to every library in an application over multiple interfaces (telnet, http, command line, etc). This means you can configure anything in an application at runtime and you can access all of an application "debug" interfaces at runtime.

3. You get a system is describable at runtime by applications in their own code. I like this better than building meta systems from configuration files. It's simple enough that programmers might just consider doing it because the benefits are many and the costs are few. The tricks are mostly in how everything fits and works together, not in the amount of programmer work that is needed.

Just what is configuration? Anything in a program that can be set or got.

Configuration is all the really sexy stuff in programming like setting log levels for different parts of an application, setting port numbers, setting host names, setting max queue sizes, max error thresholds, turning on and off features, injecting faults, getting application metrics, running tests, invoking functions, and getting values from different layers of a program so you can tell what is going on.

This kind of stuff is certainly boring to non-programmers, but it can be very interesting to programmers. Mostly what's of interest is how bad configuration is usually done. Configuration doesn't get much thought so it ends up being a confusing mix of poorly thought out hacks.

Many times I have witnessed conversations like this:

Socrates: We had a sev 1 bug filed by Giant Corp. Their Whatsit wasn't created when the Whosits happened. The system is still up and running on host Euthyphro. What happened and how can we fix it?

Phaedo : How should I know?

Socrates: Can't we go look?

Phaedo : Look at what?

Socrates: You know, the logs and the programs and see what happened?

Phaedo : No, we don't have anything like that. Just give us the complete state of the system and exactly what happened and we'll recreate the problem. We'll add some debug, put the processes in the debugger, and we'll figure out what happened. It should take about a week to get everything ready and completed. We don't have a test system as big as the real system so it will take some setup time and time to get all the hardware.

Socrates: But we have the system up and running know, can't we look and try to recreate the problem right now?

Phaedo : No, like I said, we can't do that sort of thing.

Socrates: How are we supposed to give you the complete state of the system when you don't keep that sort of information around?

Phaedo : Uh, well, just give us what you got and we'll do our best.

Socrates: This is a really important customer. We need to move fast. What can we do to fix this process in the future?

Phaedo : There's nothing broke! What do you expect us to do? All that logging and other stuff slows the program down, takes up valuable programmer time, and adds complexity.

Socrates: You can't figure how to make it work? We are going to lose a big customer here if we can't get to a root cause by the close of business today.

Phaedo : Well mister smarty pants, what would you do?

Socrates: Nothing, I have a feeling I won't be at this job much longer anyway.

For the rest of the story take a look at http://www.possibility.com/epowiki/Wiki.jsp?page=PrettyGoodConfigurationSystem

comment[]

9:44:47 PM    



Click here to visit the Radio UserLand website. © Copyright 2006 todd hoff.
Last update: 7/11/2006; 12:38:40 PM.
November 2005
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
Oct   Dec