Archived

This forum has been archived. Please start a new discussion on GitHub.

Ice and existing sourcecode

Hi,

first I describe my project and I would be pleased if someone give me a hint, how a solution could look like.
We have an distributed numerical application which runs on multiple nodes in parallel. At the moment a solution exists, which uses mpich.
Because of the inflexibility of mpi, some of the interaction between master node and computing nodes should be done with ICE. The master node holds the information about a global node grid called MasterNodeGrid which consists of Nodes. Now it should be possible that the computing nodes are able to receive a reference of an Node object through ICE. This should be possible without modifying the sourcecode from the MasterNodeGrid and the Node classes.
Is there a possibility to receive a remote instance of an Node object, which has the same type as an local Node object or could be used in the same way?

Greetings
Arne

Comments

  • Hi Arnie,
    Arnie wrote:
    Is there a possibility to receive a remote instance of an Node object, which has the same type as an local Node object or could be used in the same way?

    There are a number of ways to substitute a remote proxy for a legacy local class :-
    1. if Node is used polymorphically in local code (ie, your functions are virtual and objects are used via pointers), then subclass a RemoteNode that invokes via a NodePrx proxy.
    2. if Node is not used polymorphically and you have access to the Node source, make this class a pure interface and created a polymorphic NodeImpl member which you can then subclass for remote operations...
    3. if all Node calls are going to be remote in your client, you could simply rewrite Node using identical function signatures against a NodePrx.

    Of course, if you don't mind updating your client code, you could just introduce a NodeWrapper facade for both local (Node) and remote (NodePrx) implementations, but you sound like you want to avoid that...

    HTH