Recently, I have assigned a web service project to one of my developers. To provide a guideline to choose the stack, I need to look into the solution provided by Axis and XFire again. Previously, it is no brainer in favor of XFire because Axis 1 is using DOM based parser whereas XFire is using StAX. Now, Axis 2 has come out that uses StAX parser as well. After a series of benchmark comparison and arguments from both parties. I feel that picking either framework isn’t likely to matter much. And if it does matter, make sure you chose the proper databinding toolkit as that will have the biggest affect on your performance.
For XFire, it uses JAXB for databinding by default that you are replaced with JiBX. Why JiBX is faster? The reason is JAXB uses reflection to populate the bean whereas JiBX uses byte code generation. According to Dan, JiBX has significant performance improvements. JiBX can provide significant performance improvements over JAXB as it does not use reflection, but instead does byte code generation to optimize databinding - Dan
For Axis2, it creates its own databinding solution named ADB and it is comparable with JiBX. So, Axis2 really has caught up its competitors in term of performance. Whether I will switch to use Axis2. Probably not. Because I don’t see it worth the hassle to learn another databinding solution and WS framework that gives you practically the same thing that XFire already provided. By switching to a StAX based framework you’re likely to see something like a 3-5x speedup (or something like 30x if you switch from rpc/encoded to doc/literal as well). This can make a significant difference in your application’s responsiveness and load handling. As long as you are using StAX, you are good. Oh, before I forget. For anyone who is using XFire or attempt to use XFire, please look at Apache CXF. According to XFire, CXF is XFire 2.0. I am excited to see those new features from CXF:
- Spring 2.0 XML support
- RESTful service support
- JSON support
- And some of WS specs support as well
Here is what I found from XFire site: We encourage all users who are currently evaluating XFire to use CXF instead at this point. If you are already an XFire user, you may wish to consider migrating to CXF depending on where you are in your own release cycle. We will continue to support XFire in the future with bug fix releases, but feature development will be focused on CXF. * UPDATE * 12/6/2007: Apache CXF 2.0 currently doesn’t support JiBX. It is expecting to support it for CXF 2.1. Reference http://www.infoq.com/news/2007/02/axis2-xfire-benchmark






































(4.75 out of 5)
No Comment Received
Sorry the comment area are closed for non registered users