An Remote Services Distribution Provider for OSGi R7 Remote Services. This allows dynamic remote procedure call between Java and Python objects. Python-Implementations can be exposed to Java consumers as OSGi services, and Java-based OSGi services can be exposed to Python consumers.
OSGi R7 Remote Services includes support for Asynchronous Remote Services supporting Remote Services with return values of CompletableFuture, Future, or OSGi's Promise (Java) that will be executed asynchronously.
NEW: Bndtools templates to run Python.Java Hello Example app and Python.Java Protobuf Hello Example app.
Their is now support for using ECF Remote Services impl with Bndtools. There are now templates in the bndtools.workspace that will run the Python.Java Hello and Protobuf Hello Examples. Here are the instructions for using the Hello template (also appears in help window when selecting the ECF Python.Java Hello Example template: This template will create a bndrun for launching the Python.Java Hello example application. Source code repo: https://github.com/ECF/Py4j-RemoteServicesProvider
Once the resulting bndrun file is resolved and the program is run, output like this will appear in console
g! SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Jul 15, 2018 7:54:36 PM py4j.GatewayServer fireServerStarted INFO: Gateway Server Started 19:54:36.814;EXPORT_REGISTRATION;exportedSR=[org.eclipse.ecf.examples.hello.IHello];cID=URIID [uri=py4j://127.0.0.1:25333/java];rsId=1 --Endpoint Description--- ...
This means that the Java gateway listener is waiting for connections from a Python process.
Instructions for the ECF Python.Java Protobuf Hello Example template:
This template will create a bndrun for launching the Python.Java Protobuf Hello example application. Source code repo: https://github.com/ECF/Py4j-RemoteServicesProvider Once the resulting bndrun file is resolved and the program is run, output like this will appear in console
g! SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Jul 15, 2018 7:54:36 PM py4j.GatewayServer fireServerStarted INFO: Gateway Server Started 19:54:36.814;EXPORT_REGISTRATION;exportedSR=[org.eclipse.ecf.examples.protobuf.hello.IHello];cID=URIID [uri=py4j://127.0.0.1:25333/java];rsId=1 --Endpoint Description--- ...
The Py4j Remote Services Provider depends upon the ECF implementation of the OSGi Remote Service Admin (RSA). The latest version is available at Maven Central and as an Eclipse p2 repository or zip as described by this download page.
A recent build of the Java components (OSGi bundles) exist in this directory:https://github.com/ECF/Py4j-RemoteServicesProvider/tree/master/build
A P2 Repository is also available in that same directory...i.e: https://github.com/ECF/Py4j-RemoteServicesProvider/tree/master/build. Add this URL with name (e.g.): ECF Py4j Provider.
For support please file an issue on this repo, or contact scottslewis@gmail.com
Python OSGi Service Bridge may be installed via pip:
pip install osgiservicebridge
The Python OSGi Service Bridge depends upon both Py4j 0.10.7+ and Google Protocol Buffers version 3.5.1. pip will install these dependencies via the command above.
The OSGi Service Bridge Python source code is in the python/osgiservicebridge project. This package should be installed into Python 3.3+ prior to running the example (in, e.g. the run.py in examples/org.eclipse.ecf.examples.protobuf.hello/python-src directory).
Python.Java Remote Services is distributed with the Apache2 license. See LICENSE in this directory for more information.