[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rampart-dev
Subject:    Re: Optimisations for Axis2 POJO web services
From:       Charith Wickramarachchi <charith.dhanushka () gmail ! com>
Date:       2012-11-29 15:49:16
Message-ID: CANsoHQquLv+NLjYwg7A5z1WMiN5S66gyAsnMVnOEX7ckmaiq2g () mail ! gmail ! com
[Download RAW message or body]

Hi Prabhath ,

This looks cool. It would be nice to see some performance comparison
between different message sizes.
I think this should give very high performance improvement compared to
POJO. In case of scenarios where it got messages with higher xml tree depth.

regards,
Charith



On Sun, Nov 25, 2012 at 5:07 AM, Prabhath Suminda
<pathiranappps@gmail.com>wrote:

> Hi,
>
> I did some optimizations for the Axis2 POJO web services as an intern
> project in last two months. It was a research type project and its idea was
> to handle POJO web services without  using Java Reflection to improve the
> response time.
> The method I followed to accomplish it was, when a POJO service is
> deployed, Axis2 generates a code which contains the logic to invoke that
> service. To generate this code Java reflection is used. In the run time
> service is invoked through the generated code for that service.
> The generated code is like the code is like the code generated by
> wsdl2java tool using ADB. So the idea was to achieve the performance of ADB
> services for POJO services by this. In wsdl2java tool code is generated as
> .java files. But in this case those had to be generated as .class files
> because those have to be invoked at runtime. To do this I used a Java
> bytecode library called JavaAssist.
> Currently this new michanisam support most of the Java types like,
> primitives, Strings, arrays, lists, maps, enums, Java beans and data
> handlers. But its not mature enough like the existing mechanism and
> therefor i integrated it with the existing mechanism instead of replacing
> it. To use this new method a parameter can be added to the service
> descriptor like below.
> <parameter name=optimizedPOJO> true </parameter>. If this is included
> service invocation will done using the new mechanism and other wise
> usual procedure will be followed.
> Following is a rough performance comparison for the new mechanism and the
> existing mechanism for a simple POJO service.
>
> n (c=20) Current (req/second)        Method          New Method
> (req/second)
> 100                                             602.9            1492.69
> 1000                                           2345.09         3619.91
> 10000                                         5636.28         7969.06
> 50000                                         5842.15         7828.96
>
> I like to contribute this code to the axis2 project and I think it is
> suitable to start a new branch for this and merge it to the trunk when it
> is mature enough. Also I like discuss about this new mechanism in detail in
> this thread if any clarification needed .
>
> Thank you,
> Prabhath
>



-- 
Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/

[Attachment #3 (text/html)]

Hi Prabhath , <div><br></div><div>This looks cool. It would be nice to see some \
performance comparison between different message sizes.</div><div>I think this should \
give very high performance improvement compared to POJO. In case of scenarios where \
it got messages with higher xml tree depth.</div> \
<div><br></div><div>regards,</div><div>Charith</div><div><br></div><div><br><br><div \
class="gmail_quote">On Sun, Nov 25, 2012 at 5:07 AM, Prabhath Suminda <span \
dir="ltr">&lt;<a href="mailto:pathiranappps@gmail.com" \
target="_blank">pathiranappps@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi,<br><br>I did some optimizations for the Axis2 POJO web \
services as an intern project in last two months. It was a research type project and \
its idea was to handle POJO web services without  using Java Reflection to improve \
the response time.<br>

The method I followed to accomplish it was, when a POJO service is deployed, Axis2 \
generates a code which contains the logic to invoke that service. To generate this \
code Java reflection is used. In the run time service is invoked through the \
generated code for that service.<br>

The generated code is like the code is like the code generated by wsdl2java tool \
using ADB. So the idea was to achieve the performance of ADB services for POJO \
services by this. In wsdl2java tool code is generated as .java files. But in this \
case those had to be generated as .class files because those have to be invoked at \
runtime. To do this I used a Java bytecode library called JavaAssist. <br>

Currently this new michanisam support most of the Java types like, primitives, \
Strings, arrays, lists, maps, enums, Java beans and data handlers. But its not mature \
enough like the existing mechanism and therefor i integrated it with the existing \
mechanism instead of replacing it. To use this new method a parameter can be added to \
the service descriptor like below. <br>

&lt;parameter name=optimizedPOJO&gt; true &lt;/parameter&gt;. If this is included \
service invocation will done using the new mechanism and other wise usual procedure \
will be followed.<br>Following is a rough performance comparison for the new \
mechanism and the existing mechanism for a simple POJO service.<br>

<br>n (c=20) Current (req/second)        Method          New Method \
(req/second)<br>100                                             602.9            \
1492.69<br>1000                                           2345.09         3619.91<br>

10000                                         5636.28         7969.06<br>50000        \
5842.15         7828.96<br><br>I like to contribute this code to the axis2 project \
and I think it is suitable to start a new branch for this and merge it to the trunk \
when it is mature enough. Also I like discuss about this new mechanism in detail in \
this thread if any clarification needed . <div>

<br></div><div>Thank you,</div><div>Prabhath</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Charith Dhanushka \
Wickramarachchi<br><a \
href="http://charithwiki.blogspot.com/">http://charithwiki.blogspot.com/</a><br><br> \
</div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic