Archived

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

IceGrid configuration

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="::Demo::Caracteristique"/>
<object identity="affpoint" type="::Demo::Caracteristique"/>
<object identity="polynom" type="::Demo::Caracteristique"/>
<object identity="courbep" type="::Demo::Caracteristique"/>
<object identity="carre" type="::Demo::Caracteristique"/>
<object identity="moyenne" type="::Demo::Caracteristique"/>
<object identity="name" type="::Demo::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

Comments

  • benoit
    benoit Rennes, France
    Hi Matthieu,

    I'm afraid this won't work. Servers member of a same replica group must provide the same Ice objects. You will otherwise end up getting Ice::ObjectNotExistException exceptions if your client talks to the wrong server.

    You need to define multiple replica groups for the different objects instead.

    Cheers,
    Benoit.
  • Hello Benoit, thank you !

    But if I want to do one server with two objects (obj1 and obj2) and a second server with just the obj1. And I want to do replication between obj1 of both servers.
    I did two replica for each server, but icegrid said "duplicate object obj1". That's normal ! What can I do ??


    Cheers,
    Matthieu