Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] ecf examples

Hi Johannes,

On 7/31/2012 7:37 AM, Konstantinidis, Johannes wrote:

Hi all,


can you tell me the difference between the and the examples, please?


Of course, I see the different source code, but to me both examples seem to have the same result, only reached in two different ways:

The rs example seems to do the things explicitly, that are done magically by the non-rs example (I only tried the non-rs example so far and just looked at the source code).


The same confusion with the three "getting started" links [1], [2], [3] related to Remote Services: to me [1] seems like non-rs, [3] like rs and [2] like something in between. Maybe one or more are outdated? Can you give me a hint what to use and about the advantages of the different approaches?

Ok...a brief explanation.

ECF has a 'remote services API'...which provides direct access to runtime API for interacting with the ECF IContainer, IRemoteServiceContainerAdapter and other ECF interfaces.  This API is in org.eclipse.ecf.remoteservice and org.eclipse.ecf.core plugins.  It's transport-independent, and allows quite a lot of customization/extension for the behavior of existing providers (e.g. generic, r-osgi, restlet, etc)...and, of course, allows the modular creation and customization of providers.

ECF also has an implementation of the OSGI remote services specification.  The OSGI remote services specification is actually implemented *on* the ECF remote services API...meaning that new providers that implement the ECF remote services API will automatically work as a complete OSGi remote services implementation.   This is kind of nice for those interested in creating new providers, because it makes it very easy to create new providers (reuse/extend existing providers)...and then any code that uses the OSGi remote services will 'just work' with a new provider. 

No need for anyone to re-implement the OSGi remote services/RSA specifications.  It can only be done/maintained once (in true modular fashion :), and we (ECF committers) will do this for you.

This is described graphically...with a layering diagram...on this page [1].

Historically, the ECF remote services API existed before the OSGi RS/RSA spec existed...and when the OSGI spec came out it just made sense to use ECF remote services as the basis of our OSGi remote services implementation.

Now...back to the examples.  

The .rs examples actually expose the ECF remote services API usage (currently in a simple/trivial way...but nonetheless it's there). 

The non-rs examples only use the OSGi remote services API...and ECF remote service containers are created and used automatically by RSA.   As per the OSGI RSA specification...and ECF's RSA implementation [2]...RSA's topology manager makes decisions about how/when to export a remote service as it's registered.   The ECF topology managers create container(s)...if necessary...and export services...again using the ECF remote service API.

The take away with the examples is that the non-rs example is OSGI remote services only, while the .rs example exposes the ECF remote service API at the application allow for deeper customization.   That...and there's no point in deleting/deprecating example code :-).

Hope this helps.  I will take a look at the doc links to check for whether things are now out of date.  There may like I said the ECF remote service API predated the OSGi specifications...and so there may be wrong or confusing links at this point.




Back to the top