Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 35149 invoked from network); 18 Jul 2007 04:16:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2007 04:16:32 -0000 Received: (qmail 21307 invoked by uid 500); 18 Jul 2007 04:16:26 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 21272 invoked by uid 500); 18 Jul 2007 04:16:26 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 21261 invoked by uid 99); 18 Jul 2007 04:16:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2007 21:16:26 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of akarasulu@gmail.com designates 64.233.184.226 as permitted sender) Received: from [64.233.184.226] (HELO wr-out-0506.google.com) (64.233.184.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2007 21:16:23 -0700 Received: by wr-out-0506.google.com with SMTP id 25so62089wry for ; Tue, 17 Jul 2007 21:16:02 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=ToYcTJVKeRx9OZZ3DsFCnPIAgQ/KBwjNSTAzMlkqtAYfpu2I46/nVcyHiB+0F8CsKtP4GyVZlS/RAMH/qj/6b7U2Ahr99vaBh5cs65xlONIpvh2oI+AcSvwHqBdVcuBpP4NeKF8U0XWEMMENFksvub4hm2OE7dKuExZxsHS4mCw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=VC4W0GSL1S2+Atg9OTvSwIJEsvKinQRPy4UfcDHRJXB3k2YnUNlO4hbRq+dQD9nrKYDd+/JTjxe8LSu3QvtHR2gmP7U7dICBNl4fKwaLj6RC/uWKNku/QFIds1Z7FGQ/A9Z3/dtem6UofyfxM9Me6Cr2xsXyoS4qBJDWUpLrVAk= Received: by 10.143.16.9 with SMTP id t9mr87115wfi.1184732161822; Tue, 17 Jul 2007 21:16:01 -0700 (PDT) Received: by 10.142.101.21 with HTTP; Tue, 17 Jul 2007 21:16:01 -0700 (PDT) Message-ID: Date: Wed, 18 Jul 2007 00:16:01 -0400 From: "Alex Karasulu" Sender: akarasulu@gmail.com To: "Apache Directory Developers List" Subject: Re: [ApacheDS] [CiDIT] Discussion In-Reply-To: <43b026c70707172036o3d30cd6bi77e918012b96b3a1@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_111793_28984257.1184732161792" References: <5F70BBD0-BC5F-46D2-B98D-D4CC23AF5C50@yahoo.com> <43b026c70707172036o3d30cd6bi77e918012b96b3a1@mail.gmail.com> X-Google-Sender-Auth: 0c98a9dd962bdadb X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_111793_28984257.1184732161792 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Chris (you spring lover you :) ), More inline but not snipping much since it's all very relevant ... On 7/17/07, Chris Custine wrote: > > > > On 7/17/07, Alex Karasulu wrote: > > > > Hi David, > > > > On 7/17/07, David Jencks < david_jencks@yahoo.com> wrote: > > > > > > > > > On Jul 15, 2007, at 8:03 PM, Alex Karasulu wrote: > > > > > > Hi all, > > > > > > Here's that thread on discussing the CiDIT agenda. Let's take a look > > > at the following > > > link before beginning: > > > > > > http://directory.apache.org/apacheds/1.5/configuration-in-dit-cidit.html > > > > > > > > > Thoughts? Comments? > > > > > > > > > Yikes, I'm afraid this will take 6 months to a year to do, and unless > > > you write "jdo for ldap", including an enhancer, I think its' going to be > > > pretty painful to add new configuration elements. > > > > > > > Yes it would take considerable time if we did it by hand. I think we can > > avoid this with a solid persistence mechanism for LDAP which also generates > > the LDAP schema from bean interfaces. > > > > What is this enhancer you talk about above? > > > > Someone suggested a while back that we avoid the "jdo for ldap" problem > > > by just storing server.xml in ldap as text. IIUC this could be done > > > in a couple of days. Exactly how much really useful functionality would > > > this lose compared to the fine grained approach? > > > > > > > This has a few issues but the most important one is that I want > > eventually to replicate > > the configuration within a cluster. Yes this would still be possible > > but I don't want to > > replicate the entire configuration ... just the parts of it that should > > be shared across the > > cluster. With a blob in the DIT you have to replicate the whole thing. > > > > Another issue is with LDIF exports of the blob. I like the idea of > > dumping the configuration and then importing it perhaps with changes. This > > becomes more of a problem with a big XML blob. Hand exiting an XML embedded > > within an LDIF is a PITA. > > > > So lets not do it :-) > The point I was trying to make is that people will export the server's configuration as LDIF with the CiDIT approach with pure LDAP entries that do not have XML in it. Then they can load it into another server. I don't like the idea of editing LDIF to affect configuration changes on the > server. If we store the XML (or snippets) directly, we don't need the LDIF > and we can bypass it. > Well another problem is tracking changes. Don't forget that we will have a change log and if we store things in XML blobs we will simply obscure what is actually being changed. It's going to take more code to figure out the exact changes made. I have a lot of notes that I will post about how we can do this very easily > without a lot of demolition of current code. > But the question still in my mind is whether or not this is the right approach. LDAP is ideal for storing configuration information. Why are we resorting to XML and not eating our own dog food. The whole attribute value with the XML blob must be replaced for even the > > simplest changes to the configuration. You also cannot easily determine > > exactly what changed to notify the component corresponding to the > > configuration object that changed. > > > > I'm not sure how plausible this is until we go to OSGi so maybe we should > defer that goal anyway? > Well we will defer the actual implementation but we still have to keep an eye out to make sure that what we are doing today does not close any doors tomorrow. I don't want to be stuck in a perpetual state of stepping backwards every time we have to introduce new features like this. You cannot easily search and modify configurations through simple LDAP > > clients. > > > > This is a hack. > > > > What if each component/bean configuration were stored as xml text > > > separately, each with a (unique) name, and the links were determined by the > > > names? > > > > > > > Sure that could be done as well but why not just bang it out if you're > > going to wrestle with > > all this anyway. > > > > BTW, unless you write a fancy dependency tracking system ( i.e. the > > > geronimo kernel) I think that any change basically requires stopping and > > > restarting the server, so I'm not sure there is really much advantage to > > > splitting up each bean separately. > > > > > > > The dynamic reconfiguration capabilities will be reserved until we do > > have such a system: OSGi based most likely. > > > > And finally, why are there all these configuration objects that spring > > > creates that then go and create the actual runtime objects, rather than > > > having spring create the runtime object directly? In particular, why is > > > there an interceptor configuration object rather than just interceptors? > > > > > > > They were there since the beginning. I have no idea why they were put > > there. What I do know is that I want to get Spring out of the picture and > > make this server container agnostic. Then we can wrap it up in any kind of > > container we like. > > > > A point that I have been trying to make is that if we remove the > configuration beans and let the components contain their own settings, that > is achieving container independence too, > The problem with this is that you're still going to have some grouping of settings no? If the functional interface of a component is 3 methods and there are 10 properties for settings then those 3 methods are going to be obscured. Composite classes grouping these settings will surely emerge. Then we are back to having beans again. and that is the way it should be. At that point, ANY framework can > configure the components, whether it is Spring, OSGi, Java instantiation, > etc. I really think the configuration beans are the root of all evil in > this discussion and it seems like we keep coming back to them as either the > cause or symptom of something. So lets toss 'em and configure the > components so that we can keep a 1:1 relationship. > Essentially I think we're going to have to do the same things to get to this state. We need to factor out the init code that uses these beans from various components that configure subcomponents. How we expose the settings on the component interfaces is a minor point: whether using a complex object as one setting property or having several setting properties. It makes no difference. Are you finding that Spring has some limitations that you are running into? > > > Otherwise why eliminate it? > > > > > > > Same reason I keep OSGi out of the core or why I stripped out > > Avalonisms. Let's stay container agnostic. > > > > Well, as I said above, the configuration beans and removing the ability to > directly configure the functional components directly seem to be the > limiting factor to me. > Hmmm loosing you here a bit. You mean to say 'enabling' rather than 'removing' here? I thought you want the container to handle the functional component directly right? If we used Spring the way we should be using it, I think we can have our > cake, and eat most of it ;-) > My problem is proposing Spring to do this. The container discussion about which one to use should come after we have prepared the server to enable the direct configuration of the functional components. Alex ------=_Part_111793_28984257.1184732161792 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Chris (you spring lover you :) ),

More inline but not snipping much since it's all very relevant ...

On 7/17/07, Chris Custine < ccustine@apache.org> wrote:


On 7/17/07, Alex Karasulu <akarasulu@apache.org> wrote:
Hi David,

On 7/17/07, David Jencks < david_jencks@yahoo.com> wrote:

On Jul 15, 2007, at 8:03 PM, Alex Karasulu wrote:

Hi all,

Here's that thread on discussing the CiDIT agenda. Let's take a look at the following
link before beginning:

    http://directory.apache.org/apacheds/1.5/configuration-in-dit-cidit.html

Thoughts? Comments?

Yikes, I'm afraid this will take 6 months to a year to do, and unless you write "jdo for ldap", including an enhancer, I think its' going to be pretty painful to add new configuration elements.

Yes it would take considerable time if we did it by hand. I think we can avoid this with a solid persistence mechanism for LDAP which also generates the LDAP schema from bean interfaces.

What is this enhancer you talk about above?

Someone suggested a while back that we avoid the "jdo for ldap" problem by just storing server.xml in ldap as text.  IIUC this could be done in a couple of days.  Exactly how much really useful functionality would this lose compared to the fine grained approach?

This has a few issues but the most important one is that I want eventually to replicate
the configuration within a cluster.  Yes this would still be possible but I don't want to
replicate the entire configuration ... just the parts of it that should be shared across the
cluster.  With a blob in the DIT you have to replicate the whole thing.

Another issue is with LDIF exports of the blob.  I like the idea of dumping the configuration and then importing it perhaps with changes.  This becomes more of a problem with a big XML blob.  Hand exiting an XML embedded within an LDIF is a PITA.

So lets not do it  :-) 

The point I was trying to make is that people will export the server's configuration as LDIF with
the CiDIT approach with pure LDAP entries that do not have XML in it.  Then they can load it
into another server.

I don't like the idea of editing LDIF to affect configuration changes on the server.  If we store the XML (or snippets) directly, we don't need the LDIF and we can bypass it. 

Well another problem is tracking changes.  Don't forget that we will have a change log and if
we store things in XML blobs we will simply obscure what is actually being changed.  It's going
to take more code to figure out the exact changes made.

I have a lot of notes that I will post about how we can do this very easily without a lot of demolition of current code.

But the question still in my mind is whether or not this is the right approach.  LDAP is
ideal for storing configuration information.  Why are we resorting to XML and not eating our
own dog food.

The whole attribute value with the XML blob must be replaced for even the simplest changes to the configuration.  You also cannot easily determine exactly what changed to notify the component corresponding to the configuration object that changed. 

I'm not sure how plausible this is until we go to OSGi so maybe we should defer that goal anyway?

Well we will defer the actual implementation but we still have to keep an eye out to make sure
that what we are doing today does not close any doors tomorrow.  I don't want to be stuck in
a perpetual state of stepping backwards every time we have to introduce new features like this.

You cannot easily search and modify configurations through simple LDAP clients. 

This is a hack.

What if each component/bean configuration were stored as xml text separately, each with a (unique) name, and the links were determined by the names?

Sure that could be done as well but why not just bang it out if you're going to wrestle with
all this anyway.

BTW, unless you write a fancy dependency tracking system ( i.e. the geronimo kernel) I think that any change basically requires stopping and restarting the server, so I'm not sure there is really much advantage to splitting up each bean separately.

The dynamic reconfiguration capabilities will be reserved until we do have such a system: OSGi based most likely.

And finally, why are there all these configuration objects that spring creates that then go and create the actual runtime objects, rather than having spring create the runtime object directly?  In particular, why is there an interceptor configuration object rather than just interceptors?

They were there since the beginning.  I have no idea why they were put there.  What I do know is that I want to get Spring out of the picture and make this server container agnostic.  Then we can wrap it up in any kind of container we like.

A point that I have been trying to make is that if we remove the configuration beans and let the components contain their own settings, that is achieving container independence too,

The problem with this is that you're still going to have some grouping of settings no?  If the
functional interface of a component is 3 methods and there are 10 properties for settings
then those 3 methods are going to be obscured.  Composite classes grouping these settings
will surely emerge.  Then we are back to having beans again.

and that is the way it should be.  At that point, ANY framework can configure the components, whether it is Spring, OSGi, Java instantiation, etc.  I really think the configuration beans are the root of all evil in this discussion and it seems like we keep coming back to them as either the cause or symptom of something.  So lets toss 'em and configure the components so that we can keep a 1:1 relationship.

Essentially I think we're going to have to do the same things to get to this state.  We need to
factor out the init code that uses these beans from various components that configure subcomponents.

How we expose the settings on the component interfaces is a minor point: whether using a complex
object as one setting property or having several setting properties.  It makes no difference.

Are you finding that Spring has some limitations that you are running into?  Otherwise why eliminate it?

Same reason I keep OSGi out of the core or why I stripped out Avalonisms.  Let's stay container agnostic. 

Well, as I said above, the configuration beans and removing the ability to directly configure the functional components directly seem to be the limiting factor to me. 

Hmmm loosing you here a bit.  You mean to say 'enabling' rather than 'removing' here? I
thought you want the container to handle the functional component directly right?

If we used Spring the way we should be using it, I think we can have our cake, and eat most of it ;-)

My problem is proposing Spring to do this. The container discussion about which one
to use should come after we have prepared the server to enable the direct configuration
of the functional components.

Alex

------=_Part_111793_28984257.1184732161792--