Hi:
I did a test by Ice-3.1.0 .
The IceGrid registry and node1 are running on the host PC1, while IceGrid node2 is running on the host PC2 . In this application, one server has been assigned to each node.
-----------------------------------------------
<icegrid>
<application name="Conf">
<server-template id="SimpleServer">
<parameter name="index"/>
<server id="SimpleServer-${index}" exe="./conf.exe" activation="on-demand">
<adapter name="Conf" endpoints="tcp" register-process="true">
<object identity="conf-${index}" type=":emo::Conf"/>
</adapter>
<property name="Identity" value="conf-${index}"/>
</server>
</server-template>
<node name="node1">
<server-instance template="SimpleServer" index="1"/>
</node>
<node name="node2">
<server-instance template="SimpleServer" index="2"/>
</node>
</application>
</icegrid>
-----------------------------------------------------
If PC2 is closed, the registry still distribute node2 to the client.
The client throw the exception:
-------------------
client: E:\Item\ICE\Ice-3.1.0\src\ice\Reference.cpp:1109: Ice::NoEndpointException:
no suitable endpoint available for proxy `conf-2 -t @ SimpleServer-2.Conf'
-------------------
If I use the following application:
----------------------------------------------
<icegrid>
<application name="Conf">
<replica-group id="ReplicatedConfAdapter">
<load-balancing type="round-robin" />
<object identity="conf" type=":emo::Conf"/>
</replica-group>
<server-template id="SimpleServer">
<parameter name="index"/>
<server id="SimpleServer-${index}" exe="./conf" activation="on-demand">
<adapter name="Conf" endpoints="tcp" register-process="true" replica-group="ReplicatedConfAdapter"/>
<property name="Identity" value="conf"/>
</server>
</server-template>
<node name="node1">
<server-instance template="SimpleServer" index="1"/>
<node name="node2">
<server-instance template="SimpleServer" index="2"/>
</node>
</application>
-------------------------------------------------
If PC2 is closed,the registry can't distribute any node to the client.
The client throw the exception:
--------------------------------------------------
client: E:\Item\ICE\Ice-3.1.0\src\ice\Reference.cpp:1109: Ice::NoEndpointException:
no suitable endpoint available for proxy `conf -t'
-----------------------------------------------
I want to know how the registry know the nodes'states and how to make the registry not to distribute fault nodes to the client.
Russule.

emo::Conf"/>
Reply With Quote