Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.
- Monika Kalotra
- Dr. Kuljit Kaur
Abstract: To improve the quality of software system, there is a need to eliminate or reduce the rework. Software reuse is one of the solution proposed for it. Software reuse involves reuse of existing software modules, also called reusable software components, while creating new software systems. In the context of software reuse, it is important to evaluate the performance of reusable software components as performance is a crucial factor in the selection of any third party or existing software components. This paper shows a comparative study on the performance analysis of four reusable software components-hibernate, spring, IBatis and EclipseLink. This paper presents the way to build a comparative analysis that shows the average execution time, average heap usage, and average CPU utilization of the reusable software components using java based VisualVM tool.
Keywords: Performance, Software Reusability, java framework, CBSD.
In 1968, to overcome the software crisis Mcllroy proposed the concept of software . To build large reliable software systems in a controlled and cost effective way, he pointed towards the effective use of reusable software components . The results of software reuse to improve the productivity of the programmer because with the reuse we can produce high quality software at a minimum cost and deliver it within a short span of time . Reused software is of better quality than new software because it has been already tried and tested in other systems. There are two approaches for reuse of code: develop the code with reuse or develop the code for reuse. In either case, there is a need of measuring the quality of the reusable piece of software . The reuse of program/software is a common technique which attempts to save time and cost by reducing duplicate work.
This paper presents a comparative study on the performance of four reusable software components – hibernate, spring, IBatis, EclipseLink. These are Object Relational Mapping based framework. They can be used in developing a Java application. These components map the java classes to relational tables in database with the help of SQL queries. Several SQL queries are executed on these components at the backend. In order to measure the execution time, CPU utilization of every executed SQL query, performance benchmarks are used. We make a comparison between these reusable components using java VisualVM tool.
II. RELATED WORK
To evaluate software reusability two approaches are used: qualitative and empirical . The qualitative methods require significantly manual efforts and depend on a subjective value. Empirical methods depend on the objective data that can be collected with the help of some simulation tool.
The performance metrics of component based systems, which are the challenging properties to predict and measure . They have performed three case studies on performance analysis of real-time systems using Deep Compass framework. For performance analysis, software toolkit called CARAT is used for model synthesis and simulation.
The performance of prediction methods based on models that support a development process from top to bottom, where developers create a new architecture and software components . These methods rarely integrating existing components in the software architecture models. While there are many tools for performance measurement and profiling existing software components cannot be directly tested the performance when integrated into a model.
A systematic approach proposed to software reuse are built to reuse and build by recycling . The problems in software engineering is not a lack of reuse, but a lack of systematic reuse. They know how to do, but they do it informally. The concept of reuse is used to reduce the cost, effort and execution time for software development. Re also raises the productivity, maintainability and reliability of the software, which has been evaluated before in other software. Reusable software components framework is proposed. Empirical observations was made by applying the framework to the recording system C. The result clearly shows that the proposed framework to reduce the work of software developers, who needed a bit of effort to build reuse or build by recycling.
The most complex components in the software development process is the database. The performance analysis of persistence framework explained in . The complexity increases when the perspective differs of the interacting components. The performance comparison of two persistence frameworks namely Hibernate and IBatis using a banking database. Both the framework maps JavaBeans to SQL statements using a XML descriptor. The online banking application case study is used. Performance is measured using a java program which uses basic SQL operations on the banking database and the Round Trip Time is calculated and used to measure the way these mapping tools perform under various situations. The performance of both of these tools in single and multi-user environments are evaluated. Hibernate performs better because it supports lazy fetching and mapping associations.
To develop the performance of software applications is a major problem in software applications. The solution is to avoid the assessment of late performance . A prediction approach to provide the best solution to solve the problem. Three types of approaches to performance prediction used to know the measurement approach, the approach based on a model and a mixed approach. The main goal is to improve the performance of the software. Steffen and Ralf reported five factors that impact the performance of software component is the implementation components, resource conflicts, use patterns, platform deployment and required services. Quantitative approaches related to the objectives of the performance engineering of software to evaluate the software, which by focusing on quality factors of performance such as response time and throughput. In the end result, the hybrid approach is the best approach.
III. RESEARCH METHODOLOGY
A. Data Collection
To analyze the performance of reusable software components, we have downloaded some jar files relevant to these reusable software components. A Java application can be started with a set of jar files. For implementing various libraries and plug-ins in java applications these jar files are used. The various jar files being used are mysql-connector-java, hibernate-core, hibernate-validator, jboss-logging-3.1.3.ga-sources, javassist, org.springframework, org.springframework.Expression, ibatis-dao, ibatis.jar, javassist, IBatis-common and eclipselink.
B. Performance Metrics:
VisualVM is a tool that provides interface for viewing detailed information about Java based applications . VisualVM organizes data about the JVM software and presents the information that enables the developer to quickly view data on multiple Java applications. Java VisualVM can be used by Java application developers to monitor and improve java applications performance.
There are four metrics used to analyze the performance of reusable software components.
a). CPU Utilization: Using this metric, you can see how much of CPU is being consumed by database activities. CPU utilization is used to track CPU performance when running a specific piece of code. It is measured in %.
b). Total Classes loaded: VisualVM counts the total number of classes loaded for any java application.
c). Heap used: It shows how much of the heap is currently used by a java application. It is measured in MB.
d). Threads: Athreadis a program’s path of execution. Two types of threads are used: live thread and daemon thread.
i. Live Thread also called used thread. User thread are threads created by programmer.
ii. Daemon Threads are called service provider threads and run parallel to your code. When Java Virtual Machine finds no user threads all daemon thread terminate immediately.
Some reusable Software Components are used to analyze the performance and make a comparison between them.
In 2001, Hibernate was developed by Gavin King. Hibernate is a tool for object-relational mapping. Object-relational mapping is a programming method for mapping Java objects to relational model where Java classes are mapped to tables  database. This is an open source persistent framework. There is a persistence framework powerful high performance and query service for Java application. Hibernate fills the gap and establish a connection between a Java application and a database. Hibernate uses the OO approach based on Java and binds known as POJO (plain old java objects) into a single object and table cards in a database java classes .
Spring is a free and open source framework that offers many features for developers. It was jointly developed by Rod Johnson and Juergen Hoeller in June 2003 is also a base ORM framework. Spring Framework aims to make application development enterprise Java easier to use and promote good programming by allowing a POJO-based programming model. Important features are the Inversion of Control, AOP and Spring MVC . Spring Framework allows us to manage the relationships between different parts of the project to loose coupling between modules.
This is an open source Java-based framework for ORM mapping data. In 2001, IBatis developed by Clinton Begin. IBATIS is a persistence framework that allows the mapping between SQL databases and Java objects. Mappings are separated from the application logic by wrapping SQL statements in XML configuration files. IBATIS is a lightweight frame. IBatis mapping parameters and results between class properties and the columns of the database table .
The EclipseLink provides object relational persistence solution with additional features for developers. EclipseLink is also a focused framework for ORM progressed and provides support for relational databases. EclipseLink is a source object persistence and transformation of the open object framework. It provides execution capabilities that reduce development efforts and maintenance of an application. The software provides an extensible framework that allows developers to interact with many data services .
A. Simulation Environment
Performance of Hibernate, Spring, EclipseLink and IBatis is measured using a java simulation tool. These four reusable software components perform basic SQL operations on the music database and the execution time is calculated and used to measure the way these mapping tools perform under various situations. The aim is to get the time from generation of SQL to querying music database and then getting back the data. The conditions were the same for all these components. The execution time of application is computed by applying select, insert database operations on these four reusable software components. For this purpose, a set of SQL queries is executed against music database. The performance of Hibernate, Spring, IBatis and EclipseLink is monitored under multi user environment because java supports multithreading environment.
The tests were conducted in the following environment:
Operating system: Microsoft Windows 7,
Processor: Intel Core 2 Duo Processor,
To monitor a java application, the parameters that we have used are CPU Utilization, Classes loaded, No. of Threads executed and Heap used by reusable software component. The experimental results of these software components are represented using graphical charts.
In this we have considered select and insert sql queries as two benchmarks. For the first Select Benchmark we have used these SQL queries are:
TABLE 1. For Select Query
These SQL select queries are executed at the backend in the database. When we run these queries it shows how much CPU is utilized, how many classes are loaded, how much heap is used and how much time it takes to execute the java application. According to the average graphs, it is clear that IBatis perform better for select query because its development time is less as compared to other components. IBatis is a data mapper i.e. it maps results sets to the object in java application while other components map the columns of database tables with the java classes. IBatis makes use of SQL which is database dependent. According to the graphs, IBatis has less average CPU utilization, less execution time and consumes less heap because stored procedures are used. A stored procedures is a group of SQL statements that created and stored on database. The stored procedures improved the heap usage and improve the performance of application. IBatis loaded less no. of classes because of lazy loading and another reason is multiple threads are executed simultaneously. The insignificant code is reduced to access a database. The results of select query benchmarks are shown in fig1, 2, 3, 4 and 5.
Fig 1. Execution time
Fig 2: Average Heap Used
Fig 3: Total no. Classes loaded
Fig 4: No. of Threads Executed
Fig 5: CPU usage
The insertion operation is regarded as the second benchmark. The insert operation is used to insert one or more rows in a database table. The first command of language data manipulation performed immediately after the creation of this table is the insertion expression. For the second Insert Benchmark we have used these SQL queries:
TABLE 2. For Insert Query
According to the average graphs, the Charts shown that IBatis performs better for insert benchmark. The average execution time is large, maximum heap is used because multiple records are inserted in to database tables. The only operation in which spring consumes more time is for the insert operation. The number of threads executed to run a java application in IBatis is less than hibernate because we don’t have to create the separate session for threads to insert objects into the database. The sessions in IBatis enhance the performance by reducing the number of times the application needs to access the data. In this case, larger number of classes are loaded in EclipseLink than IBatis but lesser than hibernate. EclipseLink consumes more CPU with respect to the other components. For every insert operations so much effort was necessary on querying, IBatis handles this query in a better way. The results of insert query benchmarks are shown in fig 6, 7, 8, 9 and 10.
Fig 6: Execution time
Fig 7: CPU utilization
Fig 8: Heap Used.
Fig 9: No. of Threads Executed.
Fig 10. Number of classes loaded
This paper presents the comparative analysis of four reusable software components namely hibernate, spring, IBatis and EclipseLink. Reusability allows us to use existing software system rather than building them from scratch. Three performance benchmarks namely SELECT, INSERT and JOIN queries are used in order to measure the performance of reusable software components. These benchmarks were applied on these four reusable software components to analyze their performance and to make a comparison among them. The performance was analyzed using these performance metrics such as CPU utilization, heap Used, number of threads executed, execution time and number of classes loaded with the help of VisualVM. According to our results in SELECT and INSERT queries, IBatis showed outstanding results as compared to other reusable components because it uses less average CPU utilization because of multithreading. IBatis consumes less heap because caching in IBatis improves the performance by caching all the results in the mapping statement and reducing the unnecessary trips to the database. IBatis loaded less number of classes because IBatis is a light weight component.
. McIlroy, Doug, “Mass Produced Software Components” Software Engineering Concepts and Techniques: Proceedings of the NATO Conferences, J.M. Buxton, P. Naur, and B. Randell, eds., Petrocelli/Charter, 1969.
. Johannes Sametinger, “Software Engineering with Reusable Components”, ACM Computing Surveys, ISBN: 3-540-62695-6, 1997.
. Simonetta Balsamo, Antinisca Di Marco, Paola Inverardi, and Marta Simeoni. “Model-Based Performance Prediction in Software Development: A Survey”, Software Engineering, IEEE Transactions on Volume: 30, Issue: 5 ISSN: 0098-5589,pp-223-228, 2004
. V. Grassi, R. Mirandola, and A. Sabetta, “A Model Transformation Approach for the Early Performance and Reliability Analysis of Component-Based Systems”, Proc. In CBSE 6th joint meeting of the European software engineering conference and the ACM SIGSOFT, ISBN 978-1-4503-2237-9, 2006.
. Anas Bassam AL-Badareen, Mohd Hasan Selamat and Sherzod Turaev, “Reusable Software Components Framework”, International conference on Advances in Communications, Computers, Systems and Devices, ISBN: 978-960-474-250-9, 2008.
. Jiya Jiang , Yu Liu, “The Construction of E-Business Portal Based on Struts, Spring and Hibernate”, IEEE International Conference on Emerging Technologies, 2009.
. VisualVM tool accessed from http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/index.htm?info/rzaihh.htm, 2009.
. Dantas, F., Garcia, “A. Software Reuse versus Stability: Evaluating Advanced Programming Techniques”, Proc. SBES’10, Brazil, 2010.
. Zhiyu Zhou and Zhiang Chen, “Performance Evaluation of Transparent Persistence Layer in Java Applications”, IEEE proceedings International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery ISBN: 978-1-4244-8434-8, 2010.
. Adil Ali Abdelaziz, Wan M.N. Wan Kadir and Addin Osman, “Comparative Analysis of Software Performance Prediction Approaches in Context of Component-based System”, International Journal of Computer Applications (0975 – 8887) Volume 23– No.3, June 2011.
 Anupama Kaur, Himanshu Monga, Mnupreet Kaur, “Performance Evaluation of Reusable Software Components”, International Journal of Emerging Technology and Advanced Engineering ISSN 2250-2459, Volume 2, Issue 4, April 2012.
. Ankur Bawiskar, Vinayak Kankate, “Integration of Struts, Spring and Hibernate for an University Management Sys”, International Journal of Emerging Tech and Advanced Engineering, 2012.
 EclipseLink accessed from http://www.eclipse.org/eclipselinkjpa_extensions.pdf, 2012.
 Hibernate accessed from http://www.tutorialspoint.com/hibernate/hibernateoverview.htm, 2012.
. S. M. Thampi and Ashwin Kumar, “Performance Comparison of Persistence Frameworks”, Published in Cornell University Library, Arxiv, ISSN-1653-5715, 2013.
Cite This Work
To export a reference to this article please select a referencing stye below:
Related ServicesView all
DMCA / Removal Request
If you are the original writer of this essay and no longer wish to have your work published on the UKDiss.com website then please: