Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 01-31-2007
burghboy burghboy is offline
Registered User
 
Name: Tom Schoeneweis
Organization: Black Eye Development
Project: various
 
Join Date: Jan 2007
Posts: 5
Slow callback sample

Hi. I am trying to learn ICE and am a novice to distributed computing. I am using vc#. When I run the Ice/Callback demo it runs great, but when I put the server executable (and all required files) on my web server and configure the config.client to look at the server, the callbacks are taking about 15 seconds. It does this whether I use the server name or its IP address. the server is Windows 2000 Server running IIS 5.0 w/all current updates. My development machine is WindowsXP SP2 w/all current updates The code is the sample code with just the config.client changed. I'm guessing that it must have something to do with a setting of mine on the server, but I'm not sure where to look. Any help would be most appreciated.

Tom
Reply With Quote
  #2 (permalink)  
Old 01-31-2007
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
Is it each callback that takes 15 seconds, or only the first? A typical cause of this problem is your client publishing unreachable endpoints on the callback proxy. To help fix this I would advise turning on network tracing in your server and client. You can do that by setting the Ice.Trace.Network property.
Reply With Quote
  #3 (permalink)  
Old 02-01-2007
burghboy burghboy is offline
Registered User
 
Name: Tom Schoeneweis
Organization: Black Eye Development
Project: various
 
Join Date: Jan 2007
Posts: 5
Thanks for the quick response, Matthew. It actually is 15 seconds give or take on every callback, but the initial connection is quick and I know that there is communication in both directions before menu() is called. I disabled my dev machines windows firewall and everything went through like greased lightning. I specified client endpoints in the config.client, but the initialization of the callback goes on another port, then the client uses the port that I specified. It's still just as slow woth the firewall enabled. However - the bidirectional demo remains fast when I move the server onto the web. I'll study that on. But is there a way to specify the port for the initial communication in the callback demo? If so, would it make a difference if I set an exception in the firewall for that port?

I appreciate your help. Like I said before - I have no real experience with distributed apps, but I can sure see the benefit here. Thanks a bunch

Tom
Reply With Quote
  #4 (permalink)  
Old 02-01-2007
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
What is highly likely is that you are publishing unreachable addresses. When a call is then made it takes time for the connection to timeout on the unreachable address before trying the reachable address.

What exactly did you change in the client & server configuration?
Reply With Quote
  #5 (permalink)  
Old 02-01-2007
burghboy burghboy is offline
Registered User
 
Name: Tom Schoeneweis
Organization: Black Eye Development
Project: various
 
Join Date: Jan 2007
Posts: 5
In the config.server I didn't change anything. As far as endpoint assignment it says

Callback.Server.Endpoints=tcp -p 10000:udp -p 10000:ssl -p 10001

The config.Client endpoint assignment originally looked like this

Callback.Client.CallbackServer=callback:tcp -p 10000:udp -p 10000:ssl -p 10001
Callback.Client.Endpoints=tcp:udp:ssl

And I changed it to this

Callback.Client.CallbackServer=callback:tcp -h <my server ip> -p 10000:udp -h <my server ip> -p 10000:ssl -h <my server ip> -p 10001
Callback.Client.Endpoints=tcp -p 12000:udp:ssl

Since I was only running over TCP in the test I didn't think it necessary to set the UDP or SSL endpoints. I also turned on the network tracing to level 3 in both the client and server. The initial contact to the server would be on a random port, maybe 3504, which I assumed was assigned by Windows and I saw immediate response on the server. I know that's the easy part. Everything would then be still for 13 to 15 seconds but no trace messages of a timeout (should there be anything visible in the trace?) and the server would send the callback over a random port out and I'd see the response in the client first on the port that I assigned and then to the port from which the communication was initiated.

Thanks again for your help

Tom
Reply With Quote
  #6 (permalink)  
Old 02-01-2007
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
A port by itself means nothing. You also need to take into account the the IP address. Most likely you need to change

Callback.Client.Endpoints=tcp -p 12000:udp:ssl

to:

Callback.Client.Endpoints=tcp -h <client-ip> -p 12000

The default behaviour is to publish all possible network interfaces in the proxy which means that if some of them are inaccessible then the call on this proxy will take some time as previously described.
Reply With Quote
  #7 (permalink)  
Old 02-02-2007
burghboy burghboy is offline
Registered User
 
Name: Tom Schoeneweis
Organization: Black Eye Development
Project: various
 
Join Date: Jan 2007
Posts: 5
Thanks, Matthew. That sped things up tremendously. It got the round trips to 43-4 seconds. I really appreciate you assistance
Reply With Quote
  #8 (permalink)  
Old 02-02-2007
burghboy burghboy is offline
Registered User
 
Name: Tom Schoeneweis
Organization: Black Eye Development
Project: various
 
Join Date: Jan 2007
Posts: 5
That's 3-4 not 43
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
Slow in Freeze Evictor add operation Yunqiao Yin Help Center 2 02-06-2007 08:38 PM
Why concurrent access to FreezeMap is so slow? kingbo Help Center 4 05-27-2006 01:06 AM
why Icegrid very slow? ChenQingQing Help Center 10 05-26-2006 06:04 AM
Callback on legacy client without callback support causes deadlock? timeguest Help Center 1 07-30-2005 08:12 AM
Callback sample problem zhangzq71 Help Center 3 05-08-2005 10:04 AM


All times are GMT -4. The time now is 02:02 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.