View Single Post
  #1 (permalink)  
Old 11-22-2005
rc_hz rc_hz is offline
Registered User
 
Name: Eric RC
Organization: www.genband.com
Project: No project yet
 
Join Date: Jul 2004
Location: Hangzhou, China
Posts: 189
Send a message via MSN to rc_hz
-->
A question about IceGrid

For example:
Code:
$more app.xml
<icegrid>
	<application name="Ripper">
		<replica-group id="EncoderAdapters">
			<object identity="EncoderFactory"
				type="::Ripper::MP3EncoderFactory"/>
		</replica-group>

		<server-template id="EncoderServerTemplate">
			<parameter name="index"/>
			<parameter name="exepath"
				default="/opt/ripper/bin/server"/>
			<server id="EncoderServer${index}"
				exe="${exepath}"
<!--				activation="on-demand">			-->
				<adapter name="EncoderAdapter"
					replica-group="EncoderAdapters"
					register-process="true"
					endpoints="tcp"/>
			</server>
		</server-template>

		<node name="Node1">
			<server-instance template="EncoderServerTemplate"
				index="1"/>
		</node>
		
		<node name="Node2">
			<server-instance template="EncoderServerTemplate"
				index="2"/>
		</node>
	
	</application>
</icegrid>
$ icegridadmin --Ice.Config=config
>>> application add "app.xml"
>>> application list
Ripper
>>> server start EncoderServer1


And suppose icegridregistry and icegridnode(node1/node2) have started as expected.

This is the client code:
Ice::ObjectPrx obj = communicator->stringToObject("EncoderFactory");

MyQuestion:
1)
At this time, only EncoderServer1 has started while EncoderServer2 has not. When the ice run time in the client sends the identifier "EncoderFactory" to the Locator(IceGrid), how many endpoints/proxies are returned to the client? One or two ?

2)
if we turn on the <activation="on-demand"> feature in app.xml, how many endpoints/proxies are returned to the client ?
__________________
Eric RC
www.genband.com (telecommunication)
I like ICE (Ice for C++/Java/Python)
Reply With Quote