Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Advanced Service Concept
Advanced Service Concept [message #45330] Sat, 07 August 2004 20:48 Go to next message
Eclipse UserFriend
Originally posted by: schulz78.gmx.net

Skipping through the articles on this list, I have learned lot of things
about OSGi lifecycle management. I am pretty confident that I have got the
basics of OSGi/Eclipse integration. What I am not as confident about is how
to implement a service that depends on a set of other services and that is
aware and can react to changes (like removals, updates, etc.) in this set. I
know that one can register a listener to get notified of lifecycle and
bundle events. But what I am curious about is how to wrap this up in an
appropriate programming model.

One thing I thought about is using service proxies that shields a service
from transient changes in the dependent services set. Method invocations on
such a service proxy might block in the presence of a transient service
inaccessibility. But I am not sure how to handle the case when there is
state associated with the service relation. Perhaps there is no clean
general solution to this and one must fall back to specialized per-service
implementation solutions.

Any comments and suggestions on that topic would be of great interest to me.
Perhaps someone can point me to patterns that makes coding in such a dynamic
environment easier. How are dynamic aware / enabled Eclipse plugins laid
out?

One OSGi related project I stumbled upon is located at
http://gravity.sourceforge.net/servicebinder/. I think the guy does exactly
what I described above by extending the way OSGi manages inter-service
dependencies. One problem is that servicebinder relies on a special Adaptor
that implements the guts of servicebinder's service management. Is there a
way to write an Eclipse OSGi plugin that extends another Adapter than the
Eclipse specific (note that I must extend the servicebinder Adaptor).

If someone with insight has spare time to have a look at servicebinder and
make some statements on the feasibility and quality of the proposed
approach, this would be of great help to me.

Regards,
Sven
Re: Advanced Service Concept [message #45387 is a reply to message #45330] Wed, 11 August 2004 13:24 Go to previous messageGo to next message
Erik Wistrand is currently offline Erik WistrandFriend
Messages: 9
Registered: July 2009
Junior Member
Sven Schulz wrote:

> What I am not as confident about is how to implement a service that
> depends on a set of other services and that is aware and can react to
> changes (like removals, updates, etc.) in this set.

> Any comments and suggestions on that topic would be of great interest
> to me. Perhaps someone can point me to patterns that makes coding in
> such a dynamic environment easier.

One pattern proposed by OSGi is the white-board pattern, which more or
less concentrates to:

A client bundle shouldn't listen for services, it should register
services itself.

This could be considered the IoC pattern for more buzz-word compliant
folks :)

(I think there should be some OSGi white paper on this, but perhaps
that's members only...)

Usually, this takes the form of a bundle delivering some kind of
functionality, does _not_ register a service object with methods like
getTemperature(), addTemperatureListener() etc etc, but rather looks for
client registered services like a TemperatureChangeListener.

This way, all hard work happens on the functionality exporting side, not
on the client side, and the service registery can be used instead of
specialized listener tables.

The exporting side still needs to do tricky work, though. And automated
frameworks such as Hall's service binder is a hot topic.

/Erik W

BTW, OSGi itself has sometimes failed in fullfilling the white-board
approach, most notably with the HTTP service definition. Most newer
services are defined in this way.

--
Erik Wistrand, erik@wistrand.com
Re: Advanced Service Concept [message #45417 is a reply to message #45387] Wed, 11 August 2004 20:49 Go to previous message
Eclipse UserFriend
Originally posted by: schulz78.gmx.net

"Erik Wistrand" wrote:

> One pattern proposed by OSGi is the white-board pattern, [...]

> (I think there should be some OSGi white paper on this, but perhaps
> that's members only...)

Could someone send me a copy of that white paper (or a link to it, which I
suppose will not be available for non-members).

> The exporting side still needs to do tricky work, though. And automated
> frameworks such as Hall's service binder is a hot topic.

Does anybody know about other frameworks that relieves the developer from
the burden of
implementing this *tricky work*?

--
Sven Schulz
Previous Topic:Invalid Bundle Activator all of a sudden!?
Next Topic:RCP Application and Preferences - how?
Goto Forum:
  


Current Time: Thu Apr 18 02:59:13 GMT 2024

Powered by FUDForum. Page generated in 0.02552 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top