What I have done in these 24weeksTask 1Writing test cases for migrating Axis2 fromApache XMLSchema1 to ApacheXMLSchema2
What is Apache XMLSchema?Apache XMLSchema is a lightweight Java object modelthat can be used to manipulate and generate XML schemarepresentations. You can use it to read XML Schema (xsd)files into memory and analyze or modify them, or to createentirely new schemas from scratch.Versions 1.4.x - The version which axis2 is using 2.0 - A major revision that takes advantage of the facilities of Java 1.5.
Considerations We cannot just migrate from 1.x to 2.0 because both have same namespaces and different APIs Many core modules of Axis2 uses XMLSchem1 libraries and there are no tests has written to cover those usages. So the starting point of this migration we had to write tests cases for XMLSchema usage in Axis2 and then do the migration.
Progress I wrote test cases to cover XMLSchema1 usages in axis2 for all the modules like kernel, codegen,etc. Now migration can be started directly.
Task2 - Writing integration testsfor WSO2 ESB. Added test coverage for − Iterate Mediator − Clone Mediator − Store Mediator − DB Lookup Mediator − Message Stores − Sevaral Patch automations Wrote test utilities for clarity framework to capture wire messages and generate SOAP messages of predifined sizes.
Task 3 - Performance improvements forAxis2s POJO web services• What is a POJO Web Service? myService.aar
Current service invocation method Load service implementation class through java reflection Service Check method and parameters needed through reflection Request RPC Client Client Message Invoke service method Response Receiver Serialize output In this method response time become considerably high due to reflection overhead
SolutionDeployment Time myService DeploymyService. Support Classes aar Axis2 Op1Wrapper Generate Op2Wrapper Op3Wrapper MyServiceReciever
Solution Ct. SayHelloWrapperRun Time SayHelloParser() SayHelloParser() Service Request: sayHello(); RPC Delegate SayHelloEcecutor() SayHelloEcecutor()ClientClient Message Receiver Response: Hello SayHelloSerializer() SayHelloSerializer()
Performance Comparison n (c=20) Current Method New Method (req/second) (req/second) 100 602.9 1492.69 1000 2345.09 2619.91 10000 5636.28 6669.06 50000 5842.15 6828.96 n (c=50) Current Method New Method (req/second) (req/second) 100 794.12 2,368.15 1000 3,183.93 4,590.14 10000 5,639.33 6,608.76 50000 5842.15 6828.96
Faced Challenges• We did not had a detailed architecture design but a high level design at the start. So architecture had to be evolve with the project.• We had to choose a byte code manipulation library to generate the code. So I had to play with different libraries as ASM, JavaAssist and choose one of them.• Generated code cannot be debugged. They are in bytecode and no source available. So finding a simple error takes a lot of time.• Java StaX was used to parse XML. So generating code for it is complex than generating for a high level library like Axiom
What I have learnt? Technologies• Java • XML • SOAP • JavaAssist • ASM • Jquery• TestNG • Reflection • Stax • ByteCode • XML Unit • Axiom Products • Axis2 • Syna • WSO2 • Clarity • WSO2 AS • WSO2 pse ESB Framework Carbon • Tomcat Tools • Eclipse • Idea • SOAP UI • Jmeter • JavaBench • TCP Mon • Maven • Ant • Subversion • Asmifire • Jetty • Jira • Find • Sonar Bugs
What I have learnt? Ct.• Experience of working on large brown field projects• Software testing methodologies• How to maintain good code quality• How a organization operates• Contributing to open source products• Soft Skills