axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfr <fryar...@gmail.com>
Subject Re: Increase performance using axis 2 client stubs
Date Fri, 09 Oct 2009 14:49:11 GMT

Again apologies in advance if I've misunderstood.....

You talked of a util that encapsulates three WS client stub calls (all calls
on the same HttpClient object). 
This util executes in a web container thread triggered by a request to your
portal app. You want to speed up the execution of the util.

My observation/suggestion is that, assuming the WS calls don't *need* to be
consecutive, you can speed things up by making all of the WS calls
simultaneously.

As it stands, it sounds to me like all of the action happens in the single
web container thread allocated to the request. The util executes in this
thread, the util makes calls to each of the stubs it holds, also in this
single thread.

It's with multiple threads (and stubs), not a pool of connections, that you
can make the stub calls simultaneous.  (although pooling the
stubs/connections should certainly help performance too)

To do this your util must create the extra threads it needs, or take them
from a threadpool, or whatever. In any case it needs to call each stub in a
separate thread, not just in the single thread allocated to the request.

Regards,

Michael



Håkon Sagehaug wrote:
> 
> Hi
> 
> Thanks for the replys,
> 
> I could tell little more about my setup perhaps. I've got on
> eConfigurationContext that is shared between the stubs, each service has
> one
> stub "connecte" to it. Thw web app is running inside tomcat, so the util
> class that is responsible for calling managing the stubs, is I guess on
> instance per thread, if on erequest to the web app equals one thread.
> Hence
> one stub per service per thread.
> 
> One way to go is a pool of stunbs I guess shared by the web application.
> 
> 
> cheers, Håkon
> 2009/10/9 mfr <fryars.m@gmail.com>
> 
>>
>> From memory (apologies in advance if this is off the mark), I think it's
>> the
>> axis2 client stub that will serialize multiple calls - i.e. will finish
>> one
>> request/response before beginning another. So if you want to parallelize
>> the
>> calls, what's needed is multiple client stubs, and multiple threads to
>> run
>> them in.
>>
>> [I used java.util.concurrent.ThreadPoolExecutor, one stub object per
>> thread,
>> to do some basic load testing of a service.]
>>
>> Regards,
>>
>> Michael
> 
> 

-- 
View this message in context: http://www.nabble.com/Increase-performance-using-axis-2-client-stubs-tp25819232p25822510.html
Sent from the Axis - User mailing list archive at Nabble.com.


Mime
View raw message