axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <HAWKI...@uk.ibm.com>
Subject Re: Analysis of Axis C++ client transport
Date Fri, 24 Sep 2004 09:17:23 GMT




If someone can tell me how to get a build onto the ftp server  I can put
one up there.

fyi: Soon (late next wk?) we will be putting daily builds up.


John Hawkins




                                                                           
             Aleksander                                                    
             Slominski                                                     
             <aslom@cs.indiana                                          To 
             .edu>                     Apache AXIS C Developers List       
                                       <axis-c-dev@ws.apache.org>          
             23/09/2004 18:44                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: Analysis of Axis C++ client     
              "Apache AXIS C           transport                           
             Developers List"                                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Sanjiva Weerawarana wrote:

>Once we get this tested and working on windoze, I'd be for making
>this the default transport! Great job Samisa ...
>
>Alek, any chance you can re-run your perf benchmark on Linux with
>the new transport code?
>
>
tests should be easy to rerun if you have current AXIS-C++ compiled (i
do not have current  version compiled, i do not have a machine to run
tests, and i am a bit scared to spend another few _days_ trying to
follow complicated/outdated/incomplete build/run instructions) then
running tests is very easy.

C++ test service source code is available at:

http://www.extreme.indiana.edu/xgws/soap_bench/axis_cpp/samples_server/soapbench/


services implement set of simple methods described in WSDL

http://www.extreme.indiana.edu/xgws/soap_bench/#bench

those methods are called by test driver is in Java:

http://www.extreme.indiana.edu/xgws/soap_bench/#driver


send me questions if you can not get Java driver to work.

i would be happy to see that my tests helped to improve AXIS C++
perfromance :)

thanks,

alek

>Sanjiva.
>
>----- Original Message -----
>From: "Samisa Abeysinghe" <samisa_abeysinghe@yahoo.com>
>To: "Apache AXIS C Developers List" <axis-c-dev@ws.apache.org>
>Sent: Thursday, September 23, 2004 3:52 PM
>Subject: Re: Analysis of Axis C++ client transport
>
>
>
>
>>Hi,
>>   The new transport lib (and LibWWW based transport) is about 150 times
>>
>>
>faster than the original
>
>
>>transport.
>>   Thus Axis C++ should be at least as fast as gSOAP or XSOAP4 according
>>
>>
>to the statement "However
>
>
>>it seems that AXIS-C++ HTTP transport is very inefficient as even for
ping
>>
>>
>(echoVoid) method that
>
>
>>has empty body it was 4x slower than gSOAP or XSOAP4" in the benchmark
>>
>>
>report.
>
>
>>   I would love to run this benchmark and evaluate Axis 1.3 against
others
>>
>>
>when I get some time.
>
>
>>Samisa...
>>
>>--- Aleksander Slominski <aslom@cs.indiana.edu> wrote:
>>
>>
>>
>>>Samisa Abeysinghe wrote:
>>>
>>>
>>>
>>>>Hi All,
>>>>   Since I was under the impression that the current Axis transport
>>>>
>>>>
>lib implementation is much
>
>
>>>>slower than LibWWW based implementation I did some measurers on the
>>>>
>>>>
>speed with echo string
>
>
>>>method
>>>
>>>
>>>>of base sample.
>>>>  The original Axis transport lib was much slower and hence I
>>>>
>>>>
>implemented a new socket based
>
>
>>>Axis
>>>
>>>
>>>>transport lib with the logic similar to current Axis transport. The
>>>>
>>>>
>results are interesting.
>
>
>>>The
>>>
>>>
>>>>original Axis transport implementation is too slow, and not only that,
>>>>
>>>>
>it cannot send messages
>
>
>>>>lager than 48800 (strage number), if I try to the client segfaults. The
>>>>
>>>>
>new transport lib as
>
>
>>>well
>>>
>>>
>>>>as the LibWWW based transport can send much larger messages (I tested
>>>>
>>>>
>upto 2621440 characters)
>
>
>>>>
>>>>
>>>hi,
>>>
>>>that would explain why AXIS C++ could not get pas some sizes when i was
>>>running those tests:
>>>(...)*Medium size array*s: AXIS-C++ was not able to finish this test and
>>>is not shown.(...)
>>>http://www.extreme.indiana.edu/xgws/soap_bench/linux_xeon_sc/
>>>
>>>hopefullly that can be soon fixed.
>>>
>>>alek
>>>
>>>
>>>
>>>>  The other interesting thing is that the new trasport that I
>>>>
>>>>
>implemented are faster than
>
>
>>>LibWWW
>>>
>>>
>>>>based implementation.
>>>>   Please have a look at the attached HTML file for results.
>>>>
>>>>   At the moment, the Call class creates a new transport object for
>>>>
>>>>
>each and every invcation.
>
>
>>>I
>>>
>>>
>>>>made the code to reuse the same transport and the code became still
>>>>
>>>>
>faster.
>
>
>>>>   However, testing for thread safety, both LibWWW and the new
>>>>
>>>>
>transport failed, only the old
>
>
>>>>trasport work with threads. I am doubtful of this, because in the new
>>>>
>>>>
>transport I have very
>
>
>>>>similar logic to that of the old (but not the same) I doubt the old
>>>>
>>>>
>transport pretends to be
>
>
>>>>thread safe as it is too slow. We have to remove the globle variables
>>>>
>>>>
>from the code and see if
>
>
>>>>this thread safety problems would persist. We must look into thread
>>>>
>>>>
>safety as an immediate high
>
>
>>>>priority issue.
>>>>
>>>>   As the code is frozen at the moment for 1.3 I did not commit the
>>>>
>>>>
>new trasport. It works for
>
>
>>>>chunks as well, however it would have to be tested more to be used in
>>>>
>>>>
>production envioronments.
>
>
>>>>Hence, even if I put it in cvs, I would like it to be seperate from the
>>>>
>>>>
>original Axis transport
>
>
>>>>lib. I have removed all cyclic couplings in this new code and hence it
>>>>
>>>>
>would be easier to
>
>
>>>>maintain.
>>>>
>>>>   I have given below the client code that I used for this testing
>>>>
>>>>
>(with base.wsdl generated
>
>
>>>>code)
>>>>
>>>>Thanks,
>>>>Samisa...
>>>>
>>>>#include <string>
>>>>#include <iostream>
>>>>#include <time.h>
>>>>#include <stdio.h>
>>>>#include <sys/types.h>
>>>>#include <sys/timeb.h>
>>>>
>>>>#ifdef WIN32
>>>>#else
>>>>#include <sys/times.h>
>>>>#include <unistd.h>
>>>>#endif
>>>>
>>>>
>>>>#include <axis/AxisGenException.h>
>>>>#include "./gen_src/InteropTestPortType.h"
>>>>
>>>>using namespace std;
>>>>
>>>>#define STRING_TO_SEND "HelloWorld"
>>>>
>>>>static void
>>>>usage (char *programName, char *defaultURL)
>>>>{
>>>>   cout << "\nUsage:\n"
>>>><< programName << " [-? | service_url] " << endl
>>>><< "    -?             Show this help.\n"
>>>><< "    service_url    URL of the service.\n"
>>>><< "    Default service URL is assumed to be " << defaultURL
>>>><<
>>>>"\n    Could use http://localhost:8080/axis/services/echo to test with
>>>>
>>>>
>Axis Java."
>
>
>>>><< endl;
>>>>}
>>>>
>>>>
>>>>int
>>>>main (int argc, char *argv[])
>>>>{
>>>>   int length = 10;
>>>>   char endpoint[256];
>>>>
>>>>   // Set default service URL
>>>>   sprintf (endpoint, "http://localhost/axis/base");
>>>>   // Could use http://localhost:8080/axis/services/echo to test with
>>>>
>>>>
>Axis Java
>
>
>>>>   try
>>>>   {
>>>>
>>>>if (argc > 1)
>>>>{
>>>>    // Watch for special case help request
>>>>    if (!strncmp (argv[1], "-", 1)) // Check for - only so that it
>>>>
>>>>
>works for
>
>
>>>>                                           //-?, -h
>>>>
>>>>
>or --help; -anything
>
>
>>>>    {
>>>>usage (argv[0], endpoint);
>>>>return 2;
>>>>    }
>>>>    length = atoi(argv[1]);
>>>>}
>>>>
>>>>       if (argc > 2)
>>>>           sprintf (endpoint, argv[2]);
>>>>
>>>>cout << endl << " Using service at " << endpoint <<
endl << endl;
>>>>
>>>>InteropTestPortType ws (endpoint);
>>>>
>>>>       ws.setTransportTimeout(2);
>>>>
>>>>       // Prepare the string to be sent
>>>>       char* buffer = new char[ length * strlen(STRING_TO_SEND) + 1];
>>>>       buffer[0] = '\0';
>>>>       for (int i = 0; i < length; i++ )
>>>>           strcat(buffer, STRING_TO_SEND);
>>>>
>>>>// Time mesurement stuff
>>>>time_t startTime;
>>>>       time_t endTime;
>>>>
>>>>time( &startTime );
>>>>
>>>>       char* echoStringResult = ws.echoString(buffer);
>>>>
>>>>time( &endTime );
>>>>       printf( "Time spent to invoke method ws.echoString(buffer); =
>>>>
>>>>
>%lf s\n", difftime(
>
>
>>>endTime,
>>>
>>>
>>>>startTime ) );
>>>>
>>>>if (0 == strcmp(echoStringResult, buffer))
>>>>    printf ("successful\n");
>>>>else
>>>>    printf ("failed\n");
>>>>
>>>>       // Clean memory
>>>>       if (echoStringResult)
>>>>           free(echoStringResult);
>>>>
>>>>       delete [] buffer;
>>>>
>>>>   }
>>>>   catch (AxisException & e)
>>>>   {
>>>>printf ("Exception : %s\n", e.what ());
>>>>   }
>>>>   catch (exception & e)
>>>>   {
>>>>printf ("Unknown exception has occured\n");
>>>>   }
>>>>   catch (...)
>>>>   {
>>>>printf ("Unknown exception has occured\n");
>>>>   }
>>>>
>>>>   // System vs User time stuff
>>>>#ifdef WIN32
>>>>#else // Linux/Unix
>>>>   tms timesSpent;
>>>>   times(&timesSpent);
>>>>
>>>>   printf( "User time               = %ld clock ticks\n",
>>>>
>>>>
>timesSpent.tms_utime );
>
>
>>>>   printf( "System time             = %ld clock ticks\n",
>>>>
>>>>
>timesSpent.tms_stime);
>
>
>>>>   printf( "User time of children   = %ld clock ticks\n",
>>>>
>>>>
>timesSpent.tms_cutime);
>
>
>>>>   printf( "System time of children = %ld clock ticks\n",
>>>>
>>>>
>timesSpent.tms_cstime);
>
>
>>>>   printf( "Processor time used     = %ld clock ticks\n", clock());
>>>>   printf( "Number of clock ticks per second = %ld clock ticks/s\n",
>>>>
>>>>
>sysconf(_SC_CLK_TCK) );
>
>
>>>>#endif
>>>>
>>>>   return 0;
>>>>}
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>_______________________________
>>>>Do you Yahoo!?
>>>>Declare Yourself - Register online to vote today!
>>>>http://vote.yahoo.com
>>>>
>>>>
>>>>
>>>>
>>------------------------------------------------------------------------
>>
>>
>>>>Message Size (characters) Original Axis Transport New Axis
>>>>Transport LibWWW
>>>>
>>>>
>>=== message truncated ===
>>
>>
>>
>>
>>_______________________________
>>Do you Yahoo!?
>>Declare Yourself - Register online to vote today!
>>http://vote.yahoo.com
>>
>>
>>
>
>
>


--
The best way to predict the future is to invent it - Alan Kay




Mime
View raw message