You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Berin Loritsch <bl...@apache.org> on 2003/10/06 16:32:29 UTC

[RT] Simplification

The idea that Leo Simmons put forth brought about some thinking on my part.
The key issue here is *simplicity*.  What is going to make component writing
more simple?  The thing is the definition of simplicity is a moving target.
What is simple in one environment is a real PITA in another environment.

Add to that the reality that true simplicity means hiding complexity.  In this
case the idea brought forward was a sort of "active configuration".  While
my security risk alarm bells are going off, I can't completely dismiss the
idea due to improving the developer's life.

Why was XML originally used as a backing for the configuration object?  Because
it was easy to implement.  So the original decision for simplicity was for
our ease instead of the administrator's or the component developer's.  The net
result is that we have the configuration object which is still very useful,
but requires some work on the component writer's end to use effectively.

We have received a number of compliments on the usability of the configuration
interface, esp. from people who prefer the passive configuration that Avalon
uses.  We also know that some people prefer active configuration, and as such
develop their components more like JavaBeans with setters/getters for the
configuration points.  Some have gone so far as to move all configuration to
the constructor (Pico Container).

So the question remains to be asked: what is simpler, more acceptable, to our
users?  How do we handle reconfiguration (which we don't at the moment)?  I
don't think any of us knows the answer to that, because the answer will be
almost as varied as the number of users we have.

The impetus behind scripted configuration seems to be administrator simplicity,
or something along those lines.  There are also some aspects of configuration
that must be determined at runtime.  XML cannot do this, but I feel that
scripted configuration probably isn't the answer either.

We could use a number of backing formats for our configuration information,
and they would all have their plusses and minuses.  Unless we provide a GUI
tool to allow the adiminstrator to update the settings, no solution will be
truly simple for the administrator.  So what could be done in a nice generic
way?  Hmmm.  There is this standard called JMX which might be able to help
in this regard....  However we don't know enough about it right now.

So what we need is not only to look at our side of the coin, but the component
writer's and the administrator's side of the coin.  JMX is only an option if
we can generate the JMX MBeans for configuring the individual components
automatically.  We would be further from a simple solution if we have to write
a JMX component by hand for each Avalon component.

In the end, once we have one or two possible solutions, I think one of the
best things we can do is to involve our users.  Put up some explanation of
the alternatives, and have an informal vote (an oppinion gathering vote) to
assess where our users are.  While the votes are not binding and we can still
do whatever we want, we will at least be informed of what will be easiest for
our users.  We might even be pitched a couple alternatives that we haven't
thought of before.

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


[B&M] Simplification (was: [RT] Simplification)

Posted by Leo Simons <le...@apache.org>.
Berin Loritsch wrote:
<snip/<
> Right.  Well I'm not trying to open up a can of worms.

of course! What I often do try and do in public e-mail is provide 
context that you are aware of, but most of our 'readership' probably 
isn't :D

 > Reconfiguration
 > ===============
> In a development environment, sometimes it is helpful to "play" with
> the values to see how it affects the overall performance and weight
 > of the system.

again: indeed! What I'd love to see would be an IDE with a debugger 
which you can pause, allows you to change any value in the system, then 
resume. I seem to remember some smalltalk tool that had that capability 
a long way back. Pipe dream of course; but that's the general thing 
we're getting at here, innit?

Since this is a RT...have you any thoughts about how to make that 
happen? The closest thing I know is an embedded BeanShell console 
listening to telnet, and that's not really optimal.

>>> The impetus behind scripted configuration seems to be administrator 
>>> simplicity, or something along those lines.
>>
>> my argument was that scripted configuration simplifies container 
>> implementation, administration *and* component development.
> 
> Essentially it moves some of the logic elsewhere.  I would still need to
> see if it "feels" right.  Such an implementation would need to be 
> completely sandboxed so that only certain methods are allowed to be
 > called--even when the thing is signed.

yep. I don't think you should run any kind of script that is in any way 
untrusted. And, of course, it might be a wise decision (as a programmer) 
to not trust the administrator (for lack of knowledge). Security is the 
big issue (performance could be another).

>>> So what could be done in a nice generic way?
>>
>> I still believe in a command pattern, where you can have a container 
>> issue commands based on a configuration being parsed, or a remote 
>> admin interface based on buttons being pressed, or from a script file 
>> bundled with a jar. Have you looked at Twiddle (inside geronimo)?
> 
> I haven't had a chance to.

I believe they started it as a basic tool to which the results of the 
CLI parsing were sent. Its quickly evolving into a lightweight command 
framework which sends (I think) JMX messages. Not tracking it closely. 
Some basic info is at

http://wiki.codehaus.org/geronimo/Twiddle

>> phoenix has had mbean generation for ages.
> 
> Right.  I think it would be benificial to port that over to Merlin.

Steve's on it I believe :D

I've thought about it a little, and with merlin, because things are more 
dynamic (phoenix, remember, just has basic threadsafe, usually 
'singleton-style' blocks, whereas with merlin the sky's no limit), it 
might be a lot less straightforward.

>> Me, I'm just ranting as I go along. I'm not going to commit to 
>> implementing any of it, let alone do I have 'users' paying me enough 
>> to motivate me into seeing such an effort through :P
> 
> Hmmm.  Maybe we should introduce a new header tag.  Instead of [RT] for
> Random Thought, how about [B&M] for Bitch and Moan...  ;P
> 
> So it isn't enough of a scratch to itch... that's ok, but I still want to
> see some simplification, but I am not sure how to move it forward yet.

Let me phrase a little more positively: I am scratching some of these 
itches, but there's a difference (IMO) between hacking some stuff 
together overnight and putting it on sourceforge vs bringing it into 
avalon (including making it actually play nice with existing avalon stuff).

It'd be irresponsible to just dump some code here no-one really wants 
nor needs and which also isn't quite (quite not) up to standard. And 
bringing it in here seems to me entails at least not changing my mind 
about it more than twice a day. Which I'm not capable of yet :D

I am sure that avalon needs to simplify drastically, but I'm not that 
sure how (can't even pinpoint the "why" yet), nor do I believe we're 
remotely close to establishing a consensus that that assertion is true. 
So yeah, I'm just bitchin' :D

back to my corner!

- LSD



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [RT] Simplification

Posted by Berin Loritsch <bl...@apache.org>.
Leo Simons wrote:

> Berin Loritsch wrote:
> 
>> The idea that Leo Simmons put forth brought about some thinking on my
>> part.
> 
> 
> You have an error in your RT at 1:23 - illegal duplication of
> literal 'm' :D

Doh!  :)

> 
>> Why was XML originally used as a backing for the configuration
>> object? Because it was easy to implement.
> 
> 
> and because it was quickly becoming common practice, I'd say.

Most likely.  It does have certain advantages over properties based
configuration--espl. for components.  My initial design for a component
based system used a property file for each job that needed to be processed.
It was a major PITA to maintain and run.

> 
>> We have received a number of compliments on the usability of the 
>> configuration interface, esp. from people who prefer the passive
>> configuration that Avalon uses.  We also know that some people prefer
>> active configuration, and as such develop their components more like
>> JavaBeans with setters/getters for the configuration points.  Some
>> have gone so far as to move all configuration to the constructor
>> (Pico Container).
> 
> 
> I doubt that the people who use setters/getters think of that as "active 
> configuration", let alone that they are aware of the choice they make 

Active in the sense that the configuration mechanism is active, not in the
pure view of component writer.

> (most people into the "new IoC(tm)" hype make the choice on basis of 
> syntax, not on a programming paradigm). PicoContainer doesn't move 
> config to the constructor. It isolates container-component communication 
> iside the constructor:
> 
> import org.apache.avalon.configuration.Configuration;
> 
> public class MyBlah {
>   public MyBlah( Configuration c ) {
>     doConfigure( c );
>   }
> }
> 
> That is, with the default ComponentAdapters it ships with. PicoContainer 
> allows nearly complete customization of container-component 
> configuration, including lifecycle, configuration, etc etc. 
> Characteristic about PicoContainer is all the things it doesn't do and 
> the choices it doesn't make (some would say: force upon you), or at 
> least allows you to revert with a little effort.

Right.  Well I'm not trying to open up a can of worms.

> 
>> So the question remains to be asked: what is simpler, more
>> acceptable, to our users?
> 
> 
> I think you're right on the spot:
> 
> - for administrators, a (probably JMX-based) GUI+web-based management 
> console along with the same functionality using a commandline client
> 
> - for component programmers, something that feels beanlike
> 
> - and for all the windows buffs, something that is drag-and-droppable

:)  See, no one answer for everything.  Remember JMX is just a "protocol"
so to speak.  It is a buffer for the configuration aspects of a container.

> 
>> How do we handle reconfiguration (which we
>> don't at the moment)?  I don't think any of us knows the answer to
>> that, because the answer will be almost as varied as the number of
>> users we have.
> 
> 
> I have never found the need to handle reconfiguration of finegrained 
> components. And when I did need to reconfigure stuff (like, once a week 
> in a production system), a restart of the coarsegrained component did 
> the trick pretty well. "apachectl graceful", if you will, is enough.

In a production environment, that is quite true.  In a development environment,
sometimes it is helpful to "play" with the values to see how it affects the
overall performance and weight of the system.

> 
>> The impetus behind scripted configuration seems to be administrator 
>> simplicity, or something along those lines.
> 
> 
> my argument was that scripted configuration simplifies container 
> implementation, administration *and* component development.

Essentially it moves some of the logic elsewhere.  I would still need to
see if it "feels" right.  Such an implementation would need to be completely
sandboxed so that only certain methods are allowed to be called--even when
the thing is signed.

> 
>> So what could be done in a nice generic way?
> 
> 
> I still believe in a command pattern, where you can have a container 
> issue commands based on a configuration being parsed, or a remote admin 
> interface based on buttons being pressed, or from a script file bundled 
> with a jar. Have you looked at Twiddle (inside geronimo)?

I haven't had a chance to.

> 
>> JMX is
>> only an option if we can generate the JMX MBeans for configuring the
>> individual components automatically.  We would be further from a
>> simple solution if we have to write a JMX component by hand for each
>> Avalon component.
> 
> 
> phoenix has had mbean generation for ages. Same for JBoss and a bunch of 
> other projects. With mx4j, it isn't that difficult no more. JBoss shows 
> that JMX works. I still don't like it one little bit, but it works 
> remarkably well :D

Right.  I think it would be benificial to port that over to Merlin.


>> In the end, once we have one or two possible solutions, I think one
>> of the best things we can do is to involve our users.  Put up some
>> explanation of the alternatives, and have an informal vote (an
>> oppinion gathering vote) to assess where our users are.  While the
>> votes are not binding and we can still do whatever we want, we will
>> at least be informed of what will be easiest for our users.  We might
>> even be pitched a couple alternatives that we haven't thought of
>> before.
> 
> 
> :D
> 
> Me, I'm just ranting as I go along. I'm not going to commit to 
> implementing any of it, let alone do I have 'users' paying me enough to 
> motivate me into seeing such an effort through :P

Hmmm.  Maybe we should introduce a new header tag.  Instead of [RT] for
Random Thought, how about [B&M] for Bitch and Moan...  ;P

So it isn't enough of a scratch to itch... that's ok, but I still want to
see some simplification, but I am not sure how to move it forward yet.

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [RT] Simplification

Posted by Leo Simons <le...@apache.org>.
Berin Loritsch wrote:
> The idea that Leo Simmons put forth brought about some thinking on my
> part.

You have an error in your RT at 1:23 - illegal duplication of
literal 'm' :D

> Why was XML originally used as a backing for the configuration
> object? Because it was easy to implement.

and because it was quickly becoming common practice, I'd say.

> We have received a number of compliments on the usability of the 
> configuration interface, esp. from people who prefer the passive
> configuration that Avalon uses.  We also know that some people prefer
> active configuration, and as such develop their components more like
> JavaBeans with setters/getters for the configuration points.  Some
> have gone so far as to move all configuration to the constructor
> (Pico Container).

I doubt that the people who use setters/getters think of that as "active 
configuration", let alone that they are aware of the choice they make 
(most people into the "new IoC(tm)" hype make the choice on basis of 
syntax, not on a programming paradigm). PicoContainer doesn't move 
config to the constructor. It isolates container-component communication 
iside the constructor:

import org.apache.avalon.configuration.Configuration;

public class MyBlah {
   public MyBlah( Configuration c ) {
     doConfigure( c );
   }
}

That is, with the default ComponentAdapters it ships with. PicoContainer 
allows nearly complete customization of container-component 
configuration, including lifecycle, configuration, etc etc. 
Characteristic about PicoContainer is all the things it doesn't do and 
the choices it doesn't make (some would say: force upon you), or at 
least allows you to revert with a little effort.

> So the question remains to be asked: what is simpler, more
> acceptable, to our users?

I think you're right on the spot:

- for administrators, a (probably JMX-based) GUI+web-based management 
console along with the same functionality using a commandline client

- for component programmers, something that feels beanlike

- and for all the windows buffs, something that is drag-and-droppable

> How do we handle reconfiguration (which we
> don't at the moment)?  I don't think any of us knows the answer to
> that, because the answer will be almost as varied as the number of
> users we have.

I have never found the need to handle reconfiguration of finegrained 
components. And when I did need to reconfigure stuff (like, once a week 
in a production system), a restart of the coarsegrained component did 
the trick pretty well. "apachectl graceful", if you will, is enough.

> The impetus behind scripted configuration seems to be administrator 
> simplicity, or something along those lines.

my argument was that scripted configuration simplifies container 
implementation, administration *and* component development.

> So what could be done in a nice generic way?

I still believe in a command pattern, where you can have a container 
issue commands based on a configuration being parsed, or a remote admin 
interface based on buttons being pressed, or from a script file bundled 
with a jar. Have you looked at Twiddle (inside geronimo)?

> JMX is
> only an option if we can generate the JMX MBeans for configuring the
> individual components automatically.  We would be further from a
> simple solution if we have to write a JMX component by hand for each
> Avalon component.

phoenix has had mbean generation for ages. Same for JBoss and a bunch of 
other projects. With mx4j, it isn't that difficult no more. JBoss shows 
that JMX works. I still don't like it one little bit, but it works 
remarkably well :D

> In the end, once we have one or two possible solutions, I think one
> of the best things we can do is to involve our users.  Put up some
> explanation of the alternatives, and have an informal vote (an
> oppinion gathering vote) to assess where our users are.  While the
> votes are not binding and we can still do whatever we want, we will
> at least be informed of what will be easiest for our users.  We might
> even be pitched a couple alternatives that we haven't thought of
> before.

:D

Me, I'm just ranting as I go along. I'm not going to commit to 
implementing any of it, let alone do I have 'users' paying me enough to 
motivate me into seeing such an effort through :P

cheers!

- LSD



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [RT] Simplification

Posted by Ulrich Mayring <ul...@denic.de>.
Berin Loritsch wrote:
> 
> We could use a number of backing formats for our configuration information,
> and they would all have their plusses and minuses.  Unless we provide a GUI
> tool to allow the adiminstrator to update the settings, no solution will be
> truly simple for the administrator.  So what could be done in a nice 
> generic
> way?  Hmmm.  There is this standard called JMX which might be able to help
> in this regard....  However we don't know enough about it right now.

What we do is read in the config.xml as usual and then allow the 
operators to change settings via the JMX management console (Phoenix). 
It would be very useful if there were an option to write the changes 
back to the config.xml just like Tomcat writes to server.xml.

Ulrich



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org