[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ecf-dev] OSGI services on same host but separate VM
|
Hi Leen,
Leen Toelen wrote:
Hi,
is it possible to call remote services easily which are running on the
same host but in a separate VM?
Yes...this is done frequently for testing. For example, with the ECF
generic provider you can start up a ECF generic server application
(application id: org.eclipse.ecf.provider.GenericServer) and then
startup up two clients...one that is the 'host' of the service (i.e. the
peer that is hosting the service), and the other that is the 'client' of
the service (i.e. the peer that is accessing/using the service). The
two clients have to connect to the server, and at that point the remote
service registry entries are replicated to the other client and the
other client can then lookup/access the service locally. There are
three java vms running all on one machine: server, clientservicehost,
clientserviceclient. Any/all of these jvms/processes can be running on
a single host or separate hosts.
Other host/process combinations are possible...i.e. it's also possible
to run these in the same process (same jvm) as well if desired (we do
this for automated testing).
Let's say I want to write an OSGI
based file manager , a browser and a chat client. I would like the
file manager to send files to online contacts, send urls of sites I am
visting from the browser and chat (just imagine :-) ) from the chat
client. My first idea would be to create a "standalone" ecf service
and have the three applications use its services/notifications/etc.
Yes, this is very doable. And the implied server-side work is very much
in line with our forthcoming move into the Eclipse Runtime toplevel
project. If you are able/willing to discuss this further, I'm sure
everyone on this list would be interested in hearing about it...and if
you are able/willing to contribute some of the work I'm sure others
would be interested as well.
Thanks,
Scott