Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I speed up my server?

Status
Not open for further replies.

martindavey

Programmer
Jan 2, 2000
122
0
0
GB
I have a Java client on a PC and a C++ server on a unix machine. The client calls the method with a structure, the values in the structure are modified and returned.

When I call the method once it takes appx. 1400ms
This is pretty slow compared with my XML-RPC version of the same test (it takes appx. 60ms)

The CORBA version does very well if I loop the test. If I call it 10 times it still takes appx. 1400ms, whereas the XML-RPC version gets slower, and slower.

However, I am only going to call it once in reality so would like to know if there's a way to speed it up?


My client call:
mySecuData = testImpl.test(userName, passWord, firstName, lastName, loginsLeft, lockedOut, comments);


My server:
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::pOA_var rootPOA = PortableServer::pOA::_narrow(obj);

CORBA::policyList policyList;
policyList.length(1);
policyList[(CORBA::ULong)0] = rootPOA->create_lifespan_policy(PortableServer::pERSISTENT);
PortableServer::pOAManager_var poaManager = rootPOA->the_POAManager();

PortableServer::pOA_var testPOA = rootPOA->create_POA("test_poa", poaManager, policyList);
test_Impl testManagerServant("testinterfaceServant");

PortableServer::ObjectId_var managerId =
PortableServer::string_to_ObjectId("testinterface");

testPOA->activate_object_with_id(managerId, &testManagerServant);

poaManager->activate();

CORBA::Object_var testRef = testPOA->servant_to_reference(&testManagerServant);
cout << testRef << " is ready" << endl;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top