I using SOAP 3 years ago, for 2 applications, but with standalone server.
For many time I deny questions about performance, but when working at a client side and many requests, the problems is more evident. But I think the great problem is the tcp negotiate.
Some times ago I see some work around keep-alive methods on
SOAP::Lite code, but don't really understand the use.
Some benchmarks are need to identify the really problem, but I think the great problem at client site are a tcp connect...
After other some needs I'm used Connection Cache(
LWP::ConnCache) on
LWP::UserAgent, and waiting time for find/write other SOAP::Transport Client/Daemon
my use (some external clients are java ;) )
Sorry, but I only have more questions ;)
For some practical samples, see my check code for single benchmark on standalone server:
Server - host 1:
Used with perl -d:DProf server.pl
use SOAP::Transport::HTTP;
my $daemon = SOAP::Transport::HTTP::Daemon
-> new (LocalPort => 8080, Reuse => 1)
# register serializer
-> dispatch_to( qw(Server::Benchmark) )
;
print "Contact to SOAP server at ", $daemon->url, "\n";
$daemon->handle;
package Server::Benchmark;
sub ping {
print "-";
return time;
}
Client - host 2:
Used with perl -d:DProf client.pl
use SOAP::Lite;
my $soap = SOAP::Lite
-> uri('http://localhost/Server/Benchmark')
-> proxy('http://host_1_server:8080');
foreach ( 1 .. 1000 ) {
$soap->ping(1)->result;
}
* This code are quick made with SOAP::Lite Cookbook.
I'm conclude: The client side use many time, lot with network call, on a good network!
But, others Benchmarks with your real app are a good checks ;)
My results on execute...
Server side:
$ dprofpp -F
HTTP::Daemon::ClientConn::send_response has 1 unstacked calls in outer
SOAP::Transport::HTTP::Daemon::handle has 1 unstacked calls in outer
Faking 2 exit timestamp(s).
Total Elapsed Time = -5.19496 Seconds
User+System Time = 0 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
0.00 1.114 1.907 15984 0.0001 0.0001 SOAP::SOM::_traverse
0.00 0.550 0.550 26973 0.0000 0.0000 HTTP::Headers::_header
0.00 0.536 2.027 8991 0.0001 0.0002 SOAP::Serializer::encode_
+object
0.00 0.520 1.386 1997 0.0003 0.0007 HTTP::Daemon::ClientConn:
+:get_requ
est
0.00 0.425 0.560 75924 0.0000 0.0000 SOAP::Data::new
0.00 0.340 0.890 3996 0.0001 0.0002 SOAP::Deserializer::decod
+e_value
0.00 0.308 1.091 3996 0.0001 0.0003 SOAP::Deserializer::decod
+e_object
0.00 0.284 0.284 4007 0.0001 0.0001 utf8::SWASHNEW
0.00 0.254 0.254 3998 0.0001 0.0001 SOAP::Lite::soapversion
0.00 0.246 8.625 999 0.0002 0.0086 SOAP::Server::handle
... cut ...
Client side:
$ dprofpp -F
... warnings cutted ...
Total Elapsed Time = 39.24819 Seconds
User+System Time = 6.028192 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
14.5 0.874 1.246 19000 0.0000 0.0001 SOAP::SOM::_traverse
6.44 0.388 1.346 9000 0.0000 0.0001 SOAP::Serializer::encode_
+object
6.34 0.382 0.382 29001 0.0000 0.0000 HTTP::Headers::_header
4.64 0.280 0.894 4000 0.0001 0.0002 SOAP::Deserializer::decod
+e_object
4.28 0.258 0.258 1002 0.0003 0.0003 SOAP::Lite::soapversion
4.08 0.246 0.756 4000 0.0001 0.0002 SOAP::Deserializer::decod
+e_value
3.05 0.184 0.184 68000 0.0000 0.0000 SOAP::Data::new
2.75 0.166 1.921 1000 0.0002 0.0019 LWP::Protocol::http::requ
+est
2.26 0.136 0.886 13000 0.0000 0.0001 SOAP::SOM::_traverse_tree
1.99 0.120 0.272 15000 0.0000 0.0000 SOAP::Data::name
1.96 0.118 0.118 61008 0.0000 0.0000 SOAP::Serializer::new
1.96 0.118 0.224 59002 0.0000 0.0000 SOAP::Serializer::__ANON_
+_
1.92 0.116 0.116 2000 0.0001 0.0001 IO::Socket::INET::_sock_i
+nfo
1.92 0.116 2.893 1000 0.0001 0.0029 SOAP::Transport::HTTP::Cl
+ient::sen
d_receive
1.89 0.114 0.000 3002 0.0000 0.0000 utf8::SWASHNEW