Performance Comparison of Jboss Integration Platform Implementations
Total Page:16
File Type:pdf, Size:1020Kb
Masarykova univerzita Fakulta}w¡¢£¤¥¦§¨ informatiky !"#$%&'()+,-./012345<yA| Performance comparison of JBoss integration platform implementations Master Thesis Elena Medvedeva Brno, May 2014 Declaration Hereby I declare, that this paper is my original authorial work, which I have worked out by my own. All sources, references and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Elena Medvedeva Advisor: Mgr. Marek Gr´ac,Ph.D. ii Acknowledgement I would like to thank my technical supervisor from Red Hat, Ing. Pavel Mac´ıkfor sharing his vast experience in the field of performance testing, and for valuable pieces of advice given to me during the preparation of this work. I am grateful to my supervisor Mgr. Marek Gr´ac,Ph.D. for the comments and consultations. Besides, I want to thank all my colleagues who work with me in the JBoss Fuse QA team, for support, and the company Red Hat, which provided me the opportunity to write this thesis. iii Abstract We present the results of our investigation in the field of performance testing of JBoss integration platforms to compare performance of JBoss Fuse and SwitchYard. We design a basic set of performance scenarios to cover basic usage patterns of integration platforms. We formalize the scenarios that are already implemented for SwitchYard, and we develop three new sce- narios. All fifteen scenarios are implemented for JBoss Fuse using Per- fCake and tweaked to be optimal from the performance point of view. In addition performance test execution is automated in distributed en- vironment using Jenkins and SmartFrog. Finally, we collect the results of performance testing, and compare the performances of two JBoss integration platform implementations JBoss Fuse and SwitchYard. iv Keywords performance testing, integration platforms, system integration, JBoss Fuse, JBoss SwitchYard, PerfCake, SmartFrog, Apache ActiveMQ, Apache Camel, Apache CXF, web services, Camel routes v Contents 1 Introduction ........................... 4 2 Enterprise service bus (ESB) ................ 5 2.1 Evolution of Java Applications ............... 5 2.2 Service-Oriented Architecture concept ........... 6 2.3 Definition of Enterprise Service Bus (ESB) . 7 2.3.1 Integration framework . 7 2.3.2 ESB . 8 2.3.3 Integration Suite . 8 3 JBoss integration platforms ................. 9 3.1 JBoss Fuse .......................... 9 3.1.1 Apache Camel . 10 3.1.2 Apache ActiveMQ . 10 3.1.3 Apache CXF . 12 3.1.4 Apache Karaf . 14 3.1.5 Fuse Fabric . 15 3.2 SwitchYard ......................... 15 4 Performance testing ...................... 17 4.1 Types of performance testing ............... 18 4.1.1 Load testing . 18 4.1.2 Stress testing . 19 4.1.3 Soak or stability testing . 19 4.1.4 Configuration testing . 19 4.1.5 Smoke testing . 19 4.2 Performance metrics .................... 19 4.3 Performance standards ................... 21 4.4 Tasks to fulfill during performance testing . 21 4.5 Open source performance testing tools . 22 5 Testing environment and test automation . 24 5.1 Testing environment .................... 24 5.2 Test automation ....................... 25 5.2.1 Test automation tools . 25 6 Task formulation and test automation implementation 27 6.1 Implementation of test automation . 27 6.2 Environment characteristics . 30 7 Performance tests scenarios design and implementation 31 1 7.1 General architecture of tests . 31 7.2 Performance test scenarios design . 32 7.2.1 Scenario: HTTP exposed custom service . 34 7.2.2 Scenario: SOAP exposed custom service . 34 7.2.3 Scenario: JMS exposed custom service . 34 7.2.4 Scenario: HTTP exposed content based routing using XPath . 35 7.2.5 Scenario: HTTP exposed content based routing using RegEx . 36 7.2.6 Scenario: HTTP exposed content based routing using Rules . 36 7.2.7 Scenario: HTTP exposed Services implementing Scatter-Gather pattern . 37 7.2.8 Scenario: HTTP exposed Services implementing Splitter-Aggregator pattern . 38 7.2.9 Scenario: Service orchestration . 38 7.2.10 Scenario: SOAP exposed XML message transfor- mation using XSLT . 39 7.2.11 Scenario: SOAP implementation of a web service using JAX-WS . 39 7.2.12 Scenario: SOAP implementation of a web service using JAX-WS secured by WS-Security . 40 7.2.13 Scenario: SOAP web service proxy . 40 7.2.14 Scenario: Method GET of a RESTful web service implementation . 41 7.2.15 Scenario: Method POST of a RESTful web ser- vice implementation . 41 7.3 Implementation of performance scenarios for JBoss Fuse 41 7.3.1 HTTP exposed custom service . 42 7.3.2 SOAP exposed custom service . 43 7.3.3 JMS exposed custom service . 44 7.3.4 HTTP exposed content based routing using XPath 44 7.3.5 HTTP exposed content based routing using RegEx 45 7.3.6 HTTP exposed content based routing using Rules 46 7.3.7 HTTP exposed Services implementing Scatter- Gather pattern . 48 7.3.8 HTTP exposed Services implementing Splitter- Aggregator pattern . 49 2 7.3.9 Service orchestration . 50 7.3.10 SOAP exposed XML message transformation us- ing XSLT . 51 7.3.11 SOAP implementation of a web service using JAX- WS . 52 7.3.12 SOAP implementation of a web service using JAX- WS secured by WS-Security . 52 7.3.13 SOAP web service proxy . 53 7.3.14 Methods GET of a RESTful web service imple- mentation . 53 7.3.15 Methods POST of a RESTful web service imple- mentation . 54 8 Results .............................. 55 8.1 Concluding the results ................... 56 8.2 Effort allocation and issues encountered .......... 57 9 Conclusion ............................ 60 3 1 Introduction Nowadays, the market demands software applications to become more and more complex, to process data from various providers, presented in different formats. Integration platforms were introduced to help devel- opers create complex data interaction and processing in their applica- tions, using standardized approach. Integration platforms are used to integrate different applications and services. In this work we will consider two JBoss projects implementations of integration platforms: JBoss Fuse and SwitchYard. These projects provide similar functionality. So it is useful to find out which implementation works better from the performance perspec- tive, and under which circumstances. The goal of this work is to com- pare the performance of those two integration platform implementa- tions. The thesis consists of eight chapters. The Chapter 1 briefly intro- duces the topic of the thesis. The Chapter 2 provides an overview of the notions service oriented architecture and enterprise service bus. In the Chapter 3 the JBoss integration platforms JBoss Fuse and Switch- Yard are described in details, focusing on JBoss Fuse in particular. The technologies for working with JBoss Fuse are introduced such as Apache Camel, Apache ActiveMQ, Apache Karaf, Apache CXF. Methodology of performance testing is defined in the Chapter 4. The Chapter 5covers the theory underlying test automation and the design of test environ- ment. In the Chapter 6 we describe the process of test automation implementation for JBoss Fuse performance tests. We also define the environment characteristics where the tests were executed. The Chapter 7 focuses on formulation of test scenarios for performance comparison of the platforms. Besides, description of implementation of scenarios for JBoss Fuse is in this chapter. Chapter 8 contains the results of the performance measurements, the analysis of the results, and description of the allocation of the effort, while working on the master thesis. This chapter also describes the issues faced during the work. 4 2 Enterprise service bus (ESB) 2.1 Evolution of Java Applications According to the book [5] the first Web sites were build mainly from static content. Static content is delivered to the user exactly as stored, unlike dynamic content which is generated by web server at the time the user requests the page. But when an owner of the website wanted to modify the page, he had to modify the physical HTML file. Each operation required too much effort, and in order to solve this issue, tools and frameworks for dynamic Web content generation appeared. In 1997 servlet specification was released by Sun Microsystems. A servlet is a Java program that runs within a Web server. Servlets receive requests and respond to requests from Web clients, usually across the HyperText Transfer Protocol (HTTP) 1. Servlets were used to generate dynamic content (pages). But soon developers understood that it was not comfortable to put presentation details into java code. Due to this fact, in 1999 Sun released JavaServer Pages (JSP) specification. JSP technology enables to integrate Java code into HTML tags to generate pages dynamically. JSP technology makes available all the dynamic capabilities of Java Servlet technology but provides a more natural approach to creating static content[10]. But it was too complicated to put all business logic into JSP. As a result of all above, the design pattern Model-View-Controller (MVC) was created. In the variation of MVC JSP were used for presen- tation(View), servlets represented business logic (Controller). As there was separation in layers, the applications became more maintainable and flexible. Apart from that, Enterprise JavaBeans (EJB) were introduced to deal with persistence, transaction integrity, and security in a standard way [10]. As Java gave developers a lot of flexibility while creating ap- plication, design patterns where introduced to represent best practices in application development. 1. http://www.w3.org/Protocols/ 5 2. Enterprise service bus (ESB) 2.2 Service-Oriented Architecture concept As the time went by, and business application became more and more complex, new architectural concept for development of Java applica- tions emerged - Service-Oriented Architecture (SOA). In simple words SOA, and Web services facilitated the interoper- ability between frameworks or applications written in different lan- guages and running on different operating systems.