[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ecf-dev] remote services in java applications (no OSGi framework)
- From: Scott Lewis <slewis@xxxxxxxxxxxxx>
- Date: Fri, 15 May 2015 11:33:38 -0700
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
Progress to report on this.
I've created a new repo on ECF's github site entitled 'ServiceRegistry'
. Currently in this repo are the following java projects:
1) org.eclipse.ecf.osgi.serviceregistry. This project declares a
org.eclipse.ecf.osgi.serviceregistry.ServiceRegistry . Instances of
this interface may be used by java application to register services,
lookup/get/use services and service references, etc. Note that most of
the methods on this interface essentially mimic those available in OSGi
via a valid BundleContext. Also present is a ServiceRegistryFactory
interface, that can be used to create/configure ServiceRegistry
instances via the java ServiceLoader. Also present are a few classes in
the launch sub-package, that allows the launching to be configured (i.e.
what bundles are included).
2) org.eclipse.ecf.osgi.serviceregistry.equinox. This project provides
an Equinox-based implementation of the ServiceRegistry interface.
3) org.eclipse.ecf.test.osgi.serviceregistry. This is a test project
that uses the Equinox-based implementation to test the ServiceRegistry API.
4) org.eclipse.ecf.osgi.serviceregistry.pojo. This provides a
PojoSR-based implementation of the ServiceRegistry interface.
Note that all of the above are pure java projects, not plugin/osgi projects.
I've tested the PojoSR-based implementation with ECF RS/RSA...and it
works! What this means is that for RS/RSA either hosts (servers)
and/or consumers (clients), the same code that exposes and uses Remote
Services in OSGi can now work in a java-only environment (i.e. without
the OSGi framework). This makes possible a number of very interesting
Remote Services/RSA use cases...e.g. Java-based clients with OSGi
Servers, Java Servers with OSGi Clients (e.g. Eclipse/RCP), and etc, all
with RS/RSA discovery and/or whatever distribution provider, DS,
ServiceTrackers, etc as desired. The utility of Remote Services for
Internet of Things....where a full OSGi framework may not be
assumed/present...is pretty obvious.
My next intention is to create a small example...perhaps creating a
java8-only client for the TimeService. If people have other examples
that they are interested in, or would like to collaborate on testing
and/or examples, please let me know.
On 4/22/2015 9:42 AM, Scott Lewis wrote:
Some of you may be aware of pojosr: https://code.google.com/p/pojosr/
It's an implementation of the OSGi service registry that does not
require running a complete OSGI framework.
Something I've been thinking about for some time, and have now acted
upon is that ECF's impl of OSGi Remote Services can/could use
pojosr...rather than only running on an 'real' OSGi framework
(equinox, eclipse, felix, karaf, etc). What this would allow would
be that people could host and/or consume remote services...with
exactly the same service registration (host) and lookup/injection
(consumer) API, and all the other advantages of RS (e.g. dynamics,
versioning, etc)...as plain-ol java applications.
There are significant limitations, of course (no dynamic bundle
install, update), but for some use cases this would allow people to
create smaller java apps, with no OSGI framework, but that host and/or
consume Remote Services.
I have done/am doing some of this work, and will soon make what I've
done available on our github location . I just wanted to find out
if there was interest from this community, and see if others have
other use cases, and/or might want to contribute to such an effort.
ecf-dev mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit