You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Stephen McConnell <mc...@apache.org> on 2002/02/18 18:11:32 UTC
RE: [VOTE] RE: ComponentManager interface [QUESTIONNAIRE]
I have just updated the proposal for the framework/service
package based on feedback in this the related thread.
These interfaces reflect a SOC priority. To checkout the
interfaces please take a look at the following URL:
http://home.osm.net/doc/avalon/ (then click onto the
framework/service package).
I would like to solicit feedback on the following points:
1. The interfaces incorporate separate the notion of
pooled based services versus non-pooled based services.
The rational for this is that pooled service must be
released and as such, have been declared under an
separate interface that encapsulates the checking-out of
service together with the release of the service.
A potential convenience enhancement is the introduction
of release related methods to the manager which would
require that the manager implementation be responsible
for assessing if the supplied object is actually pooled
or not. I consider this as basically polluting a manager
implementation, however, I also recognise the added
convenience this would offer - so consider me as quasi
natural (meaning I'm easily swayed but currently on the
side of separating pooled interfaces).
I appreciate feedback from other on preference concerning
the following choices:
~ (c) don't care
~ (a) preference for convenience access to release related
methods on ServiceManager
~ (b) preference for clear SOC (i.e. release related
methods should be maintained under a separate
interface)
2. The interfaces have attempted to capture the semantics of
Resolver interface as proposed by Berin, and simplified so
as not to present an overly complex interface relative to
the original ComponentManager. The impact of incorporating
token based acquisition and release has a direct impact on
overall complexity of the proposed interfaces, but on the other
side, the potential for enhancement of pooled implementations
seems clear. I am of the opinion that pooled interfaces that
expose a token open up the possibility for enhanced leverage
of Avalon framework interface (at least I know of several
usage instance in my own platform that can leverage this)
- but this comes at a price of added interface complexity.
If token based operations where removed from the proposed
interfaces, what would be your reaction:
~ (a) don't care
~ {b) disappointed but could live with it
~ (c) really pissed-off and would probably -1 the proposal
3. In addition to handling tokens, the interface capture a
new notion of service policy - a object passed to a selector
against which service selection is performed. There is a
potential conflict that arises when mixing policy and token
arguments - they are both objects and as such there is ample
room for error (as pointed out several times on this and
related threads).
What would best summarise you position concerning policy
based selection:
~ (a) don't care
~ (b) selection should be handled by a separate class
thereby minimising risk or errors
~ (c) selection should be integrated into the service
manager for added convenience
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [VOTE] RE: ComponentManager interface [QUESTIONNAIRE]
Posted by Mark Woon <mo...@SMI.Stanford.EDU>.
I've only just started using the Avalon framework, and what I love most about
it right now is the fact that the lifestyle of the component is completely
invisible to the client. I'm 100% with Leo on the point that I don't want to
have the client worrying whether I'm requesting a Pooled component or not. I
want to be able to switch between components with different lifestyles just by
changing a few lines in an XML file instead of editing code and recompiling.
In this proposal, it looks like I would always want to use a ServiceResolver.
If that's the case I'd want a marker interface to go with ServiceResolver the
way Serviceable goes with ServiceManager. I'd propose a name for this
interface, but can't come up with anything reasonable because the names seem
backwards to me -- ServiceManager is the one doing the resolving (lookup), and
ServiceResolver is doing the managing (release).
I'm also still fuzzy on what exactly this Token object is supposed to do.
Would someone mind expanding on what exactly the Token is supposed to do and
how it's supposed to work? AFAICT, it's a key to tie components together and
it's sole purpose for existance is to make releaseAll possible. Is the Token
something the client comes up with, or is there some TokenGenerator somewhere?
Please clue me in...
Stephen McConnell wrote:
> 1. The interfaces incorporate separate the notion of
> pooled based services versus non-pooled based services.
> The rational for this is that pooled service must be
> released and as such, have been declared under an
> separate interface that encapsulates the checking-out of
> service together with the release of the service.
>
> A potential convenience enhancement is the introduction
> of release related methods to the manager which would
> require that the manager implementation be responsible
> for assessing if the supplied object is actually pooled
> or not. I consider this as basically polluting a manager
> implementation, however, I also recognise the added
> convenience this would offer - so consider me as quasi
> natural (meaning I'm easily swayed but currently on the
> side of separating pooled interfaces).
>
> I appreciate feedback from other on preference concerning
> the following choices:
>
> ~ (c) don't care
> ~ (a) preference for convenience access to release related
> methods on ServiceManager
> ~ (b) preference for clear SOC (i.e. release related
> methods should be maintained under a separate
> interface)
I guess I'm (a) on this, but if you're going to do this, why not just merge
ServiceManager and ServiceReclaimer? Yeah, yeah, SOC, but I would never want
to use lookup and release methods apart from one another if I want lifestyle
transparency.
> 2. The interfaces have attempted to capture the semantics of
> Resolver interface as proposed by Berin, and simplified so
> as not to present an overly complex interface relative to
> the original ComponentManager. The impact of incorporating
> token based acquisition and release has a direct impact on
> overall complexity of the proposed interfaces, but on the other
> side, the potential for enhancement of pooled implementations
> seems clear. I am of the opinion that pooled interfaces that
> expose a token open up the possibility for enhanced leverage
> of Avalon framework interface (at least I know of several
> usage instance in my own platform that can leverage this)
> - but this comes at a price of added interface complexity.
>
> If token based operations where removed from the proposed
> interfaces, what would be your reaction:
>
> ~ (a) don't care
> ~ {b) disappointed but could live with it
> ~ (c) really pissed-off and would probably -1 the proposal
(a) - don't really understand what it's used for other than releaseAll.
> 3. In addition to handling tokens, the interface capture a
> new notion of service policy - a object passed to a selector
> against which service selection is performed. There is a
> potential conflict that arises when mixing policy and token
> arguments - they are both objects and as such there is ample
> room for error (as pointed out several times on this and
> related threads).
>
> What would best summarise you position concerning policy
> based selection:
>
> ~ (a) don't care
> ~ (b) selection should be handled by a separate class
> thereby minimising risk or errors
> ~ (c) selection should be integrated into the service
> manager for added convenience
(c) - I'm lazy. This looks like the anti-SOC option.
Assuming I'm right as to how Tokens are used, why not make it an extra step to
associate a Token with a component? releaseAll seems to me to qualify for
convenience function a whole lot more that component selection. Does that make
any sense?
-Mark
A little confused, and probably out of his depth
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: [VOTE] RE: ComponentManager interface [QUESTIONNAIRE]
Posted by Leo Sutic <le...@inspireinfrastructure.com>.
Stephen,
I apologize for being harsh and maybe rude, but a questionnaire where the
questioner's own opinions are embedded in the multiple-choice answers is
not a good questionnaire and you will not get anything out of it.
You will not be able to draw any conclusions
> From: Stephen McConnell [mailto:mcconnell@apache.org]
>
> While
> I applaud the pragmatism you demonstrate in ignoring the
> the objectives and aspirations of others, I remain
> convinced that the best result will be achieved by
> exploring, evaluating, and qualifying the interests of
> all concerned.
Well, that was a nonsense assertion about my motives and
you do very nicely point out the faults of it. I agree
completely.
What I argue against is:
Your idea that splitting up a single interface among
several just to avoid having any "optional" methods,
such as release() is good architecture and SOC.
All it does it leading to splitting of one whole into
several fragments. A strawman argument:
Consider the class Color. It has red, green and blue
intensities. Would you consider this good architecture:
public interface ColorRedGettable {
public float getRed ();
}
public interface ColorGreenGettable {
public float getGreen ();
}
public interface ColorBlueGettable {
public float getBlue ();
}
public interface ColorRedSettable {
public void setRed (float red);
}
public interface ColorGreenSettable {
public void setGreen (float green);
}
public interface ColorBlueSettable {
public void setBlue (float blue);
}
public class ColorImpl implements ColorRedGettable, ColorRedSettable, ...
{ ... }
I thought not. Since everyone will wand the full Color
interface, it makes more sense to do this:
public interface Color {
public float getRed ();
public float getGreen ();
public float getBlue ();
}
public class ColorImpl implements Color {
... }
for a read-only variant.
I have the same reaction to your proposed ServiceManager/ServiceResolver/etc.
All you do is split a single interface across several. The only
time I consider it a good thing would be if there are methods
in the interface that can not be implemented - when some implementations
can not live up to the contract imposed by the interface.
The thing is that the release() method is only needed if the manager
supports pooling. The contract is upheld with an empty method.
It would be different if the release() method could not do anything
sensible and be forced to throw an UnsupportedOperationException.
Then I could understand the need to separate it out in a separate
interface. But in this case all implementations can honor the contract
imposed by the full, release-having, interface. Adding more
interfaces just adds more complexity.
/LS
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: [VOTE] RE: ComponentManager interface [QUESTIONNAIRE]
Posted by Stephen McConnell <mc...@apache.org>.
Thank you Leo for your valuable and stimulating
contribution. Should you feel so included ... any
input from yourself that would help clarify community
requirements would be more than appreciated. While the
options in the questionnaire where prepared so as to
capture your own priorities, without prejudicing the
options of other, you, and anyone else are free to
respond with any additional information. The primary
objective here is to resolve three points in the
resolution of the revised composition interfaces. While
I applaud the pragmatism you demonstrate in ignoring the
the objectives and aspirations of others, I remain
convinced that the best result will be achieved by
exploring, evaluating, and qualifying the interests of
all concerned.
Cheers, Steve.
> -----Original Message-----
> From: Leo Sutic [mailto:leo.sutic@inspireinfrastructure.com]
> Sent: Monday, 18 February, 2002 18:43
> To: Avalon Developers List
> Subject: RE: [VOTE] RE: ComponentManager interface [QUESTIONNAIRE]
>
>
> Stephen,
>
> I would answer your questionnaire, if you'll rewrite it
> so I do not agree or disagree to a whole host of opinions
> at once, for example:
>
> ~ (a) don't care
> ~ (b) selection should be handled by a separate class
> thereby minimising risk or errors
> ~ (c) selection should be integrated into the service
> manager for added convenience
>
> What if I think that selection should be integrated into the service,
> thereby minimising risk or errors?
>
> What if I think that not having a release method violates SOC?
>
> /LS
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: [VOTE] RE: ComponentManager interface [QUESTIONNAIRE]
Posted by Leo Sutic <le...@inspireinfrastructure.com>.
Stephen,
I would answer your questionnaire, if you'll rewrite it
so I do not agree or disagree to a whole host of opinions
at once, for example:
~ (a) don't care
~ (b) selection should be handled by a separate class
thereby minimising risk or errors
~ (c) selection should be integrated into the service
manager for added convenience
What if I think that selection should be integrated into the service,
thereby minimising risk or errors?
What if I think that not having a release method violates SOC?
/LS
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>