[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ecf-dev] ECF 3.11.0: new provider api
- From: Scott Lewis <slewis@xxxxxxxxxxxxx>
- Date: Fri, 21 Aug 2015 10:37:13 -0700
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
Over the past year, a lot of work has gone into the creation of new
remote services distribution providers...e.g.
1) Websockets using R-OSGi 
2) MQTT 
3) Hazelcast 
4) JaxRS based providers (Jersey) 
I expect that there will be consumer desires for using other
distribution providers, as this ability to create and use custom
distribution providers with standards-based remoting (OSGi remote
services) is very useful for integration.
I would like to make it easier for us and other to create new
distribution providers, so I decided to put in place a small new API to
make it easier for those that might wish to do so.
It's currently implemented as 3 new classes in a new package
'org.eclipse.ecf.remoteservices.provider' . The notion is is that a
provider implementation can create an instance of
IRemoteServiceDistributionProvider and register this instance via the
OSGi whiteboard pattern...e.g.:
and the myProviderImpl will be used by ECF's RSA implementation at
export and/or import time.
I've created a RemoteServiceDistributionProvider class, so that the
myProviderImpl can use the now-common 'builder' pattern to create
IRemoteServiceDistributionProvider myProviderImpl = new
The name 'com.mycorp.myprovider.client' and the
MyContainerInstantiator() are required and define the relationship
between the container/config type (e.g. 'ecf.generic.client') and the
IContainerInstantiator that's responsible for creating IContainer
instances associated with the container/config type. Below is a full
example for the Hazelcast provider. Note that using ds would also work
The Builder also allows other customization (e.g. defining a new
Namespace), and flexibility it's currently possible for providers to
sub-class RemoteServiceDistributionProvider .
I would like to include this new API in 3.11.0, which I propose
releasing sometime in September. Since it's new API a minor release is
called for and requires a review.
If you have any comments, suggestions, or criticisms of this new API
let's discuss here on this list.
// Build and register hazelcast manager distribution provider