You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall" <he...@ungoverned.org> on 2007/05/22 14:22:32 UTC

ServiceTracker

Should Felix start including ServiceTracker in the framework JAR file?

Up until now, it has never been included because the framework doesn't 
use it, so it is just extra cruft and can easily be downloaded 
separately. However, it appears that other frameworks make it available 
by default.

Thoughts?

-> richard

iPOJO inspiration (Was: Re: ServiceTracker)

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Clement Escoffier wrote:
> Richard S. Hall a écrit :
>> Peter Kriens wrote:
>>> When I write the inspiration for iPOJO I used the ST for the low
>>> level dependency management for this reason.
>>>   
>>
>> Well, I don't know if I would state it that way...the inspiration of 
>> iPOJO actually revolves around an idea I had for how to do composite 
>> services using byte code generation.
>>
>> The discussions that you and I had around byte code manipulation as 
>> an approach for doing DS during the months leading up to the R4 spec 
>> were the inspiration for creating Service Binder++, which is the core 
>> of iPOJO.
>>
>> After that, Clement's inspiration has taken iPOJO aflight... :-)
> iPOJO's roots are multiple. Several inputs and objectives was mixed 
> before reaching the actual iPOJO. First of all, there was Rick and the 
> idea to extend Service Binder (SCR) to obtain a simplest development 
> model and to create composite services. It was (and it is) always the 
> main goal. It wanted to use bytecode manipulation to create this 
> composite service on the fly. However, Peter and his SCM (I cannot 
> remember the exact name) was a great starting point. The bytecode 
> injection was used to manage service dependencies. Moreover, a 
> discussion we had with Peter at Las Vegas (in January 2005) was also 
> an important actor. However, my old projects around OSGi.NET, the 
> Fractal Component Model, Aspect Oriented Programming, also had an 
> undeniable influence (Moreover all these projects were directed by 
> Didier Donsez).
>
> It seems that iPOJO is a kind of large mixture of heterogeneous 
> ingredients. It was an experimental recipe ;-)

Yep, there are definitely many inspirations...

The only point that I tried [inadequately] to make was that the raison 
d'être of iPOJO (and thus Clement's PhD thesis) was to explore how to do 
dynamic composite services in an environment like the OSGi framework.

It was just a bonus that discussions with Peter and his ideas behind 
"removing cruft" also found their way into the core of iPOJO's service 
dependency management mechanisms.

Thanks, Clement, for setting the record straight. :-)

-> richard


Re: ServiceTracker

Posted by Clement Escoffier <cl...@gmail.com>.
Richard S. Hall a écrit :
> Peter Kriens wrote:
>
>
>> When I write the inspiration for iPOJO I used the ST for the low
>> level dependency management for this reason.
>>   
>
> Well, I don't know if I would state it that way...the inspiration of 
> iPOJO actually revolves around an idea I had for how to do composite 
> services using byte code generation.
>
> The discussions that you and I had around byte code manipulation as an 
> approach for doing DS during the months leading up to the R4 spec were 
> the inspiration for creating Service Binder++, which is the core of 
> iPOJO.
>
> After that, Clement's inspiration has taken iPOJO aflight... :-)
iPOJO's roots are multiple. Several inputs and objectives was mixed 
before reaching the actual iPOJO. First of all, there was Rick and the 
idea to extend Service Binder (SCR) to obtain a simplest development 
model and to create composite services. It was (and it is) always the 
main goal. It wanted to use bytecode manipulation to create this 
composite service on the fly. However, Peter and his SCM (I cannot 
remember the exact name) was a great starting point. The bytecode 
injection was used to manage service dependencies. Moreover, a 
discussion we had with Peter at Las Vegas (in January 2005) was also an 
important actor. However, my old projects around OSGi.NET, the Fractal 
Component Model, Aspect Oriented Programming, also had an undeniable 
influence (Moreover all these projects were directed by Didier Donsez).

It seems that iPOJO is a kind of large mixture of heterogeneous 
ingredients. It was an experimental recipe ;-)

Clement

PS  : About the Service Traker, iPOJO does not use it to avoid this 
dependency, and I am a service listener fan. If the performance are 
really improved, why not use it. So, +1 to  insert the service tracker 
inside the core.


-- 
Clement Escoffier
Grenoble University
LSR - Bat. C
220, Rue de la Chimie
BP 53
38041 GRENOBLE CEDEX 9
04.76.51.40.24
http://clement.plop-plop.net


Re: ServiceTracker

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Peter Kriens wrote:
> One of the design goals of the ServiceTracker was that it could be
> optimized by framework vendors. If you look at the implementation, you
> will see that there are some inefficiencies in the implementation
> because it must use the standard listeners (it must listen to all
> service events when you use it with a listener). Making the ST highly
> efficient on your framework would allow other subsystems to reuse
> this.

In Felix, no subsystems use it, but if we decide to keep it in there, 
then they might, since I do something similar in URL Handlers.

> When I write the inspiration for iPOJO I used the ST for the low
> level dependency management for this reason.
>   

Well, I don't know if I would state it that way...the inspiration of 
iPOJO actually revolves around an idea I had for how to do composite 
services using byte code generation.

The discussions that you and I had around byte code manipulation as an 
approach for doing DS during the months leading up to the R4 spec were 
the inspiration for creating Service Binder++, which is the core of iPOJO.

After that, Clement's inspiration has taken iPOJO aflight... :-)

-> richard

> Kind regards,
>
>      Peter Kriens
>      
>
>
>
>
>
>
> MO> On May 22, 2007, at 18:07 , Richard S. Hall wrote:
>
>   
>>> Since the overall response has been positive (even though I am  
>>> mostly in the "excess cruft" camp with Eric), I have gone ahead and  
>>> added it.
>>>       
>
> MO> I'm also in that camp, but I was at a conference (without internet)  
> MO> today, so I missed out on the initial discussion.
>
> MO> I'm wondering, if ServiceTracker was supposed to be part of the  
> MO> framework, why didn't OSGi define it as such. Since it's not part of  
> MO> the framework, I don't like including it in Felix by default. It just
> MO> increases the size of the core.
>
> MO> So in my opinion we should not include it by default.
>
>   
>>> Of course, BND could solve this by having people just pull ST into  
>>> their bundle. But if everyone were to do this, then the savings we  
>>> see by not having ST in the framework JAR would be quickly  
>>> outweighed by the multiple copies of ST embedded into all of the  
>>> bundles that use it.
>>>       
>
> MO> If people don't need the whole compendium, they are free to create a  
> MO> meaningful subset of it and use that. That's the other option they have.
>
> MO> If people are using another dependency manager (such as iPOJO) then  
> MO> they don't need to use ST and you might actually want to discourage  
> MO> people from using it at all by not providing it.
>
>
>
>
>   

Re[2]: ServiceTracker

Posted by Peter Kriens <Pe...@aQute.biz>.
One of the design goals of the ServiceTracker was that it could be
optimized by framework vendors. If you look at the implementation, you
will see that there are some inefficiencies in the implementation
because it must use the standard listeners (it must listen to all
service events when you use it with a listener). Making the ST highly
efficient on your framework would allow other subsystems to reuse
this. When I write the inspiration for iPOJO I used the ST for the low
level dependency management for this reason.

Kind regards,

     Peter Kriens
     






MO> On May 22, 2007, at 18:07 , Richard S. Hall wrote:

>> Since the overall response has been positive (even though I am  
>> mostly in the "excess cruft" camp with Eric), I have gone ahead and  
>> added it.

MO> I'm also in that camp, but I was at a conference (without internet)  
MO> today, so I missed out on the initial discussion.

MO> I'm wondering, if ServiceTracker was supposed to be part of the  
MO> framework, why didn't OSGi define it as such. Since it's not part of  
MO> the framework, I don't like including it in Felix by default. It just
MO> increases the size of the core.

MO> So in my opinion we should not include it by default.

>> Of course, BND could solve this by having people just pull ST into  
>> their bundle. But if everyone were to do this, then the savings we  
>> see by not having ST in the framework JAR would be quickly  
>> outweighed by the multiple copies of ST embedded into all of the  
>> bundles that use it.

MO> If people don't need the whole compendium, they are free to create a  
MO> meaningful subset of it and use that. That's the other option they have.

MO> If people are using another dependency manager (such as iPOJO) then  
MO> they don't need to use ST and you might actually want to discourage  
MO> people from using it at all by not providing it.




-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599


Re: ServiceTracker

Posted by BJ Hargrave <ha...@us.ibm.com>.
I think that is somewhat orthogonal but yes.

I am merely suggesting that section 701 of the compendium spec be packaged 
in the core spec pdf. That is all. 

I see the proposed BundleTracker class to be another class in the 
org.osgi.util.tracker package and thus would be documented in section 701.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@us.ibm.com

office: +1 386 848 1781
mobile: +1 386 848 3788




"Stuart McCulloch" <st...@jayway.net> 
Sent by: mcculls@gmail.com
2007-05-23 00:29
Please respond to
dev@felix.apache.org


To
dev@felix.apache.org
cc

Subject
Re: ServiceTracker






On 23/05/07, BJ Hargrave <ha...@us.ibm.com> wrote:
> It is not part of the framework package, but it is a key class to use 
for
> services. Perhaps OSGi should consider moving it from Compendium to Core
> spec?
>

if so, would the proposed BundleTracker (osgi issue 501) be added to
Core/Compendium?

-- 
Cheers, Stuart


Re: ServiceTracker

Posted by Stuart McCulloch <st...@jayway.net>.
On 23/05/07, BJ Hargrave <ha...@us.ibm.com> wrote:
> It is not part of the framework package, but it is a key class to use for
> services. Perhaps OSGi should consider moving it from Compendium to Core
> spec?
>

if so, would the proposed BundleTracker (osgi issue 501) be added to
Core/Compendium?

-- 
Cheers, Stuart

RE: ServiceTracker

Posted by Rick Litton <Ri...@ktd-kyocera.com>.
BJ Hargrave wrote:

> It is not part of the framework package, but it is a key class to use
for 
> services. Perhaps OSGi should consider moving it from Compendium to
Core 
> spec?

+1

Rick Litton


-----Original Message-----
From: BJ Hargrave [mailto:hargrave@us.ibm.com] 
Sent: Tuesday, May 22, 2007 12:24 PM
To: dev@felix.apache.org
Subject: Re: ServiceTracker

Marcel Offermans <ma...@luminis.nl> wrote on 2007-05-22 
13:20:51:
> On May 22, 2007, at 18:07 , Richard S. Hall wrote:
> 
> > Since the overall response has been positive (even though I am 
> > mostly in the "excess cruft" camp with Eric), I have gone ahead and 
> > added it.
> 
> I'm also in that camp, but I was at a conference (without internet) 
> today, so I missed out on the initial discussion.
> 
> I'm wondering, if ServiceTracker was supposed to be part of the 
> framework, why didn't OSGi define it as such. 

Well, we weren't that bright in Release 1 :-) We learned shortly after 
Release 1 that the Service API is too hard to use correctly and thus
added 
ServiceTracker in R2. Had we been smart enough up front, there may have 
only ever been ServiceTracker.

> Since it's not part of 
> the framework, I don't like including it in Felix by default. 

It is not part of the framework package, but it is a key class to use
for 
services. Perhaps OSGi should consider moving it from Compendium to Core

spec?

> It just 
> increases the size of the core.

14KB won't break the bank.

> 
> So in my opinion we should not include it by default.
> 
> > Of course, BND could solve this by having people just pull ST into 
> > their bundle. But if everyone were to do this, then the savings we 
> > see by not having ST in the framework JAR would be quickly 
> > outweighed by the multiple copies of ST embedded into all of the 
> > bundles that use it.
> 
> If people don't need the whole compendium, they are free to create a 
> meaningful subset of it and use that. That's the other option they
have.

Yes, but you raise the bar for people to use the framework correctly.

> 
> If people are using another dependency manager (such as iPOJO) then 
> they don't need to use ST and you might actually want to discourage 
> people from using it at all by not providing it.

I don't think that is a good idea. iPOJO, DS, etc. cannot be used for
all 
service needs. ST is a fundamental tool that should always be provided.

> 
> 
> 

-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@us.ibm.com

office: +1 386 848 1781
mobile: +1 386 848 3788



Re: ServiceTracker

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Marcel Offermans wrote:
> On May 22, 2007, at 18:07 , Richard S. Hall wrote:
>
>> Since the overall response has been positive (even though I am mostly 
>> in the "excess cruft" camp with Eric), I have gone ahead and added it.
>
> I'm also in that camp, but I was at a conference (without internet) 
> today, so I missed out on the initial discussion.
>
> I'm wondering, if ServiceTracker was supposed to be part of the 
> framework, why didn't OSGi define it as such. Since it's not part of 
> the framework, I don't like including it in Felix by default. It just 
> increases the size of the core.

Part of the reason might be that it was thought of later and it wasn't 
quite clear that it would eventually become regarded as an integral 
part...however, that is just a guess on my part.

> So in my opinion we should not include it by default.

Well, I could go either way. I just deployed a version of framework/main 
that include it (along with a concurrency fix). I am more than willing 
to put this up to a majority vote if we don't feel that we have general 
consensus...

>> Of course, BND could solve this by having people just pull ST into 
>> their bundle. But if everyone were to do this, then the savings we 
>> see by not having ST in the framework JAR would be quickly outweighed 
>> by the multiple copies of ST embedded into all of the bundles that 
>> use it.
>
> If people don't need the whole compendium, they are free to create a 
> meaningful subset of it and use that. That's the other option they have.
>
> If people are using another dependency manager (such as iPOJO) then 
> they don't need to use ST and you might actually want to discourage 
> people from using it at all by not providing it.

I agree this is yet another approach. I don't know which is best...

-> richard

Re: ServiceTracker

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wednesday 23 May 2007 03:24, BJ Hargrave wrote:
> Perhaps OSGi should consider moving it from Compendium to Core
> spec?

I agree on this point.

> > It just 
> > increases the size of the core.

> 14KB won't break the bank.

I suspect that if it was an integral part of the Framework, the size could be 
smaller, as theoretically it wouldn't need to do so much analysis which now 
happens upon reception of the ServiceEvents, the framework could 'kick' the 
trackers directly.


I also think that Stuart's suggestion of replacing the ST with another 
implementation becomes moot, if those optimizations are in place.


Cheers
-- 
Niclas Hedhman, Software Developer

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: ServiceTracker

Posted by BJ Hargrave <ha...@us.ibm.com>.
Marcel Offermans <ma...@luminis.nl> wrote on 2007-05-22 
13:20:51:
> On May 22, 2007, at 18:07 , Richard S. Hall wrote:
> 
> > Since the overall response has been positive (even though I am 
> > mostly in the "excess cruft" camp with Eric), I have gone ahead and 
> > added it.
> 
> I'm also in that camp, but I was at a conference (without internet) 
> today, so I missed out on the initial discussion.
> 
> I'm wondering, if ServiceTracker was supposed to be part of the 
> framework, why didn't OSGi define it as such. 

Well, we weren't that bright in Release 1 :-) We learned shortly after 
Release 1 that the Service API is too hard to use correctly and thus added 
ServiceTracker in R2. Had we been smart enough up front, there may have 
only ever been ServiceTracker.

> Since it's not part of 
> the framework, I don't like including it in Felix by default. 

It is not part of the framework package, but it is a key class to use for 
services. Perhaps OSGi should consider moving it from Compendium to Core 
spec?

> It just 
> increases the size of the core.

14KB won't break the bank.

> 
> So in my opinion we should not include it by default.
> 
> > Of course, BND could solve this by having people just pull ST into 
> > their bundle. But if everyone were to do this, then the savings we 
> > see by not having ST in the framework JAR would be quickly 
> > outweighed by the multiple copies of ST embedded into all of the 
> > bundles that use it.
> 
> If people don't need the whole compendium, they are free to create a 
> meaningful subset of it and use that. That's the other option they have.

Yes, but you raise the bar for people to use the framework correctly.

> 
> If people are using another dependency manager (such as iPOJO) then 
> they don't need to use ST and you might actually want to discourage 
> people from using it at all by not providing it.

I don't think that is a good idea. iPOJO, DS, etc. cannot be used for all 
service needs. ST is a fundamental tool that should always be provided.

> 
> 
> 

-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@us.ibm.com

office: +1 386 848 1781
mobile: +1 386 848 3788



Re: ServiceTracker

Posted by Marcel Offermans <ma...@luminis.nl>.
On May 22, 2007, at 18:07 , Richard S. Hall wrote:

> Since the overall response has been positive (even though I am  
> mostly in the "excess cruft" camp with Eric), I have gone ahead and  
> added it.

I'm also in that camp, but I was at a conference (without internet)  
today, so I missed out on the initial discussion.

I'm wondering, if ServiceTracker was supposed to be part of the  
framework, why didn't OSGi define it as such. Since it's not part of  
the framework, I don't like including it in Felix by default. It just  
increases the size of the core.

So in my opinion we should not include it by default.

> Of course, BND could solve this by having people just pull ST into  
> their bundle. But if everyone were to do this, then the savings we  
> see by not having ST in the framework JAR would be quickly  
> outweighed by the multiple copies of ST embedded into all of the  
> bundles that use it.

If people don't need the whole compendium, they are free to create a  
meaningful subset of it and use that. That's the other option they have.

If people are using another dependency manager (such as iPOJO) then  
they don't need to use ST and you might actually want to discourage  
people from using it at all by not providing it.




Re: ServiceTracker

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Since the overall response has been positive (even though I am mostly in 
the "excess cruft" camp with Eric), I have gone ahead and added it.

Besides other peoples' positive reaction, my feeling is that if people 
aren't using iPOJO, DS, etc, then it is better to encourage people to 
use ST than trying to do service management by hand, because they will 
definitely make mistakes. However, in its current distribution form it 
is difficult to use ST, since it is buried in the compendium bundle that 
also has dependencies on other packages.

Of course, BND could solve this by having people just pull ST into their 
bundle. But if everyone were to do this, then the savings we see by not 
having ST in the framework JAR would be quickly outweighed by the 
multiple copies of ST embedded into all of the bundles that use it.

We'll try it for now and see how it goes! :-)

-> richard

Richard S. Hall wrote:
> Should Felix start including ServiceTracker in the framework JAR file?
>
> Up until now, it has never been included because the framework doesn't 
> use it, so it is just extra cruft and can easily be downloaded 
> separately. However, it appears that other frameworks make it 
> available by default.
>
> Thoughts?
>
> -> richard

Re: ServiceTracker

Posted by Costin Leau <co...@gmail.com>.
Richard S. Hall wrote:
> Should Felix start including ServiceTracker in the framework JAR file?
> 
You know my opinion but just for the record, I would go for it.

+1 from my side :)

> Up until now, it has never been included because the framework doesn't
> use it, so it is just extra cruft and can easily be downloaded
> separately. However, it appears that other frameworks make it available
> by default.
> 
> Thoughts?
> 
> -> richard
> 


-- 
Costin

Re: ServiceTracker

Posted by "Nektarios K. Papadopoulos" <np...@inaccessnetworks.com>.
Alin Dreghiciu wrote:
> As in a conversation I had with Peter Kriens he was pointing out that he
> could not think of a useful use case where the raw service listener can be
> used due to the missing of the events raised before.
> And what's the  then the listener? The ServiceTracker.

A bit irrelevant to the overall discussion, but related to the above 
specific point:

IMHO, there is at least one useful use case where the raw service 
listener can be used: when you write a Driver bundle (as in Device 
Access specification). You don't care about service registration at all, 
this is the job of the Device Manager. You only need to listen for 
MODIFIED and UNREGISTERED events of the attached Device services.


> 
> In my view it's qualifying for being part of the framework because it
> reduces the complexity of service tracking and is less error prone then
> using the service listener for the unaware.
> 
> Regards,
> Alin Dreghiciu
> 
> On 5/22/07, Richard S. Hall < heavy@ungoverned.org> wrote:
>>
>> Should Felix start including ServiceTracker in the framework JAR file?
>>
>> Up until now, it has never been included because the framework doesn't
>> use it, so it is just extra cruft and can easily be downloaded
>> separately. However, it appears that other frameworks make it available
>> by default.
>>
>> Thoughts?
>>
>> -> richard
>>
> 

-- 
______________________________________________________________
Nektarios K. Papadopoulos
Senior Engineer
Software Engineering Group
inAccess Networks
95A Pentelis Avenue.    Tel    : +30-210-6837640
152 34 Halandri Athens  Fax    : +30-210-6899504
______________________________________________________________

Re: ServiceTracker

Posted by Alin Dreghiciu <ad...@gmail.com>.
As in a conversation I had with Peter Kriens he was pointing out that he
could not think of a useful use case where the raw service listener can be
used due to the missing of the events raised before.
And what's the  then the listener? The ServiceTracker.

In my view it's qualifying for being part of the framework because it
reduces the complexity of service tracking and is less error prone then
using the service listener for the unaware.

Regards,
Alin Dreghiciu

On 5/22/07, Richard S. Hall < heavy@ungoverned.org> wrote:
>
> Should Felix start including ServiceTracker in the framework JAR file?
>
> Up until now, it has never been included because the framework doesn't
> use it, so it is just extra cruft and can easily be downloaded
> separately. However, it appears that other frameworks make it available
> by default.
>
> Thoughts?
>
> -> richard
>

Re: ServiceTracker

Posted by Eric Swindell <er...@att.net>.
No.  LIke you said, it's just extra cruft.

> Should Felix start including ServiceTracker in the framework JAR file?
>
> Up until now, it has never been included because the framework doesn't
> use it, so it is just extra cruft and can easily be downloaded
> separately. However, it appears that other frameworks make it available
> by default.
>
> Thoughts?
>
> -> richard

Re: ServiceTracker

Posted by Felix Meschberger <Fe...@day.com>.
Hi,

I also think, that including it would be a good thing. This would probably
also propagate its use further ...

Regards
Felix

On 5/22/07, Richard S. Hall <he...@ungoverned.org> wrote:
>
> Should Felix start including ServiceTracker in the framework JAR file?
>
> Up until now, it has never been included because the framework doesn't
> use it, so it is just extra cruft and can easily be downloaded
> separately. However, it appears that other frameworks make it available
> by default.
>
> Thoughts?
>
> -> richard
>

Re: ServiceTracker

Posted by Peter Kriens <Pe...@aQute.biz>.
+1

RSH> Should Felix start including ServiceTracker in the framework JAR file?

RSH> Up until now, it has never been included because the framework doesn't
RSH> use it, so it is just extra cruft and can easily be downloaded 
RSH> separately. However, it appears that other frameworks make it available
RSH> by default.

RSH> Thoughts?

->> richard

-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599


Re: ServiceTracker

Posted by "Richard S. Hall" <he...@ungoverned.org>.
BJ Hargrave wrote:
> I would say yes. You can then look at performance optimizations which take 
> advantage of framework internals.
>
> You could even package it as a framework extension fragment :-)
>   

Packaging it as a extension bundle would defeat the purpose...the issue 
is that more and more people just expect that it comes embedded in the 
framework (i.e., not in an external bundle).

-> richard

Re: ServiceTracker

Posted by BJ Hargrave <ha...@us.ibm.com>.
I would say yes. You can then look at performance optimizations which take 
advantage of framework internals.

You could even package it as a framework extension fragment :-)
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@us.ibm.com

office: +1 386 848 1781
mobile: +1 386 848 3788




"Richard S. Hall" <he...@ungoverned.org> 
2007-05-22 08:22
Please respond to
dev@felix.apache.org


To
dev@felix.apache.org
cc

Subject
ServiceTracker






Should Felix start including ServiceTracker in the framework JAR file?

Up until now, it has never been included because the framework doesn't 
use it, so it is just extra cruft and can easily be downloaded 
separately. However, it appears that other frameworks make it available 
by default.

Thoughts?

-> richard



Re: ServiceTracker

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Stuart McCulloch wrote:
> if it is included in the framework jar, how easy would it be
> to replace it with another implementation at deploy time?
>
> ( don't know if this is a likely scenario ... just wondering )

You should still be able to load a different version of it in a separate 
bundle.

-> richard
>
> On 22/05/07, Richard S. Hall <he...@ungoverned.org> wrote:
>> Thomas Watson wrote:
>> > Here are a couple of reasons a Framework may want to include the
>> > ServiceTracker:
>> >
>> > 1) The Framework uses the ServiceTracker to implement things like
>> > the URL Handlers Service Specification.  The Framework could have only
>> > used ServiceTracker internally and not exported it for others to use.
>> >
>>
>> Felix doesn't use ServiceTracker.
>>
>> > 2) Performance enhancements can be made to ServiceTracker to
>> > use Framework specific features.  In this case the version
>> > of ServiceTracker exported by the Framework should be used for
>> > performance reasons.
>> >
>>
>> Agreed.
>>
>> 3) Other frameworks do it, so it effectively becomes the defacto
>> standard way of doing it.
>>
>> :-)
>>
>> -> richard
>>
>> > Tom
>> >
>> >
>> > "Richard S. Hall" <he...@ungoverned.org> wrote on 05/22/2007 
>> 07:22:32 AM:
>> >
>> >
>> >> Should Felix start including ServiceTracker in the framework JAR 
>> file?
>> >>
>> >> Up until now, it has never been included because the framework 
>> doesn't
>> >> use it, so it is just extra cruft and can easily be downloaded
>> >> separately. However, it appears that other frameworks make it 
>> available
>> >> by default.
>> >>
>> >> Thoughts?
>> >>
>> >> -> richard
>> >>
>> >
>> >
>>
>
>

Re: ServiceTracker

Posted by Stuart McCulloch <st...@jayway.net>.
if it is included in the framework jar, how easy would it be
to replace it with another implementation at deploy time?

( don't know if this is a likely scenario ... just wondering )

On 22/05/07, Richard S. Hall <he...@ungoverned.org> wrote:
> Thomas Watson wrote:
> > Here are a couple of reasons a Framework may want to include the
> > ServiceTracker:
> >
> > 1) The Framework uses the ServiceTracker to implement things like
> > the URL Handlers Service Specification.  The Framework could have only
> > used ServiceTracker internally and not exported it for others to use.
> >
>
> Felix doesn't use ServiceTracker.
>
> > 2) Performance enhancements can be made to ServiceTracker to
> > use Framework specific features.  In this case the version
> > of ServiceTracker exported by the Framework should be used for
> > performance reasons.
> >
>
> Agreed.
>
> 3) Other frameworks do it, so it effectively becomes the defacto
> standard way of doing it.
>
> :-)
>
> -> richard
>
> > Tom
> >
> >
> > "Richard S. Hall" <he...@ungoverned.org> wrote on 05/22/2007 07:22:32 AM:
> >
> >
> >> Should Felix start including ServiceTracker in the framework JAR file?
> >>
> >> Up until now, it has never been included because the framework doesn't
> >> use it, so it is just extra cruft and can easily be downloaded
> >> separately. However, it appears that other frameworks make it available
> >> by default.
> >>
> >> Thoughts?
> >>
> >> -> richard
> >>
> >
> >
>


-- 
Cheers, Stuart

Re: ServiceTracker

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Thomas Watson wrote:
> Here are a couple of reasons a Framework may want to include the
> ServiceTracker:
>
> 1) The Framework uses the ServiceTracker to implement things like 
> the URL Handlers Service Specification.  The Framework could have only 
> used ServiceTracker internally and not exported it for others to use.
>   

Felix doesn't use ServiceTracker.

> 2) Performance enhancements can be made to ServiceTracker to 
> use Framework specific features.  In this case the version 
> of ServiceTracker exported by the Framework should be used for 
> performance reasons.
>   

Agreed.

3) Other frameworks do it, so it effectively becomes the defacto 
standard way of doing it.

:-)

-> richard

> Tom
>
>
> "Richard S. Hall" <he...@ungoverned.org> wrote on 05/22/2007 07:22:32 AM:
>
>   
>> Should Felix start including ServiceTracker in the framework JAR file?
>>
>> Up until now, it has never been included because the framework doesn't 
>> use it, so it is just extra cruft and can easily be downloaded 
>> separately. However, it appears that other frameworks make it available 
>> by default.
>>
>> Thoughts?
>>
>> -> richard
>>     
>
>   

Re: ServiceTracker

Posted by Thomas Watson <tj...@us.ibm.com>.
Here are a couple of reasons a Framework may want to include the
ServiceTracker:

1) The Framework uses the ServiceTracker to implement things like 
the URL Handlers Service Specification.  The Framework could have only 
used ServiceTracker internally and not exported it for others to use.

2) Performance enhancements can be made to ServiceTracker to 
use Framework specific features.  In this case the version 
of ServiceTracker exported by the Framework should be used for 
performance reasons.

Tom


"Richard S. Hall" <he...@ungoverned.org> wrote on 05/22/2007 07:22:32 AM:

> Should Felix start including ServiceTracker in the framework JAR file?
> 
> Up until now, it has never been included because the framework doesn't 
> use it, so it is just extra cruft and can easily be downloaded 
> separately. However, it appears that other frameworks make it available 
> by default.
> 
> Thoughts?
> 
> -> richard