views:

52

answers:

0

Here's my problem: We have N applications running in M different environments (qa/prod/etc.) with P servers per environment. Multiplied out, the number of unique configurations is in the hundreds. Each of these applications has a set of environment-specific properties (public hostname, listening port, max memory, etc.).

Multiplied out, there are thousands of properties to set. However, the actual rules that define what the properties ought to be are significantly simpler. For example, in production environments with two app instances per physical server, one app binds to port 8080 and the other to 8081.

Here's what I want: A language (DSL) with which I can specify the rules that dictate what the property settings ought to be. I'd like to avoid repeating myself. The language ought to be declarative. We're pretty Java-centric, but all I need do do is produce name/value pairs, so I'd hate to limit myself.

Does such a thing exist? I have found nothing.

I suppose I could use Drools or another rules engine, but that's awfully heavy for this purpose. Property files are the lowest common denominator. We can put them into war/ear files, use them to do template-based replacements during builds, etc. There are certainly more elegant ways to solve problems of this nature, but we're kind of stuck with our architectures, at least in the short term.