|Re: [ecf-dev] ecf examples|
On 7/31/2012 7:37 AM, Konstantinidis, Johannes wrote:
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 .
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 ...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 level...to 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 be...as like I said the ECF remote service API predated the OSGi specifications...and so there may be wrong or confusing links at this point.