Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #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
  #2 (permalink)  
Old 11-22-2005
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,540
Quote:
Originally Posted by rc_hz
This is the client code:
Ice::ObjectPrx obj = communicator->stringToObject("EncoderFactory");
Note that this code transforms the stringified proxy into a proxy object, nothing more. For instance, this call won't cause the Ice runtime to contact the locator to get the indirect proxy endpoints. The Ice runtime will contact the locator to get the indirect proxy endpoints on the first remote call, for example if you ping the object:
Code:
Ice::ObjectPrx obj = communicator->stringToObject("EncoderFactory");
obj->ice_ping();
Quote:
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 ?
Since EncoderServer2 can't be started on demand, the locator will return only the endpoint(s) of EncoderServer1.

Quote:
2)
if we turn on the <activation="on-demand"> feature in app.xml, how many endpoints/proxies are returned to the client ?
It should activate EncoderServer2 and return the endpoints of EncoderServer1 and EncoderServer2.

Benoit.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
some question about icegrid jingl3 Help Center 1 01-29-2007 04:30 AM
IceGrid question nightsuns Help Center 2 09-01-2006 04:14 AM


All times are GMT -4. The time now is 10:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.