Hi,
a little rant on the current and new config subsystems.
The current one is... well, let's just say that throwing it
away would be an act of mercy, and be done with it. It's blocking
our evolution in every direction that requires new configuration
elements.
The one proposed in the Refractions funded study looks better,
yet forgets again configuration info mantainance. Let me elaborate
this. The new prototype is hibernate based. Hibernate is an O/R mapper
that allows you to write an application in OO terms and be independent
of the underlying DB. It can create the DB schema for you.
Storing config in a database allows for easy clustering.
Isn't it great? Well, I'll tell you what: no, it's not, from
a database maintainance point of view it is not.
I've adopted Hibernate when it was 0.8.1 and developed applications
based on it for four years before joining Geoserver, so to some
extent I know what I'm talking about. And what I'm talking about
is schema evolution.
When everything is set into stone, you can use Hibernate to jump
from one db to the other, and it's a neat pleasure.
Yet this very flexibility comes to bite you when it's time to
evolve the schema.
Hibernate has a tool that tries to figure out the alter table
needed (http://www.hibernate.org/hib_docs/v3/reference/en/html/toolsetguide.html#toolsetguide-s1-6).
In my experience, it works fine only with the most trivial changes,
such as adding a nullable field to a bean.
Need to add a new association? Or to add a non nullable field?
Then you have to roll your own alter tables, updates and whatnot.
I had to do that various times with applications in production,
but I had one/two target databases, and the changes where incremental,
so each time I had from 3 to 10 sql statements to execute.
Now, picture a situation in which we ship GeoServer with a
hibernate based configuration. People start deploying it on
4 different database (hsql, mysql, postgres, oracle).
Then we ship Geoserver n+1, which has some (eventual serious) configuration changes. For which database do we hand write
the sql upgrade scripts? Do we test for all of them?
If we're not prepared to do so, then the statement that
the configuration can be stored in various database becomes
a bad joke... our users will have to try out database upgrades
without knowing anything about the code that reads them and
so on. I mean, an issue with database structure alteration will
require someone with a debugger to track down what's going
on.
A file system based config does not have these issues, and
tools like XStream will tolerate schema changes without
much fuss.
I'm not saying we should go in one direction or the other,
just want to make sure we're aware of what are the
consequences of our decisions.
Cheers
Andrea