|
|
|
|||||
|
/* this is the following code. It runs well but very slow. any suggestion?
*/ public Identity getDefaultObjectByServerId(String s){ try{ ServerInfo sInfo = getAdminPrx().getServerInfo(s); //getAdminPrx() return IceGrid.AdminPrx AdapterDescriptor adapter= (AdapterDescriptor)sInfo.descriptor.adapters.get(0 ); for (Object object : adapter.objects) { ObjectDescriptor obj = (ObjectDescriptor)object; if (obj.type.equals("management::Manageable")){ return obj.id; } } } catch(ServerNotExistException e){ log.error("cannot reach server " + s + " :" + e.toString()); } return null; } |
|
||||||
|
Hi,
Welcome to the forums! Before we look into your issue, could you please set your signature as described in this thread? Thanks! Benoit. |
|
|||||
|
we are doing a web based application. It seems to take 30 or even more seconds to initialize an Ice communication. I don't really know how to post "application descriptor " as which is an object I think. I may post some values which you think are important. Actually, we now have serveral applications named as "CN, CT, EC, ET, SMS, SPS and DUMMY". we use the following code to add new application in web page. Is it suitable?
// Basically we set all the attribute to empty except for name when creating node and application ApplicationDescriptor app = new ApplicationDescriptor(); app.name = name; app.variables = new TreeMap(); app.replicaGroups = new LinkedList(); app.serverTemplates = new TreeMap(); app.serviceTemplates = new TreeMap(); app.nodes = new TreeMap(); app.distrib = new DistributionDescriptor(); app.description = description; try{ adminPrx.addApplication(app); //adminPrx is IceGrid.AdminPrx } catch(Exception e){ throw new RuntimeException(e); }
__________________
QingQing Chen BeiJing Gaov Visual Tech Co., Ltd. Mysee.com Internal Administration Project |
|
||||||
|
Hi,
Ok, so you create the application descriptors programatically (you don't load them from an XML file). Is there many servers declared in each application? From the code you posted, it looks like the application descriptors are mostly empty, right? I'm afraid it's still impossible to say what could be wrong. Are you sure Ice/IceGrid is responsible for the slow response time? Could you add timing information to your code around the call to "ServerInfo sInfo = getAdminPrx().getServerInfo(s)" to see how long it takes? Please also provide the Ice version, the operating system and and kind of hardware you're using. If you could also provide a simple self compilable test case that demonstrate the problem, I'll be happy to look at it. Cheers, Benoit. |
|
||||||
|
Btw, this might also be some kind of network issue. You could try to turn network tracing on with the Ice.Trace.Network property (set to 2) to see if it can give you some clues.
Benoit. |
|
|||||
|
I did notice this behavior once and the machine on which the Servant was running had two IP addresses and one of them was not accessible from the Client so Ice Runtime had to timeout and then try the other end point to get the response.
HTH. Regards, --Venkat. Quote:
|
|
||||||
|
Did you find the solution to your problem?
The most likely reason is that Ice tries to contact the VMware virtual IP addresses and this takes some time if the VMware virtual machines are not running. If you run your client with Ice.Trace.Network=2, you should see if that's the case. You should configure IceGrid to only listen on a specific interface (it listens on all network interfaces by default), for example with the configuration properties below, IceGrid will only listen on the interface with the IP address 192.168.0.5. Code:
IceGrid.Registry.Client.Endpoints=default -p 12000 -h 192.168.0.5 IceGrid.Registry.Server.Endpoints=default -h 192.168.0.5 IceGrid.Registry.Internal.Endpoints=default -h 192.168.0.5 IceGrid.Registry.Admin.Endpoints=default -h 192.168.0.5 Cheers, Benoit. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |
| Slow callback sample | burghboy | Help Center | 7 | 02-02-2007 09:43 AM |
| Why concurrent access to FreezeMap is so slow? | kingbo | Help Center | 4 | 05-27-2006 01:06 AM |