You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Stefan Zoerner <st...@labeo.de> on 2007/01/09 20:13:54 UTC
Reducing the complexity/verbosity of default server.xml (and custom
configuration files)
Hi all!
There is some criticism about configuration complexity of ApacheDS,
especially from people who argue after a first glance at it. The
verbosity is mostly driven by the Spring Framework.
Here are three ideas I had:
---
1) Simplify default server.xml by using another property setting style
Currently, the server.xml seems to favor this style (example):
...
<bean id="systemPartitionConfiguration" class="...">
<property name="name"><value>system</value></property>
<property name="cacheSize"><value>100</value></property>
<property name="suffix"><value>ou=system</value></property>
...
Is there any reason why not to use this style:
...
<bean id="systemPartitionConfiguration" class="...">
<property name="name" value="system" />
<property name="cacheSize" value="100" />
<property name="suffix" value="ou=system" />
...
(quite easy to achieve. I volunteer, if nobody contradicts that this is
a (rather small) imrovement)
---
2) Reduce length of partition configuration
Currently, partition configuration are very long, mostly because of the
many many indices for internal attributes:
...
<bean
class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
<property
name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></property>
<property name="cacheSize"><value>100</value></property>
</bean>
(many others follow, in each partition the same
...
If it is highly recommend to use these indices, how about having a
special IndexConfiguration as a default, which only has to be extended
in order to adjust it to your needs?
---
3. Define our own tags for configuration with the help XML Schema-based
configuration introduced in Spring 2.0. This is more a long term option.
But I think the idea is promising.
What do you think?
Greetings,
Stefan
Re: Reducing the complexity/verbosity of default server.xml (and
custom configuration files)
Posted by Alex Karasulu <ak...@apache.org>.
Tino Schwarze wrote:
> On Tue, Jan 09, 2007 at 08:13:54PM +0100, Stefan Zoerner wrote:
>
>> 2) Reduce length of partition configuration
>>
>> Currently, partition configuration are very long, mostly because of the
>> many many indices for internal attributes:
>> ...
>> <bean
>> class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
>> <property
>> name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></property>
>> <property name="cacheSize"><value>100</value></property>
>> </bean>
>> (many others follow, in each partition the same
>> ...
>>
>> If it is highly recommend to use these indices, how about having a
>> special IndexConfiguration as a default, which only has to be extended
>> in order to adjust it to your needs?
>
> IIRC, these indices are added anyway, even if you don't specify them.
>
> That's at least my observation when running the embedded ApacheDS
> without a server.xml.
>
Yeah they're key system indices that use default for cache settings. I
guess I put this stuff into the config.xml so people can see how to
tweak things to override defaults.
Alex
Re: Reducing the complexity/verbosity of default server.xml (and custom configuration files)
Posted by Tino Schwarze <ap...@tisc.de>.
On Tue, Jan 09, 2007 at 08:13:54PM +0100, Stefan Zoerner wrote:
> 2) Reduce length of partition configuration
>
> Currently, partition configuration are very long, mostly because of the
> many many indices for internal attributes:
> ...
> <bean
> class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
> <property
> name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></property>
> <property name="cacheSize"><value>100</value></property>
> </bean>
> (many others follow, in each partition the same
> ...
>
> If it is highly recommend to use these indices, how about having a
> special IndexConfiguration as a default, which only has to be extended
> in order to adjust it to your needs?
IIRC, these indices are added anyway, even if you don't specify them.
That's at least my observation when running the embedded ApacheDS
without a server.xml.
Bye,
Tino.
--
www.quantenfeuerwerk.de
www.spiritualdesign-chemnitz.de
www.lebensraum11.de
Re: Reducing the complexity/verbosity of default server.xml (and
custom configuration files)
Posted by Alex Karasulu <ak...@apache.org>.
David Jencks wrote:
> I think James Strachan and Dain Sundstrom have cooked up some stuff that
> automatically generates schemas for each bean and then lets you use that
> customized xml for your spring configuration. It's somewhere in the
> xbean project inside geronimo. I'll try to find out more if there's
> interest. I'm pretty sure activeMQ is using this for its
> configuration. From what I've heard its a big improvement over normal
> spring configuration.
>
Thanks David we would appreciate that.
Regards,
Alex
Re: Reducing the complexity/verbosity of default server.xml (and
custom configuration files)
Posted by Alex Karasulu <ak...@apache.org>.
David Jencks wrote:
> We need some kind of xml, so I think devoting a reasonable effort to
> making it really clear, simple, and expressive is a good idea. I
> haven't used it myself but the xbean stuff sounds really good from what
> I've heard.
Yeah I only hear good things about it.
Alex
Re: Reducing the complexity/verbosity of default server.xml (and
custom configuration files)
Posted by Alex Karasulu <ak...@apache.org>.
David Jencks wrote:
> I haven't had time to look into this more but the xbean website does
> discuss how to simplify/customize spring xml with xbean, and it looks
> very easy to do:
> http://geronimo.apache.org/xbean/custom-xml.html
> http://geronimo.apache.org/xbean/editing-custom-xml.html
>
> I hope to have some time to show an example soon but I'm not at all sure
> I will :-( but this is a starting point if anyone else wants to look at it.
>
I might take more of a look at it. I did touch over it actually over
the weekend but like you I did not have much time.
Alex
Re: Reducing the complexity/verbosity of default server.xml (and custom configuration files)
Posted by David Jencks <da...@yahoo.com>.
I haven't had time to look into this more but the xbean website does
discuss how to simplify/customize spring xml with xbean, and it looks
very easy to do:
http://geronimo.apache.org/xbean/custom-xml.html
http://geronimo.apache.org/xbean/editing-custom-xml.html
I hope to have some time to show an example soon but I'm not at all
sure I will :-( but this is a starting point if anyone else wants to
look at it.
thanks
david jencks
On Jan 9, 2007, at 3:02 PM, David Jencks wrote:
>
> On Jan 9, 2007, at 5:29 PM, Emmanuel Lecharny wrote:
>
>> Well, my position is a little bit different. Sure, too much XML suX
>> (ml), but the problem is not that the configuration is huge, it's
>> that we currently don't have tools to manage that (tools = GUI).
>
> I think relying on tools to deal with unnecessary complexity is a
> pretty bad idea. Look at jax-rpc for j2ee :-) -- it's IMO totally
> unusable and incomprehensible because the xml is so awful.
>>
>> But with LdapStudio, I think we might have an acceptable solution :
>> - users who like to click will use it
>
> having tools is definitely good
>> - users who prefer vi and long text file will favor xml files :)
>
> bad xml will drive everyone away, as-simple-as-possible xml will
> let everyone understand what is going on.
>>
>> However, there are so much things in the server.xml file which
>> could be defaulted, that it might be a good idea to spend some
>> time on this subject. I don't really see the point of having all
>> the intercptors exhibited here. Maybe we can default those guys...
>
> defaults are good....
>
> We need some kind of xml, so I think devoting a reasonable effort
> to making it really clear, simple, and expressive is a good idea.
> I haven't used it myself but the xbean stuff sounds really good
> from what I've heard.
>
> thanks
> david jencks
>
>>
>> <snip/>
>>
>> David Jencks a écrit :
>>
>>> I think James Strachan and Dain Sundstrom have cooked up some
>>> stuff that automatically generates schemas for each bean and
>>> then lets you use that customized xml for your spring
>>> configuration. It's somewhere in the xbean project inside
>>> geronimo. I'll try to find out more if there's interest. I'm
>>> pretty sure activeMQ is using this for its configuration. From
>>> what I've heard its a big improvement over normal spring
>>> configuration.
>>>
>>> thanks
>>> david jencks
>>>
>>> On Jan 9, 2007, at 2:13 PM, Stefan Zoerner wrote:
>>>
>>>> Hi all!
>>>>
>>>> There is some criticism about configuration complexity of
>>>> ApacheDS, especially from people who argue after a first glance
>>>> at it. The verbosity is mostly driven by the Spring Framework.
>>>>
>>>> 2) Reduce length of partition configuration
>>>>
>>>> Currently, partition configuration are very long, mostly because
>>>> of the many many indices for internal attributes:
>>>> ...
>>>> <bean
>>>> class="org.apache.directory.server.core.partition.impl.btree.Mutabl
>>>> eIn dexConfiguration">
>>>> <property
>>>> name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></
>>>> property>
>>>> <property name="cacheSize"><value>100</value></property>
>>>> </bean>
>>>> (many others follow, in each partition the same
>>>> ...
>>>>
>>>> If it is highly recommend to use these indices, how about having
>>>> a special IndexConfiguration as a default, which only has to
>>>> be extended in order to adjust it to your needs?
>>>
>> yeah, sure, good point.
>>
>> Stefan, can you do a list of all the elements that could be
>> defaulted ?
>>
>> Emmanuel
>
Re: Reducing the complexity/verbosity of default server.xml (and
custom configuration files)
Posted by Alex Karasulu <ak...@apache.org>.
Emmanuel Lecharny wrote:
> I would favor a simplification of the server.xml file, where default
> values are removed, and with sub-files for, say, partition. I find it a
> little bit complicated to handle many partition configurations in one
> big single xml file !
+1 this is a great idea. Break up the configuration into multiple
files. Don't know if spring can do this using references to load
another file.
Also how will this effect the installation and relative verses full path
names to referred configuration files.
Experiments need to be done.
> Now, we have some other urgent things to handle, like Schema
> refactoring, ugly bugs and pending releases.
100% agree on that.
> I would like to postpone the server.xml refactoring for the next two
> months, but definitively, we need this refactoring to occurs before 1.6
> version.
Yeah right now I don't have the cycles. For me my priorities are:
Dynamic Schema
Multi Master Replication
Getting Triplesec off the ground and working on JACC stuff with David
Oh and all those darn presentations I have to do :).
Regards,
Alex
Re: Reducing the complexity/verbosity of default server.xml (and custom configuration files)
Posted by Emmanuel Lecharny <el...@gmail.com>.
Thanks for the comments, David.
Don't get me wrong. I may have not be very clear in what seems urgent to me,
and what is not (call it the non english native syndrom).
On 1/10/07, David Jencks <da...@yahoo.com> wrote:
>
>
> On Jan 9, 2007, at 5:29 PM, Emmanuel Lecharny wrote:
>
> > Well, my position is a little bit different. Sure, too much XML suX
> > (ml), but the problem is not that the configuration is huge, it's
> > that we currently don't have tools to manage that (tools = GUI).
>
> I think relying on tools to deal with unnecessary complexity is a
> pretty bad idea.
I don't want to rely on tools. Tools are cool, but when it comes to
administrative tasks, text files are better. When I mentionned tools, this
is just because for new commers, the huge and heavy server.xml file is a
little but a PITA to handle.
Look at jax-rpc for j2ee :-) -- it's IMO totally
> unusable and incomprehensible because the xml is so awful.
That's another good point. It's easy to write horrible xml files (but ,
well, just consider that XML has been horribly abused. Or is it that we have
horribly abused XML ? :) ... Ahh those good old property files !
>
> > But with LdapStudio, I think we might have an acceptable solution :
> > - users who like to click will use it
>
> having tools is definitely good
> > - users who prefer vi and long text file will favor xml files :)
>
> bad xml will drive everyone away, as-simple-as-possible xml will let
> everyone understand what is going on.
That's right. Having a click&paste tool won't fix the bad XML :)
>
> > However, there are so much things in the server.xml file which
> > could be defaulted, that it might be a good idea to spend some time
> > on this subject. I don't really see the point of having all the
> > intercptors exhibited here. Maybe we can default those guys...
>
> defaults are good....
>
> We need some kind of xml, so I think devoting a reasonable effort to
> making it really clear, simple, and expressive is a good idea. I
> haven't used it myself but the xbean stuff sounds really good from
> what I've heard.
The problem here is that we have followed a path where we started with
property files, then switched to Spring configuratio files, and we are still
thinking about OSGi. So consider the spring based XML file as temporary.
Alas, temporary solutions are often there for a long long time.
I would favor a simplification of the server.xml file, where default values
are removed, and with sub-files for, say, partition. I find it a little bit
complicated to handle many partition configurations in one big single xml
file !
Now, we have some other urgent things to handle, like Schema refactoring,
ugly bugs and pending releases.
I would like to postpone the server.xml refactoring for the next two months,
but definitively, we need this refactoring to occurs before 1.6 version.
--
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: Reducing the complexity/verbosity of default server.xml (and custom configuration files)
Posted by David Jencks <da...@yahoo.com>.
On Jan 9, 2007, at 5:29 PM, Emmanuel Lecharny wrote:
> Well, my position is a little bit different. Sure, too much XML suX
> (ml), but the problem is not that the configuration is huge, it's
> that we currently don't have tools to manage that (tools = GUI).
I think relying on tools to deal with unnecessary complexity is a
pretty bad idea. Look at jax-rpc for j2ee :-) -- it's IMO totally
unusable and incomprehensible because the xml is so awful.
>
> But with LdapStudio, I think we might have an acceptable solution :
> - users who like to click will use it
having tools is definitely good
> - users who prefer vi and long text file will favor xml files :)
bad xml will drive everyone away, as-simple-as-possible xml will let
everyone understand what is going on.
>
> However, there are so much things in the server.xml file which
> could be defaulted, that it might be a good idea to spend some time
> on this subject. I don't really see the point of having all the
> intercptors exhibited here. Maybe we can default those guys...
defaults are good....
We need some kind of xml, so I think devoting a reasonable effort to
making it really clear, simple, and expressive is a good idea. I
haven't used it myself but the xbean stuff sounds really good from
what I've heard.
thanks
david jencks
>
> <snip/>
>
> David Jencks a écrit :
>
>> I think James Strachan and Dain Sundstrom have cooked up some
>> stuff that automatically generates schemas for each bean and then
>> lets you use that customized xml for your spring configuration.
>> It's somewhere in the xbean project inside geronimo. I'll try to
>> find out more if there's interest. I'm pretty sure activeMQ is
>> using this for its configuration. From what I've heard its a big
>> improvement over normal spring configuration.
>>
>> thanks
>> david jencks
>>
>> On Jan 9, 2007, at 2:13 PM, Stefan Zoerner wrote:
>>
>>> Hi all!
>>>
>>> There is some criticism about configuration complexity of
>>> ApacheDS, especially from people who argue after a first glance
>>> at it. The verbosity is mostly driven by the Spring Framework.
>>>
>>> 2) Reduce length of partition configuration
>>>
>>> Currently, partition configuration are very long, mostly because
>>> of the many many indices for internal attributes:
>>> ...
>>> <bean
>>> class="org.apache.directory.server.core.partition.impl.btree.Mutable
>>> In dexConfiguration">
>>> <property
>>> name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></
>>> property>
>>> <property name="cacheSize"><value>100</value></property>
>>> </bean>
>>> (many others follow, in each partition the same
>>> ...
>>>
>>> If it is highly recommend to use these indices, how about having
>>> a special IndexConfiguration as a default, which only has to be
>>> extended in order to adjust it to your needs?
>>
> yeah, sure, good point.
>
> Stefan, can you do a list of all the elements that could be
> defaulted ?
>
> Emmanuel
Re: Reducing the complexity/verbosity of default server.xml (and
custom configuration files)
Posted by Emmanuel Lecharny <el...@gmail.com>.
Well, my position is a little bit different. Sure, too much XML suX(ml),
but the problem is not that the configuration is huge, it's that we
currently don't have tools to manage that (tools = GUI).
But with LdapStudio, I think we might have an acceptable solution :
- users who like to click will use it
- users who prefer vi and long text file will favor xml files :)
However, there are so much things in the server.xml file which could be
defaulted, that it might be a good idea to spend some time on this
subject. I don't really see the point of having all the intercptors
exhibited here. Maybe we can default those guys...
<snip/>
David Jencks a écrit :
> I think James Strachan and Dain Sundstrom have cooked up some stuff
> that automatically generates schemas for each bean and then lets you
> use that customized xml for your spring configuration. It's
> somewhere in the xbean project inside geronimo. I'll try to find out
> more if there's interest. I'm pretty sure activeMQ is using this
> for its configuration. From what I've heard its a big improvement
> over normal spring configuration.
>
> thanks
> david jencks
>
> On Jan 9, 2007, at 2:13 PM, Stefan Zoerner wrote:
>
>> Hi all!
>>
>> There is some criticism about configuration complexity of ApacheDS,
>> especially from people who argue after a first glance at it. The
>> verbosity is mostly driven by the Spring Framework.
>>
>> 2) Reduce length of partition configuration
>>
>> Currently, partition configuration are very long, mostly because of
>> the many many indices for internal attributes:
>> ...
>> <bean
>> class="org.apache.directory.server.core.partition.impl.btree.MutableIn
>> dexConfiguration">
>> <property
>> name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></
>> property>
>> <property name="cacheSize"><value>100</value></property>
>> </bean>
>> (many others follow, in each partition the same
>> ...
>>
>> If it is highly recommend to use these indices, how about having a
>> special IndexConfiguration as a default, which only has to be
>> extended in order to adjust it to your needs?
>
yeah, sure, good point.
Stefan, can you do a list of all the elements that could be defaulted ?
Emmanuel
Re: Reducing the complexity/verbosity of default server.xml (and custom configuration files)
Posted by David Jencks <da...@yahoo.com>.
I think James Strachan and Dain Sundstrom have cooked up some stuff
that automatically generates schemas for each bean and then lets you
use that customized xml for your spring configuration. It's
somewhere in the xbean project inside geronimo. I'll try to find out
more if there's interest. I'm pretty sure activeMQ is using this
for its configuration. From what I've heard its a big improvement
over normal spring configuration.
thanks
david jencks
On Jan 9, 2007, at 2:13 PM, Stefan Zoerner wrote:
> Hi all!
>
> There is some criticism about configuration complexity of ApacheDS,
> especially from people who argue after a first glance at it. The
> verbosity is mostly driven by the Spring Framework.
>
> Here are three ideas I had:
>
> ---
> 1) Simplify default server.xml by using another property setting style
>
> Currently, the server.xml seems to favor this style (example):
> ...
> <bean id="systemPartitionConfiguration" class="...">
> <property name="name"><value>system</value></property>
> <property name="cacheSize"><value>100</value></property>
> <property name="suffix"><value>ou=system</value></property>
> ...
>
> Is there any reason why not to use this style:
> ...
> <bean id="systemPartitionConfiguration" class="...">
> <property name="name" value="system" />
> <property name="cacheSize" value="100" />
> <property name="suffix" value="ou=system" />
> ...
>
> (quite easy to achieve. I volunteer, if nobody contradicts that
> this is a (rather small) imrovement)
> ---
>
> 2) Reduce length of partition configuration
>
> Currently, partition configuration are very long, mostly because of
> the many many indices for internal attributes:
> ...
> <bean
> class="org.apache.directory.server.core.partition.impl.btree.MutableIn
> dexConfiguration">
> <property
> name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></
> property>
> <property name="cacheSize"><value>100</value></property>
> </bean>
> (many others follow, in each partition the same
> ...
>
> If it is highly recommend to use these indices, how about having a
> special IndexConfiguration as a default, which only has to be
> extended in order to adjust it to your needs?
>
> ---
>
> 3. Define our own tags for configuration with the help XML Schema-
> based configuration introduced in Spring 2.0. This is more a long
> term option. But I think the idea is promising.
>
> What do you think?
>
> Greetings,
> Stefan
>
>
Re: Reducing the complexity/verbosity of default server.xml (and custom configuration files)
Posted by Ersin Er <er...@gmail.com>.
On 1/9/07, Stefan Zoerner <st...@labeo.de> wrote:
> Hi all!
>
> There is some criticism about configuration complexity of ApacheDS,
> especially from people who argue after a first glance at it. The
> verbosity is mostly driven by the Spring Framework.
>
> Here are three ideas I had:
>
> ---
> 1) Simplify default server.xml by using another property setting style
>
> Currently, the server.xml seems to favor this style (example):
> ...
> <bean id="systemPartitionConfiguration" class="...">
> <property name="name"><value>system</value></property>
> <property name="cacheSize"><value>100</value></property>
> <property name="suffix"><value>ou=system</value></property>
> ...
>
> Is there any reason why not to use this style:
> ...
> <bean id="systemPartitionConfiguration" class="...">
> <property name="name" value="system" />
> <property name="cacheSize" value="100" />
> <property name="suffix" value="ou=system" />
> ...
>
> (quite easy to achieve. I volunteer, if nobody contradicts that this is
> a (rather small) imrovement)
> ---
>
> 2) Reduce length of partition configuration
>
> Currently, partition configuration are very long, mostly because of the
> many many indices for internal attributes:
> ...
> <bean
> class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
> <property
> name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></property>
> <property name="cacheSize"><value>100</value></property>
> </bean>
> (many others follow, in each partition the same
> ...
>
> If it is highly recommend to use these indices, how about having a
> special IndexConfiguration as a default, which only has to be extended
> in order to adjust it to your needs?
>
> ---
>
> 3. Define our own tags for configuration with the help XML Schema-based
> configuration introduced in Spring 2.0. This is more a long term option.
> But I think the idea is promising.
Well, when I started reading your email, I thought about this last
item and now I see that you suggested this also. I think this one is
the biggest improvement that can be made in order to greatly simplify
the configuration.
> What do you think?
>
> Greetings,
> Stefan
>
>
>
--
Ersin
Re: Reducing the complexity/verbosity of default server.xml (and
custom configuration files)
Posted by Alex Karasulu <ak...@apache.org>.
Stefan Zoerner wrote:
> Hi all!
>
> There is some criticism about configuration complexity of ApacheDS,
> especially from people who argue after a first glance at it. The
> verbosity is mostly driven by the Spring Framework.
>
> Here are three ideas I had:
>
> ---
> 1) Simplify default server.xml by using another property setting style
>
> Currently, the server.xml seems to favor this style (example):
> ...
> <bean id="systemPartitionConfiguration" class="...">
> <property name="name"><value>system</value></property>
> <property name="cacheSize"><value>100</value></property>
> <property name="suffix"><value>ou=system</value></property>
> ...
>
> Is there any reason why not to use this style:
> ...
> <bean id="systemPartitionConfiguration" class="...">
> <property name="name" value="system" />
> <property name="cacheSize" value="100" />
> <property name="suffix" value="ou=system" />
> ...
Don't know if it will work with spring. Try it in a working ADS
installtion and run your experiment to see.
If it works I like this reduction in noise.
> (quite easy to achieve. I volunteer, if nobody contradicts that this is
> a (rather small) imrovement)
> ---
>
> 2) Reduce length of partition configuration
>
> Currently, partition configuration are very long, mostly because of the
> many many indices for internal attributes:
Yeah you don't need to do an index for it. It can be defaulted.
> ...
> <bean
> class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
>
> <property
> name="attributeId"><value>1.3.6.1.4.1.18060.0.4.1.2.1</value></property>
> <property name="cacheSize"><value>100</value></property>
> </bean>
> (many others follow, in each partition the same
> ...
>
> If it is highly recommend to use these indices, how about having a
> special IndexConfiguration as a default, which only has to be extended
> in order to adjust it to your needs?
Good idea I think we may already have this but I must confirm it.
> ---
>
> 3. Define our own tags for configuration with the help XML Schema-based
> configuration introduced in Spring 2.0. This is more a long term option.
> But I think the idea is promising.
>
> What do you think?
Hmmm I don't even know what this is. I don't have any ideas on Spring
2.0. But from what I can gather from your question above it does sound
like a nice solution to use a custom ads schema.
Regards,
Alex