Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] transparent or not transparent--that is a question

Hi Folks,

There have been some very interesting discussions around network transparency and OSGi remote services originally started on the Riena newsgroup:

news:eclipse.technology.riena

In response to this, I decided to add to ECF the ability to invoke remote services transparently. I implemented a OSGi service property that allows those that register services via IRemoteServicesContainerAdapter.registerRemoteService(...) to optionally publish the remote service proxy to the local service registry, so that those that want to access a remote service *with complete network transparency* can do so (i.e. via the normal bundleContext.getServiceReference()/getService() calls and/or ServiceTracker).

There's some test/example code that does this here:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/tests/org.eclipse.ecf.tests.remoteservice/src/org/eclipse/ecf/tests/remoteservice/ServiceReferenceTest.java?root=Technology_Project&view=log

In the testGetServiceReference method, only the local service registry is accessed (by client). This is setup by the service publisher via the Constants.LOCAL_SERVICE_REGISTRATION. An ECF RS proxy is used underneath to make the actual call to IConcatService.concat(str1,str2)...and this is completely network transparent for the client (just using the interface, bundle context, OSGi service registry).

In the testGetRemoteServiceReference the IRemoteService is accessed via the Constants.REMOTE_SERVICE property, and the method is called asynchronously. The intention of testGetRemoteServiceReference is to show that ECF RS can easily get access to non-network-transparent remote service methods if programmers desire it. Ultimately it's up to the service programmers and they can have it either/both ways with ECF RS. Further, any/all variety of transports can be used underneath the RS API...e.g. JMS, ECF generic, XMPP, r-OSGi, SOAP/WS, Riena, proprietary impls, any others.

Scott




Back to the top