You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Anton Tagunov <at...@list.ru> on 2004/02/06 18:07:08 UTC
Re[2]: MutableConfiguration Proposal Summary -- optimize for memory consumption?
Hi, Leo!
Really like it to talk fast :)
AT> * the main use case is to allow different storage
AT> structures behind MutableConfiguration
AT>
AT> right?
LSU> No. The purpose is to allow an application to code against an
LSU> interface (MutableConfiguration) instead of against a concrete
LSU> class (DefaultConfiguration).
But why do we want it?
MutableConfiguration impl is *only* about *storing* data.
So, why abstract it?
Only to allow different storage strategies.
Right?
LSU> The deep-copy is done when you absolutely, positively
LSU> have to ensure that a configuration is immutable.
Right. I like the approach. The class is useful.
But should we really apply this patter *always*?
Should we engrave it in Avalon spi?
Have there been any concerns on Merlin footprint?
Anton
>
> /LS
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: MutableConfiguration Proposal Summary -- optimize for memory
consumption? - typo
Posted by Stephen McConnell <mc...@apache.org>.
Anton Tagunov wrote:
> AT> It does not matter if it is -spi or -api.
> AT>
> AT> (I would choose -api, if I had a vote here,
> AT> but count it as non-binding, I've been away too long ;-)
>
> I haven't gone mad. Just a typo:
That's good news!
> I does not matter if it is -spi or -impl.
> I would choose -spi, but please count this as a non-binding
> vote, I've been away too long
.. and its good to see you back!
Cheers, Steve.
> Anton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org
>
>
--
|------------------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org/merlin |
| http://dpml.net/merlin/distributions/latest |
|------------------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re[5]: MutableConfiguration Proposal Summary -- optimize for memory consumption? - typo
Posted by Anton Tagunov <at...@list.ru>.
AT> It does not matter if it is -spi or -api.
AT>
AT> (I would choose -api, if I had a vote here,
AT> but count it as non-binding, I've been away too long ;-)
I haven't gone mad. Just a typo:
I does not matter if it is -spi or -impl.
I would choose -spi, but please count this as a non-binding
vote, I've been away too long
Anton
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re[4]: MutableConfiguration Proposal Summary -- optimize for memory consumption?
Posted by Anton Tagunov <at...@list.ru>.
Hi, Leo!
AT> But why do we want it?
AT> MutableConfiguration impl is *only* about *storing* data.
AT> So, why abstract it?
AT> Only to allow different storage strategies.
AT> Right?
LSU> Not as much *allow* different storage strategies as to
LSU> not have to make the strategy explicit. It's splitting hairs,
LSU> but... "I don't want to swap out the storage strategy,
LSU> and I don't want to care about it."
LSU> So, I want MutableConfiguration not so much because
LSU> I want to write another implementation of it, but because
LSU> I don't want to use a concrete class in my code when
LSU> an interface will do.
LSU> Of course, this means that we *can* allow other implementations,
LSU> but this is not the primary reason for me.
We're in concensus: we're abstracting interface to *make other
implementations possible*. And all what these implementations
may differ is is *storage strategy*.
LSU> The deep-copy is done when you absolutely, positively
LSU> have to ensure that a configuration is immutable.
AT> Right. I like the approach. The class is useful.
AT> But should we really apply this patter *always*?
LSU> No. Use it when it makes sense.
AT> Should we engrave it in Avalon spi?
LSU> The class will go into -impl.
AT> Have there been any concerns on Merlin footprint?
LSU> Since Merlin has complete control over the configuration
LSU> objects, it will probably not even use the class. If a component
LSU> wants to mess up *its own* configuration, it is free to do so.
I see it a bit different. Internals of any contianer may
pass MutableConfiguration instances around a lot. This
happens if part A adds some of the configuration and then
part B alters it. I'm more after using it inside containers
not only inside components. It's a legitimate usage, isn't it?
It does not matter if it is -spi or -api.
(I would choose -api, if I had a vote here,
but count it as non-binding, I've been away too long ;-)
In any case container internals will start using it.
Some lifecycle extensions and such.
And therefore we should not *lock our lifecycle extendsion
and container utilities* into using the deep-copy strategy.
Should we?
Anton
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
RE: Re[2]: MutableConfiguration Proposal Summary -- optimize for memory consumption?
Posted by Leo Sutic <le...@inspireinfrastructure.com>.
> From: Anton Tagunov [mailto:atagunov@list.ru]
>
> Hi, Leo!
>
> Really like it to talk fast :)
>
> AT> * the main use case is to allow different storage
> AT> structures behind MutableConfiguration
> AT>
> AT> right?
>
> LSU> No. The purpose is to allow an application to code against an
> LSU> interface (MutableConfiguration) instead of against a concrete
> LSU> class (DefaultConfiguration).
>
> But why do we want it?
>
> MutableConfiguration impl is *only* about *storing* data.
> So, why abstract it?
> Only to allow different storage strategies.
>
> Right?
Not as much *allow* different storage strategies as to
not have to make the strategy explicit. It's splitting hairs,
but... "I don't want to swap out the storage strategy,
and I don't want to care about it."
So, I want MutableConfiguration not so much because
I want to write another implementation of it, but because
I don't want to use a concrete class in my code when
an interface will do.
Of course, this means that we *can* allow other implementations,
but this is not the primary reason for me.
> LSU> The deep-copy is done when you absolutely, positively
> LSU> have to ensure that a configuration is immutable.
>
> Right. I like the approach. The class is useful.
>
> But should we really apply this patter *always*?
No. Use it when it makes sense.
> Should we engrave it in Avalon spi?
The class will go into -impl.
> Have there been any concerns on Merlin footprint?
Since Merlin has complete control over the configuration
objects, it will probably not even use the class. If a component
wants to mess up *its own* configuration, it is free to do so.
/LS
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org