Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Distribution Providers"

(Introduction)
Line 135: Line 135:
 
props.put("service.exported.configs","ecf.jms.activemq.tcp.manager");
 
props.put("service.exported.configs","ecf.jms.activemq.tcp.manager");
 
// Set ecf.jms.activemq.tcp.manager-specific properties
 
// Set ecf.jms.activemq.tcp.manager-specific properties
props.put("ecf.jms.activemq.tcp.manager","tcp://localhost:61616/exampleTopic");
+
props.put("ecf.jms.activemq.tcp.manager.id","tcp://localhost:61616/exampleTopic");
 
// With service properties, will export as a remote service via an instance of ecf.jms.activemq.tcp.manager
 
// With service properties, will export as a remote service via an instance of ecf.jms.activemq.tcp.manager
 
bundleContext.registerService(MyService.class, new MyServiceImpl(), props);
 
bundleContext.registerService(MyService.class, new MyServiceImpl(), props);
Line 154: Line 154:
 
P2 Feature ID:  '''org.eclipse.ecf.provider.jms.feature'''<br>
 
P2 Feature ID:  '''org.eclipse.ecf.provider.jms.feature'''<br>
 
<br>
 
<br>
There is currently not a Karaf feature for these providers.  We would like to create a build for this project but need releng contributions to do so.  Please [https://dev.eclipse.org/mailman/listinfo/ecf-dev join and post to the ecf-dev mailing list] to convey desire for this build or to contribute.
+
There is currently not a Karaf feature for this provider.  We would like to create a Karaf feature build for this project but need releng contributions to do so.  Please [https://dev.eclipse.org/mailman/listinfo/ecf-dev join and post to the ecf-dev mailing list] to convey desire for this build or to contribute.
  
 
Further, in addition to the ecf-remoteservices-sdk Karaf feature, all that's necessary to use this provider is to install the following three bundles:
 
Further, in addition to the ecf-remoteservices-sdk Karaf feature, all that's necessary to use this provider is to install the following three bundles:
Line 171: Line 171:
  
 
Note that the org.eclipse.ecf.provider.jms bundle contains most of the provider code, and that it only depends upon javax.jms.  This makes it straightforward to create new remote service providers based upon JMS implementations other than ActiveMQ.
 
Note that the org.eclipse.ecf.provider.jms bundle contains most of the provider code, and that it only depends upon javax.jms.  This makes it straightforward to create new remote service providers based upon JMS implementations other than ActiveMQ.
 +
 +
==MQTT Provider (Paho)==
 +
 +
The ECF team has created a Remote Service provider based upon the MQTT3 [https://www.eclipse.org/paho/ Paho] implementation.  We are currently using Paho version 1.0.2.
 +
 +
===OSGi Configuration Types/ECF Container Types===
 +
'''ecf.jms.mqtt.manager'''<br>
 +
'''ecf.jms.mqtt.client'''<br>
 +
 +
For example, to export an instance of MyServiceImpl
 +
 +
<pre>
 +
// Set required OSGi standard service property
 +
props.put("service.exported.interfaces","*");
 +
// Set OSGI standard service.exported.configs property to ecf.jms.mqtt.manager
 +
props.put("service.exported.configs","ecf.jms.mqtt.manager");
 +
// Set ecf.jms.mqtt.manager-specific properties
 +
props.put("ecf.jms.mqtt.manager.id","tcp://iot.eclipse.org:1883/exampleTopic");
 +
// With service properties, will export as a remote service via an instance of ecf.jms.mqtt.manager
 +
bundleContext.registerService(MyService.class, new MyServiceImpl(), props);
 +
</pre>
 +
 +
===Bundles===
 +
 +
org.eclipse.ecf.provider.jms.mqtt
 +
 +
===Dependencies===
 +
'''org.eclipse.ecf.provider.jms.mqtt''':  org.eclipse.ecf.provider.jms from JMS/ActiveMQ Provider above.
 +
 +
===Download/Install===
 +
 +
P2 Repo: [http://build.ecf-project.org/repo/C-HEAD-jms-mqtt.feature/lastSuccessful/archive/site.p2/ http://build.ecf-project.org/repo/C-HEAD-jms-mqtt.feature/lastSuccessful/archive/site.p2/]<br>
 +
P2 Feature ID:  '''org.eclipse.ecf.provider.jms.mqtt.feature'''<br>
 +
<br>
 +
There is currently not a Karaf feature for this provider.  We would like to create a Karaf feature build for this project but need releng contributions to do so.  Please [https://dev.eclipse.org/mailman/listinfo/ecf-dev join and post to the ecf-dev mailing list] to convey desire for this build or to contribute.
 +
 +
Further, in addition to the JMS/ActiveMQ Provider, all that's necessary to use this provider is to install the following bundle:
 +
 +
#'''org.eclipse.ecf.provider.jms.mqtt''' available [http://build.ecf-project.org/repo/C-HEAD-jms-mqtt.feature/lastSuccessful/archive/site.p2/plugins/ from ECF builder]
 +
 +
===Source Code===
 +
 +
[https://github.com/ECF ECF Github] Repo: [https://github.com/ECF/Mqtt-Provider ECF MQTT Provider Github Repo], Paths:<br>
 +
'''org.eclipse.ecf.provider.jms.mqtt''': bundles/org.eclipse.ecf.provider.jms.mqtt
 +
 +
If you would like to contribute to the build/releng or the coding for this provider, please [https://dev.eclipse.org/mailman/listinfo/ecf-dev join and post a note to that effect to the ecf-dev mailing list].

Revision as of 17:13, 8 October 2015

Introduction

The Remote Services/Remote Service Admin specifications (chaps 100 and 122 in OSGi Enterprise spec) allows for the use of distinct distribution providers for every exported remote service. Distribution providers are responsible for the actual marshalling/serialization and network communication that takes place when a consumer invokes a method on a remote service.

The ECF Architecture also allows the use of multiple distribution providers. Further, ECF's open APIs and implementations supports the creation of distribution providers based upon existing providers, or created from scratch using desired transport protocols and/or serialization formats.

Remote Services API

ECF's API for distribution providers is called the Remote Services API (RSAPI). An implementation of this API is the only thing required of distribution provider implementations for them to be successfully used as a standards/compliant implementation of RS/RSA.

Symbolic Name: org.eclipse.ecf.remoteservice
Minimum EE: J2SE-1.5+
Dependencies

  • Framework: OSGi R5+
  • ECF Core Bundles: org.eclipse.ecf, org.eclipse.ecf.identity
  • org.eclipse.equinox.concurrent.future bundle
  • org.eclipse.ecf.remoteservice.asyncproxy bundle version 1.X (Java 7) or 2.X (Java 8)

Remote Service API Javadoc

All RSA distribution providers implement the Remote Services API.

Generic Provider

All the generic providers are based upon a tcp-based asynchronous messaging transport.

OSGi Configuration Types/ECF Container Types

ecf.generic.server
ecf.generic.client
ecf.generic.ssl.server
ecf.generic.ssl.client

For example, to export an instance of MyServiceImpl

// Set required OSGi standard service property
props.put("service.exported.interfaces","*");
// Set OSGI standard service.exported.configs property to ecf.generic.server
props.put("service.exported.configs","ecf.generic.server");
// Set ecf.generic.server-specific properties
props.put("ecf.generic.server.port","2121");
props.put("ecf.generic.server.hostname","mycompanyhost.com");
// With service properties, will export as a remote service via an instance of ecf.generic.server 
bundleContext.registerService(MyService.class, new MyServiceImpl(), props);

See here for a description for generic-provider-specific service properties such as ecf.generic.server.hostname, ecf.generic.server.port, etc.

Bundles

org.eclipse.ecf.provider
org.eclipse.ecf.provider.remoteservice

Dependencies

org.eclipse.ecf.provider: ECF core, org.eclipse.ecf.sharedobject
org.eclipse.ecf.provider.remoteservice: org.eclipse.ecf.provider, RSAPI

Download/Install

P2 Repo and Karaf Feature: See Download Page
P2 Feature ID: org.eclipse.ecf.provider.generic.remoteservice.feature

Karaf Feature: ecf-remoteservices-distprovider-generic in repos given on Karaf Installation Page

Source Code

Git Repo: ECF Git Repo, Paths:
org.eclipse.ecf.provider: framework/bundles/org.eclipse.ecf.provider
org.eclipse.ecf.provider.remoteservice: providers/bundles/org.eclipse.ecf.provider.remoteservice

r-OSGi Provider

OSGi Configuration Types/ECF Container Types

ecf.r_osgi.peer
ecf.r_osgi.peer.ws (see r-OSGi over Websockets below)
ecf.r_osgi.peer.wss (see r-OSGi over Websockets below)

For example, to export an instance of MyServiceImpl

// Set required OSGi standard service property
props.put("service.exported.interfaces","*");
// Set OSGI standard service.exported.configs property to ecf.generic.server
props.put("service.exported.configs","ecf.r_osgi.peer");
// With service properties, will export as a remote service via an instance of ecf.generic.server 
bundleContext.registerService(MyService.class, new MyServiceImpl(), props);

See here for a description for rosgi-provider System properties.

Bundles

org.eclipse.ecf.provider.r_osgi
ch.ethz.iks.r_osgi.remote

Dependencies

ch.ethz.iks.r_osgi.remote: org.objectweb.asm
org.eclipse.ecf.provider.r_osgi: ch.ethz.iks.r_osgi.remote, ECF core, RSAPI

Download/Install

P2 Repo and Karaf Feature: See Download Page
P2 Feature ID: org.eclipse.ecf.remoteservice.rosgi.feature

Karaf Feature: ecf-remoteservices-distprovider-rosgi in repos given on Karaf Installation Page

Source Code

Git Repo: ECF Git Repo, Paths:
ch.ethz.iks.r_osgi.remote: protocols/bundles/ch.ethz.iks.r_osgi.remote
org.eclipse.ecf.provider.remoteservice: providers/bundles/org.eclipse.ecf.provider.r_osgi

r-OSGi over Websockets

The two r-OSGi providers: ecf.r_osgi.peer.ws, and ecf.r_osgi.peer.wss are supported by adding two additional bundles: ch.ethz.iks.r_osgi.transport.http, and Java Websocket. These two bundles are available in the ECF Github Websockets Repo, at the following paths:
ch.ethz.iks.r_osgi.transport.http: bundles/ch.ethz.iks.r_osgi.transport.http
java_websocket: bundles/java_websocket

These two bundles must currently be built from source. We would like to setup a build for this project but need releng contributions to do so. Please join and post to the ecf-dev mailing list to convey desire for this build or to contribute.

JMS/ActiveMQ Provider

All the JMS/ActiveMQ providers are based upon the Java Messaging Service (JMS) specification version 1.1.

OSGi Configuration Types/ECF Container Types

ecf.jms.activemq.tcp.manager
ecf.jms.activemq.tcp.client

For example, to export an instance of MyServiceImpl

// Set required OSGi standard service property
props.put("service.exported.interfaces","*");
// Set OSGI standard service.exported.configs property to ecf.jms.activemq.tcp.manager
props.put("service.exported.configs","ecf.jms.activemq.tcp.manager");
// Set ecf.jms.activemq.tcp.manager-specific properties
props.put("ecf.jms.activemq.tcp.manager.id","tcp://localhost:61616/exampleTopic");
// With service properties, will export as a remote service via an instance of ecf.jms.activemq.tcp.manager
bundleContext.registerService(MyService.class, new MyServiceImpl(), props);

Bundles

org.eclipse.ecf.provider.jms
org.eclipse.ecf.provider.jms.activemq (based upon ActiveMQ 5.12 currently...see source code).

Dependencies

org.eclipse.ecf.provider.jms: javax.jms (1.1), ECF core, RSAPI, org.eclipse.ecf.provider, org.eclipse.ecf.provider.remoteservice
org.eclipse.ecf.provider.jms.activemq: org.eclipse.ecf.provider.jms

Download/Install

P2 Repo: http://build.ecf-project.org/repo/C-HEAD-jms.feature/lastSuccessful/archive/site.p2/
P2 Feature ID: org.eclipse.ecf.provider.jms.feature

There is currently not a Karaf feature for this provider. We would like to create a Karaf feature build for this project but need releng contributions to do so. Please join and post to the ecf-dev mailing list to convey desire for this build or to contribute.

Further, in addition to the ecf-remoteservices-sdk Karaf feature, all that's necessary to use this provider is to install the following three bundles:

  1. javax.jms 1.1 available from Orbit
  2. org.eclipse.ecf.provider.jms available from ECF builder
  3. org.eclipse.ecf.provider.jms.activemq also available from ECF builder

Source Code

ECF Github Repo: ECF JMS Github Repo, Paths:
org.eclipse.ecf.provider.jms: bundles/org.eclipse.ecf.provider.jms
org.eclipse.ecf.provider.jms.activemq: bundles/org.eclipse.ecf.provider.jms.activemq

If you would like to contribute to the build/releng or the coding for this provider, please join and post a note to that effect to the ecf-dev mailing list.

Note that the org.eclipse.ecf.provider.jms bundle contains most of the provider code, and that it only depends upon javax.jms. This makes it straightforward to create new remote service providers based upon JMS implementations other than ActiveMQ.

MQTT Provider (Paho)

The ECF team has created a Remote Service provider based upon the MQTT3 Paho implementation. We are currently using Paho version 1.0.2.

OSGi Configuration Types/ECF Container Types

ecf.jms.mqtt.manager
ecf.jms.mqtt.client

For example, to export an instance of MyServiceImpl

// Set required OSGi standard service property
props.put("service.exported.interfaces","*");
// Set OSGI standard service.exported.configs property to ecf.jms.mqtt.manager
props.put("service.exported.configs","ecf.jms.mqtt.manager");
// Set ecf.jms.mqtt.manager-specific properties
props.put("ecf.jms.mqtt.manager.id","tcp://iot.eclipse.org:1883/exampleTopic");
// With service properties, will export as a remote service via an instance of ecf.jms.mqtt.manager
bundleContext.registerService(MyService.class, new MyServiceImpl(), props);

Bundles

org.eclipse.ecf.provider.jms.mqtt

Dependencies

org.eclipse.ecf.provider.jms.mqtt: org.eclipse.ecf.provider.jms from JMS/ActiveMQ Provider above.

Download/Install

P2 Repo: http://build.ecf-project.org/repo/C-HEAD-jms-mqtt.feature/lastSuccessful/archive/site.p2/
P2 Feature ID: org.eclipse.ecf.provider.jms.mqtt.feature

There is currently not a Karaf feature for this provider. We would like to create a Karaf feature build for this project but need releng contributions to do so. Please join and post to the ecf-dev mailing list to convey desire for this build or to contribute.

Further, in addition to the JMS/ActiveMQ Provider, all that's necessary to use this provider is to install the following bundle:

  1. org.eclipse.ecf.provider.jms.mqtt available from ECF builder

Source Code

ECF Github Repo: ECF MQTT Provider Github Repo, Paths:
org.eclipse.ecf.provider.jms.mqtt: bundles/org.eclipse.ecf.provider.jms.mqtt

If you would like to contribute to the build/releng or the coding for this provider, please join and post a note to that effect to the ecf-dev mailing list.

Back to the top