Which bundles need to be started to enable remote service discovery? [message #1483622] |
Sat, 22 November 2014 14:59  |
Eclipse User |
|
|
|
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 15:00] by 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 17:05   |
Eclipse User |
|
|
|
Christoph Keimel wrote on Sat, 22 November 2014 14:59Hello
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02325 seconds