Home Help Center

icegrid allocating objects (session activation)

area51area51 Member Wout BettensOrganization: Key Technology (Visys) - BelgiumProject: Machine session management
Hi,

What would be the recommended way for allocating an arbitrary number of objects within an icegrid session?

Currently, I'm defining a hardcoded number of server instances in the icegrid xml like this:
<server-instance template="MyDaemon" index="0"/>
<server-instance template="MyDaemon" index="1"/>
<server-instance template="MyDaemon" index="2"/>
...

where the template is similar to this:
<server-template id="MyDaemon">
 <parameter name="index"/>
  <server id="Daemon-${index}" allocatable="true" activation="session" exe="./daemon" user="${session.id}">
  <adapter name="Daemon" endpoints="tcp -h 127.0.0.1" id="${server}.Daemon" register-process="true">
   <object identity="Daemon-${index}" type="Daemon" property="Identity"/>
   <allocatable identity="Daemon-${index}" type="Daemon" property="Identity"/>
  </adapter>
 </server>
</server-template>

Each client establishing a session, will allocate an object (session activation). Our application requires that the allocated object has the same lifetime as the client's session and these lifetimes can be very long (hours, even days).

There's however no telling how many clients will be active simultaneously. To avoid depletion we add a huge number of these icegrid xml server-instance lines. So I naturally wondered whether IceGrid is capable of instantiating an unspecified number of server-instances without any hardcoded maximum limitation?

Alternatively, does IceGrid xml support something along the lines:

<server-instance template="MyDaemon" maximum="100"/>

That would at least increase the maintainability of our setup.

Thank you in advance,
Wout

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    This is not currently possible, you have to declare all the instances you will need. This is something we considered adding but this is still on our TODO list. If you have a commercial need for this, I suggest to discuss it by sending us an email at [email protected].

    Cheers,
    Benoit.
Sign In or Register to comment.