Home » Archived » Eclipse Communications Framework (ECF) » ECF Bundles for service discovery in OSGI with Bnd tools(Remote Services, Bnd Tools and OSGI)
| |
Re: ECF Bundles for service discovery in OSGI with Bnd tools [message #1785349 is a reply to message #1785342] |
Thu, 12 April 2018 16:09   |
Eclipse User |
|
|
|
Hi Umesh,
Your timing on this question is very good. I'm almost completed with an effort that I've been engaged into to
a) Make it easier to consume ECF RS from bndtools-based projects
b) Deal with the problem you are apparently experiencing wrt start levels
Let me explain b. First, I believe that you have all the necessary bundles for both remote service host and remote service client when running.
In previous versions of ECF it was necessary to have the ECF impl of RSA (bundle: org.eclipse.ecf.osgi.service.remoteserviceadmin) be started *after* any distribution providers (e.g. the ecf.generic.server provider). The reason for this is complicated (e.g. has to do with lazy start in Eclipse and using declarative services or not), but the upshot was that now it's no longer necessary to set start levels to get everything started in appropriate order.
For your use case, you can either:
Start this bundle at a start level *before* all others: org.eclipse.equinox.common
and start these two bundles *after* all the others:
org.eclipse.ecf.osgi.services.remoteserviceadmin
org.eclipse.ecf.osgi.services.distribution
OR you could try to use the snapshot of the Photon build, which is here:
http://download.eclipse.org/rt/ecf/snapshot/
Select Show Directory Contents
(in zip file and/or in plugins directory)
Like the examples, you are currently using the zeroconf/jmdns discovery mechanism (bundle org.eclipse.ecf.provider.jmdns), which will only work for discovery on a LAN...and it can be disabled on some LANS so that's something to keep in mind. ECF has a number of other discovery providers though (e.g. etcd, jslp, file-discovery, etc).
Now, about a (making easier to develop RS with bndtools). It has been/is my intention to create an example project with a bnd (i.e. a a bndrun file with all the necessary ECF RSA bundles and deps). Once the ECF Photon release is available at Maven Central people will be able to simply copy the appropriate maven repo to their bndrun file they will be ready to go). By EF agreement, we can't deploy to maven central before actual release, however (June) so between now and then it will be necessary to use a file-system-based repo in bndtools, perhaps hand constructed initially. But it's my plan to work on this bnd projects/example projects as soon as next week, and I would be happy to work on it with you directly, especially if you are willing to share/contribute back what you create with bndtools.
In any event, I think if you are willing to tolerate some changes, it would be better to attempt to use the Photon snapshot. I will commit to supporting you on that either via this forum or directly (my direct email is slewis at composent.com).
Thanks.
Scott
|
|
| | |
Re: ECF Bundles for service discovery in OSGI with Bnd tools [message #1785352 is a reply to message #1785351] |
Thu, 12 April 2018 16:44   |
Eclipse User |
|
|
|
Umesh Timalsina wrote on Thu, 12 April 2018 16:26Hello Scott,
Thanks for your thorough and detailed reply. I certainly understand the issue now. As far as I know, I have not seen any bnd way of changing bundle start levels, but I could be wrong on this. And thanks for sharing the snapshot version, I will certainly try that out. If I am successful at what I am doing, I will be more than happy to share the whole thing as a nice little tutorial. As far as I know, it has already been days that I have been struggling, before I asked this question here. There are very few resources on remote services out there.
Yes. I'm doing all I can (for Photon) to help with the few resources problem. Part of the problem is that the specs are still moving (new stuff for R7 will also be in ECF Photon) and there's still much to do wrt tooling...especially since some like bndtools, some do not, some like pde, some do not, etc. It makes it difficult for extensions like RS, as we have to duplicate examples for multiple target environments as well as different toolsets, etc.
But please feel free to ask questions here on this or other thread, or on ecf-dev:
https://accounts.eclipse.org/mailing-list/ecf-dev
or to me directly via email. Please don't fight through things spending days...as I want to know where the difficulties are so that I can address as many of them as possible for Photon.
Since I intend to create a bndtools project with the ecf RS dependencies next week, perhaps we can just get yours working and then I can generalize that. Please let me know how things proceed in any event.
|
|
| |
Re: ECF Bundles for service discovery in OSGI with Bnd tools [message #1785469 is a reply to message #1785454] |
Sat, 14 April 2018 11:44   |
Eclipse User |
|
|
|
Hi Umesh,
Umesh Timalsina wrote on Fri, 13 April 2018 22:28Hello Scott,
I tried the python snapshot version of the ECF. I was not able to resolve the dependency for org.eclipse.ecf.console because bnd was unable to resolve the OCD (This happens commonly with build dependencies, and requires usage of Provide-Capability macro when I write my own bundle description in bnd).
Hmm. I don't think I saw this before in my earlier bndtools tests. I'll take another look. Just to make sure: what version of bndtools (and Eclipse) are you using?
Quote:
I muddled through other dependencies, and finally was able to get a run. However, there's still no registration of services.
Ok. So that I can try/test under the same conditions: what service are you registering? Is it one of the ECF examples or something else?
Quote:
Also, since I figured console bundle is to provide a console commands(extend gogo) for remote services.
Yes, that's right...gogo is a new dependency for the console bundles. Forgot about that.
Quote:
Also, there's no progress with regards to service registration (remotely). I tried this in two two networks and two service hosts(RPI and my Laptop).
Ok. With the remoteserviceadmin.console bundle, it should report remote service registration with endpoint description xml to the console (by default). So if you aren't getting that then it's like that something else is wrong. WRT the service discovery (zeroconf), that will *only* work on a LAN (since it uses multicast). But since you aren't getting the remote service registration console output, I don't think it's getting that far.
Quote:
Every plugin that is in TimeServiceConsumer.generic.zeroconf.product has been selected in -runbundles of bnd. A plain deployment is not working. I am looking into karaf container, hopefully this will be a lot of help.
We do have full support for deployment to Karaf 4:
https://wiki.eclipse.org/EIG:Install_TimeService_Tutorial_into_Apache_Karaf
This is not yet been updated, however, for the snapshot version...i.e. it's still the previous version of ECF. I will update that after I get the bndtools support working :). The reason this works with Karaf and not bndtools is Karaf has support for start levels. Now (snapshot) that start levels are not necessary/supported (bndtools) the use of Karaf start levels will be removed for Photon.
I'll be working on the bndtools support today/over next couple of days. I've create a new bug/enhancement for this here so that I can track:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=533581
I would very much appreciate it if you would copy/paste your report into this bug, and I will follow up in comments and present status as we make progress.
Thanks!
Scott
|
|
|
Re: ECF Bundles for service discovery in OSGI with Bnd tools [message #1785483 is a reply to message #1785454] |
Sat, 14 April 2018 23:46   |
Eclipse User |
|
|
|
Hi Umesh,
I was able to create a bnd workspace and a few test bundles and get them working (e.g. exporting, discovery, importing, rpc) with the latest ECF snapshot. What I would like to do is make the workspace available to you for trial/testing and then I'll do the finishing work in order to check it in and make it available. Since ECF Photon hasn't been released yet, it can't be at maven central and so I added the necessary bundles to the bnd/cnf local repository. This makes the cnf project larger, however, and so I can't attach it to this forum (which has a limit on attachment sizes that is too small).
I tried to send it to your email at siu.edu, but that bounced also because the attachment was ~2meg. In any event, if you can let me know how I can make this ~2meg zip file available then you can give it a try.
Thanks,
Scott
|
|
| | |
Goto Forum:
Current Time: Mon Apr 28 16:12:38 EDT 2025
Powered by FUDForum. Page generated in 0.03701 seconds
|