Hello,
I would like to configure several servers with IceGrid. Each server offer various objects (affcarre, affpoint, polynom...). These object are defined in one replica-group (RadapterGen).
One server hasn't always all the objects (one server implements affcarre and addpoint, an other one implements only polynom, a third affcarre and polynom,...).
So I created a server-template, with the adapter "RadapterGen", than several server-instance...
Here the XML file:
<icegrid>
<application name="Simple">
<replica-group id="RadapterGen">
<load-balancing type="round-robin"/>
<object identity="affcarre" type=":emo::Caracteristique"/>
<object identity="affpoint" type=":emo::Caracteristique"/>
<object identity="polynom" type=":emo::Caracteristique"/>
<object identity="courbep" type=":emo::Caracteristique"/>
<object identity="carre" type=":emo::Caracteristique"/>
<object identity="moyenne" type=":emo::Caracteristique"/>
<object identity="name" type=":emo::Caracteristique"/>
</replica-group>
<server-template id="servTemplate">
<parameter name="index"/>
<parameter name="exepath" default="java"/>
<server id="servTemplate${index}" exe="${exepath}" activation="on-demand">
<property name="Ice.MessageSizeMax" value="1000000000"/>
<adapter name="AadapterGen" endpoints="tcp" register-process="true" replica-group="RadapterGen"/>
</server>
</server-template>
<node name="node1">
<server-instance template="servTemplate" index="1"/>
</node>
<node name="node2">
<server-instance template="servTemplate" index="2"/>
</node>
<node name="node3">
<server-instance template="servTemplate" index="3"/>
</node>
<node name="node5">
<server-instance template="servTemplate" index="4" exepath="./executables/Serv_Ex_2_Icar"/>
</node>
</application>
</icegrid>
It is correct like this ?? Is there a problem if most of the objects, defined in the replica, are not implements by the servers ?
I had first various replica-group for each object, and real "server" (not with template) binded to these replicas... but I tried now to reduce the length of the XML code. And especially to reduce the modifications that I would have to do if a new server appeared.
Will load-balancing and replication work with this configuration ?
Thank you !
Cheers,
Matthieu

emo::Caracteristique"/>
Reply With Quote