Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » Which bundles need to be started to enable remote service discovery?
Which bundles need to be started to enable remote service discovery? [message #1483622] Sat, 22 November 2014 19:59 Go to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hello

I am currently playing with the raspberry pi examples. While I was setting up a product to run an Eclipse including the "Raspberry PI GPIO View" following this tutorial, I got into wondering which bundles I need to configure to auto-start to enable remote service discovery.

Here is my current configuration for the IDE:
<configurations>
  <plugin id="ch.ethz.iks.slp" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.discovery" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.osgi.services.distribution" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.provider" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.provider.jslp" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.remoteservice" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.remoteservice.asyncproxy" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.sharedobject" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
  <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
  <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
  <plugin id="org.eclipse.osgi" autoStart="true" startLevel="-1" />
  <plugin id="org.eclipse.osgi.services" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.osgi.services.remoteserviceadmin" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.osgi.util" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
</configurations>

Which of these bundles are absolutely necessary to enable remote service discovery?

Thanks!

Smile
Christoph

[Updated on: Sat, 22 November 2014 20:00]

Report message to a moderator

Re: Which bundles need to be started to enable remote service discovery? [message #1483724 is a reply to message #1483622] Sat, 22 November 2014 22:05 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Christoph Keimel wrote on Sat, 22 November 2014 14:59
Hello

I am currently playing with the raspberry pi examples. While I was setting up a product to run an Eclipse including the "Raspberry PI GPIO View" following this tutorial, I got into wondering which bundles I need to configure to auto-start to enable remote service discovery.

Here is my current configuration for the IDE:
<configurations>
  <plugin id="ch.ethz.iks.slp" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.discovery" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.osgi.services.distribution" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.provider" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.provider.jslp" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.remoteservice" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.remoteservice.asyncproxy" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.ecf.sharedobject" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
  <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
  <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
  <plugin id="org.eclipse.osgi" autoStart="true" startLevel="-1" />
  <plugin id="org.eclipse.osgi.services" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.osgi.services.remoteserviceadmin" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.osgi.util" autoStart="true" startLevel="0" />
  <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
</configurations>

Which of these bundles are absolutely necessary to enable remote service discovery?

Thanks!

Smile
Christoph


Hi Christoph.

In this configuration, SLP discovery is being used, and so the SLP provider must be started. That provider is in bundle: org.eclipse.ecf.provider.jslp

Note that ECF has a provider architecture for discovery and distribution, and if other discovery providers (e.g. zookeeper, jmdns, etc.) are used it will generally be necessary to start the appropriate discover provider. Typically, such provider bundles will have ids of the following form: org.eclipse.ecf.provider.*.

Since you don't appear to be using the Equinox plugin registry, it will also be necessary to explicitly start the distribution provider. It appears that you are missing one of the necessary bundles for the ECF generic provider, however. That bundle is: org.eclipse.ecf.provider.remoteservice. Adding and then starting this bundle will make the ECF generic provider available for runtime export of remote services via the ECF generic provider.

Finally, it's necessary to start the org.eclipse.ecf.osgi.services.distribution bundle as this bundle contains the topology manager specified by the OSGi Remote Service Admin R6 specification (which ECF does implement).

So to summarize, it's generally necessary to start

a) the discovery provider (SLP - org.eclipse.ecf.provider.jslp)
b) the distribution provider (ECF generic - org.eclipse.ecf.provider.remoteserviceadmin)
c) The bundle containing the desired topology manager (org.eclipse.ecf.osgi.services.distribution)

Starting these three things will of course result in the starting of dependent bundles, which would account for most of the bundles in your configuration given above.

In many configurations (e.g. the raspberry pi examples) it's easier to autostart all the bundles, and this is why we generally do autostart all bundles. In the OSGi world..especially server-side...this is frequently what is done anyway (start all bundles).

If you would be interested in more info about the hows and whys, please feel free to ask here, or and/or join the ECF dev mailing list:

https://dev.eclipse.org/mailman/listinfo/ecf-dev

Note one other thing. Wim Jongman who presented a raspberry pi demo at EclipseCon...see here

http://eclipseecf.blogspot.com/2014/11/internet-of-things-and-ecf-remote.html

along with me are in the process of making a few minor changes and additions to the raspberry pi GPIO API and implementation...which will hopefully make it easier to use (for you and others). If you would like to follow and/or comment on or contribute to these changes please see here:

https://github.com/ECF/RaspberryPI/pull/2

Thanks,

Scott
Re: Which bundles need to be started to enable remote service discovery? [message #1484439 is a reply to message #1483724] Sun, 23 November 2014 12:40 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hi Scott

Thanks for the detailed answer and thanks for the tutorials!

> Since you don't appear to be using the Equinox plugin registry, it will also be necessary to explicitly start > the distribution provider.

Which plug-in do I need to start to enable this?
Will this also hook the discovery provider and the topology manager?

> So to summarize, it's generally necessary to start
> a) the discovery provider (SLP - org.eclipse.ecf.provider.jslp)
> b) the distribution provider (ECF generic - org.eclipse.ecf.provider.remoteserviceadmin)
> c) The bundle containing the desired topology manager (org.eclipse.ecf.osgi.services.distribution)

This works great and it helps my understanding of what is going on under the hood. Since I am setting up a client that will only consume services, I skipped (b).

> Note one other thing. Wim Jongman who presented a raspberry pi demo at EclipseCon...see here

I was there. Great presentation ... got me interessted in this technology!

> If you would like to follow and/or comment on or contribute to these changes please see here:

The reason for my interest in this topic comes from this sentence in your tutorial:

The code for this Eclipse plugin is in the test/bundles/org.eclipse.ecf.raspberrypi.test.gpio.ide project. When run in the Eclipse ide, the empty view (no discovered IGPIOPinOutput services) looks like this

Using "Run As > Eclipse Application" doesn't work in my environment, because the remote service is not discovered. The launch configuration in org.eclipse.ecf.raspberrypi.test.gpio.ide doesn't work for me, because I don't have the product "org.eclipse.sdk.ide" in my installation (Eclipse Luna 4.4.1 Standard + EFC SDK - Java8). If I change this to "org.eclipse.platform.ide" the discovery also doesn't work. So I decided to create product definition based on the launch configuration to further fine control which plugins I need and also to hook into the logging to see whats going on (-Dch.ethz.iks.slp.debug=true ).

From this experience I could contribute the product configuration to start the Pin-Client IDE and document this on the tutorial wiki. Are you interessted in this?

Smile
Christoph
Re: Which bundles need to be started to enable remote service discovery? [message #1484566 is a reply to message #1484439] Sun, 23 November 2014 15:14 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

Hi Cristoph,

Great that you could work it out.

For the presentation I have created a server (pipolos) that runs on the pi with the required startup configuration [1].
In addition there is the user interface egg client [2] that will discover the remote services.

The *ide* bundle that Scott created is designed to run in the IDE.

Cheers,

Wim

[1] https://github.com/wimjongman/pipolos/blob/master/README.md
[2] https://github.com/wimjongman/eggclient/blob/master/README.md
Previous Topic:How to setup o.e.ecf.examples.raspberrypi.* on the pi
Next Topic:Type of bootstrapping Architechture in OM2M
Goto Forum:
  


Current Time: Thu Apr 25 13:12:38 GMT 2024

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

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

Back to the top