Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #16 (permalink)  
Old 04-09-2008
leo leo is offline
Registered User
 
Name: leo wang
Organization: SuperMap.inc
Project: DGIS
 
Join Date: Mar 2008
Posts: 23
"Client <- C1 -> Router/Glacier2 -- C2 -> Server(s)
<- C3 --"


my doubt just in client (one machine);

I create adapter with router and add several object in the adapter,then another executable program which also run in the client can not touch the objects because of I can not know the adapter's ports-settings

Accessing a proxy through character string "object:default -p ????"

Last edited by leo : 04-09-2008 at 12:26 AM.
Reply With Quote
  #17 (permalink)  
Old 04-09-2008
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
Do you want the calls to go through the router? I would assume not, they should go directly to the client. Assuming that is the case then you should create an non-routed object adapter in the client, and publish the same objects through that OA. Then the second client that resides on the same machine would use the non-routed OA for direct communications to the client.
Reply With Quote
  #18 (permalink)  
Old 04-27-2008
leo leo is offline
Registered User
 
Name: leo wang
Organization: SuperMap.inc
Project: DGIS
 
Join Date: Mar 2008
Posts: 23
thanks for reply!

then i use communicator()->stringtoproxy("object:tcp -p 10000"),does it resolve the the string like that "object:tcp -h 127.0.0.1 -p 10000"?

if yes,

My system's framework is that :

client2 -> client1 -> router/glaciser ->server
↓ *************↑
-------------------

A server object proxy just leave in client1's care (the proxy is stored in an Ice object that reside in client1's OA);client2 will get the proxy for a while and communicate directly with server object;

my question is "how to use client2's communicator that with Glaciser2/router to get the proxy?"

Last edited by leo : 04-27-2008 at 01:12 PM.
Reply With Quote
  #19 (permalink)  
Old 04-27-2008
xdm's Avatar
xdm xdm is offline
ZeroC Staff
 
Name: José Gutíerrez de la Concha Martínez
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Sep 2003
Location: La Coruña, Spain
Posts: 299
Hi Leo

Not sure if i understand well your problem.

You have two client applications in the same machine and you want C2 be able to call C1, also C2 do not know C1 endpoints.

Is the above sentence right?

If both clients are intended to run always in the same machine, i think the simple solution can be that C1 write the endpoints it use to some file when start and C2 read this on startup.

If you want C1 and C2 to be able to run in different machines, you can use indirect proxies better. For example C1 can register a well know object with IceGrid on startup and C2 create a proxy from a well know id that would point to the correct object.

Without much details of what you are trying to archive is difficult to give you better advice.


Hope this help
Reply With Quote
  #20 (permalink)  
Old 04-27-2008
leo leo is offline
Registered User
 
Name: leo wang
Organization: SuperMap.inc
Project: DGIS
 
Join Date: Mar 2008
Posts: 23
thank you for your help!

give me try;

Another problem is that:

communicator that with router will resolve "-h 127.0.0.1" like Glaciser2 server IP,not localhost;

So ,I can't request Localhost IO's proxy by communicator->StringToProxy("ObjectID:default -p portNo") function !

Last edited by leo : 04-27-2008 at 02:17 PM.
Reply With Quote
  #21 (permalink)  
Old 04-27-2008
leo leo is offline
Registered User
 
Name: leo wang
Organization: SuperMap.inc
Project: DGIS
 
Join Date: Mar 2008
Posts: 23
sorry ,I take a mistake above!

communicator->StringToProxy("ObjectID:default -p portNo") function can find out localhost IO;

but it cause another problem:
the communicator with router how to request a IO's proxy ?

How to find out localhost's and server's IO just by only a function that communicator->StringToProxy("ObjectID:default -p portNo") ?
Reply With Quote
  #22 (permalink)  
Old 04-28-2008
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
I'm sorry, but your description is not very clear. However, if I understand you correctly the issue is that you want client1 to talk directly with client2

I imagine that the problem you've run into is that then client1 tries to talk with client2, the request is routed through glacier2 (assuming that you have set Ice.Default.Locator, as the manual directs you to do).

The solution here is to clear the router on the proxy by calling ice_router. Something like:

Code:
ObjectPrx obj = ...; // some proxy that refers to client2.
obj = obj->ice_router(0); // Clear the router.
All calls on obj at this point are non-routed, and will NOT go through Glacier2.
Reply With Quote
  #23 (permalink)  
Old 04-28-2008
leo leo is offline
Registered User
 
Name: leo wang
Organization: SuperMap.inc
Project: DGIS
 
Join Date: Mar 2008
Posts: 23
thanks for reply.

The problem has resolved!

I just want to know : how the ICE's core run?
The function of communicator()->StringToProxy("ObjectID:default -p portNo") can get server IO,also successful to get client IO without IP setting.
why?(the server and the client have resided in different machine and the communicator have been set Ice.Default.Router)

To this question is because my application run slowly when I use router.
Reply With Quote
  #24 (permalink)  
Old 04-28-2008
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
I'm sorry, I'm not sure what you are talking about. You'll have to rephrase your question, or give a concrete example for us to help.
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
how to know which port the adapter is using? nyingchi Help Center 7 07-07-2008 04:29 PM
Adapter Factories zhi Help Center 4 01-22-2007 08:46 PM
How to tell (in C++) when an adapter is deactivated mefoster Help Center 8 10-06-2006 10:24 AM
one adapter or many shimrod Help Center 2 11-07-2005 07:56 AM
Adapter Reactivation Mr.Freeze Help Center 3 01-26-2004 09:34 AM


All times are GMT -4. The time now is 11:59 PM.


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