Jun 9, 2012 - Load and stress testing are performed for both the web applications using Mercury LoadRunner. .... an automated performance and load testing tool for studying .... whereas the JSF platform is an open source software. As.
www.ietdl.org Published in IET Software Received on 4th August 2011 Revised on 9th June 2012 doi: 10.1049/iet-sen.2011.0136
ISSN 1751-8806
Investigations on implementation of web applications with different techniques M. Kalita T. Bezboruah Department of Electronics and Communication Technology, Gauhati University, Guwahati 781014 Assam, India
Abstract: Investigations on implementation of web application with different techniques are essential for developers’ as well as users’ perspective. As such, the authors propose to investigate the same by implementing two prototype research web applications based on two different implementation techniques. One of the web applications has been implemented based on the Microsoft .NET technique and the other based on the Java technique. Our objective is to carry out a detailed comparative study of both the techniques in terms of efficiency, reliability, performance, scalability, stability and time to market features of both the techniques. Load and stress testing are performed for both the web applications using Mercury LoadRunner. The statistical analysis of recorded data for both the applications is carried out to study the feasibility of the work. In this study, the authors present in detail the results of the authors’ comparative study on the two techniques.
1
Introduction
Since its inception, web applications have been static and essentially read only hypermedia repositories of information. The applications running nowadays on the web introduced a number of innovative aspects. Two main operations related to traditional hypermedia repository are (i) browsing and (ii) navigation. With user’s demand, these two operations have extended to data entry, business transactions and communication with remote users. Thereafter, tight integration among the different operation paradigms arises. Thus, a web application performs various operations chosen from the point of user’s perspective. It has created the need for a new design paradigm. These web applications can be considered as an extension to the notion of a traditional information system and are also regarded as an extension to traditional websites [1]. There are different techniques for implementation of these web applications, for example, .NET technique and Java technique. The two platforms are compared based on the features present in the two, mainly tools and resources available [2]. Arguments in favour of J2EE were: (i) platform independence, (ii) multiple vendor support and (iii) the popularity of Java. The points favouring .NET include support for multiple languages and integrated for web services. The disadvantage of .NET is being single vendor support, which is Microsoft. 1.1
.NET techniques
Microsoft .NET is the most elaborate profile. .NET’s use of extensible markup language (XML)-based standards makes the web application platform independent. It is a software framework with a large library of coded solutions to common programming solution [3]. The common language specification is a set of rules intended to promote language 474 & The Institution of Engineering and Technology 2012
interoperability, which makes it language independent [4]. .NET is an attempt to integrate all popular programming languages in one runtime and development environment. Microsoft’s .NET is largely a rewrite of windows distributed InterNet application, which was Microsoft’s previous platform for developing enterprise applications. A virtual machine runs inside the framework that manages the execution of programs written specifically for the framework. Since its initial product release in 2001, it has been steadily gaining popularity among developers. .NET provides an environment for enterprise web applications, which is comparable with Java technologies. ASP.NET is a page driven object model for web programming [5]. 1.2
Java technique
The Java language is a natural choice for developing web applications. Its strong security guarantees concurrency control and wide spread deployment in both browsers and servers makes it relatively easy to create web applications. The most important features of Java application programming interfaces (APIs) for XML are that they all support industry standards ensuring interoperability [6]. The Java server faces (JSF) is a standard user interface (UI) framework for Java web applications. Rapid web application development is promoted by easily assembling UI components, plumbing them to the back end business logic (BLo) components and wiring UI generated component events to server-side event handlers. The JSF is a specification for a component-based web application framework [7, 8]. From the developers as well as users perspective, the investigation on the implementation of web application with different techniques is very much essential. As such, we carried out an investigation on implementation of web application taking into account two implementation IET Softw., 2012, Vol. 6, Iss. 6, pp. 474 –478 doi: 10.1049/iet-sen.2011.0136
www.ietdl.org techniques. Our implementation choices under investigation are: (a) the .NET platform and (b) the Java 5 Enterprise Edition (J5EE). Two prototype research web applications have been implemented: one with .NET and the other with the Java technique to study the feasibility of different aspects of the proposed work.
2
Architecture
The three-tier architecture of the .NET platform is shown in Fig. 1. It has the advantages of separation, independence and reusability [9]. The layers of this architecture are presentation layer (PL), business layer (BL) and data layer (DL). The details of the different layers of the architecture are presented elsewhere [10]. The PL contains the UI and presentation code. Since the .NET platform is used for design purpose, it includes Active Server Pages Extended pages, user controls and server controls. The server controls include Label, TextBox, Button, DropDownList, FileUpload, Gridview and FormView. The validation controls include RequiredFieldValidator, RangeValidator and Regular Expression Validator. The BL is the most essential layer in the architecture. This layer is further divided into two sublayers: (a) the Business Logic Layer (BLL) and (b) the Data Access Layer (DAL). The BLL holds the required BLo functions, validations and calculations related to the data. The DAL is responsible for accessing data and forwarding it to BLL. The BL acts as a mediator between the PL and the DL. In ASP .NET sqlClient acts as the DLL. The DL manages the physical storage and retrieval of data. It receives the data from the BL and sends it to the database and vice versa. The database queries have been written to access the data from the database or to perform operations like insert, update and delete. In our present work, the Standard Query Language (SQL) Server Express 2005 acts as the DL. The multi-tier architecture of the JSF platform is shown in Fig. 2. It is a combination of web server (Apache Tomcat) and back-end MySQL database server. The detailed architecture is presented elsewhere [11]. The objective of the experiments is to measure the performance of the front-end
dynamic content generator written in JSF with Apache Tomcat. The JSF provides a component-centric API from which web application UIs can be assembled. The JSF specification defines a set of basic UI components that can be extended to achieve more specialised behaviour. The events from client-side UI controls are dispatched to JavaBeans models that provide server-side application behaviour. In JSF, the UI components are loosely coupled to server-side Java Plain Old Java Objects, which are declared as managed beans. The front-end controller servlet handles all Faces requests and dispatches them with the necessary application data to the appropriate view. The database server manages the physical storage and retrieval of data. It receives the data from the model and sends it to the database server and vice versa. The database queries have been written to access the data from the database and to perform operations such as insert, update and delete. In our design, MySQL acts as the DL.
3 Design aspect, hardware and software environment The web application’s design is essentially its look and feel [12]. We have taken into account all the web elements for example, audience information, purpose and objective statement, domain information, web specification and combined them to produce an arrangement for implementing the web applications using both the techniques. The Create, Read, Update and Delete operations are performed to generate the response. There are two types of accounts available for accessing both the web applications. The ‘USER ACCOUNT’, which is meant for registered users that has limited access to the applications. The other one is the ‘ADMINISTRATIVE ACCOUNT’ meant for the administrator that has full access to the applications. The algorithm for developing the web application is given in Fig. 3.
Fig. 1 Architecture for .NET technique
Fig. 2 Architecture for Java technique IET Softw., 2012, Vol. 6, Iss. 6, pp. 474– 478 doi: 10.1049/iet-sen.2011.0136
Fig. 3 Algorithm for developing the web application 475
& The Institution of Engineering and Technology 2012
www.ietdl.org For .NET technique the software specifications are: (i) web server: IIS 5.1, (ii) database server: Microsoft SQL Server 2005, (iii) platform: Visual Studio 2005 and (iv) web browser: Internet Explorer 6.1. For Java technique the software specifications are: (a) web server: Apache Tomcat 6.0.18, (b) the database server: MySQL 5.0, (c) platform: NetBeans 6.5.1 IDE and (d) web browser: Mozilla Firefox. Both the applications have been run on different PCs with same hardware specifications: Intelw Pentiumw Dual CPU E2200; Processor speed: @ 2.20 GHz; RAM: 1 GB and Memory space: 150 GB. The operating system is Windows XP Professional Service Pack 2.
4
Testing
The Mercury LoadRunner (Version 8.0) is deployed for testing the applications implemented by using both the techniques. It is an automated performance and load testing tool for studying system behaviour and performances, while generating actual Table 1
load [13]. During the experiments, the stress level is gradually varied, so that it can saturate the server. This can lead to finding out the capability of the server. Each hyper text transfer protocol request causes an SQL INSERT command to insert two text fields in the database table. An average steady-state period of 30 min is fixed for all the experiments. Various steps during the test plan, test execution and flowcharts are presented and discussed elsewhere [10, 11]. The test case is given in Table 1 below. 4.1
Testing parameters and test responses
There are three main parameters that are varied during the testing procedure: (i) the workload intensity, measured in terms of number of virtual users, that is, stress level, (ii) the workload mix, which defines what users will do in each session and (iii) the user behaviour parameter, which is the think time. The metrics of the load and stress test that are monitored include: (a) the response time in seconds, (b) the throughput
Test case for insert operation
Test case: Insert Description: This test case inserts a record in a specified database table Data requirements: {username}– User must have insert privileges. User names must be unique and {password}– Must be valid for a given username Step Step description Expected result Transaction name Think time 1 2 3
Table 2
log in using username and password. press ‘LOGIN’ button enter ID and name and press button ‘SAVE’ log out pressing button ‘LOGOUT’
authenticated to perform insert operation values are inserted log out
init_transaction
10
action_transaction end_transaction
10 10
Experimental results
Scenario
insert operation
No. of users
10
20
30
40
50
75
100
125
Response time, s, throughput, bytes/s response time throughput hits/s response time throughput hits/s response time throughput hits/s response time throughput hits/s response time throughput hits/s response time throughput hits/s response time throughput hits/s response time throughput hits/s throughput hits/s
476
& The Institution of Engineering and Technology 2012
.NET framework
JSF framework
Average
Refusal in %
Average
Refusal in %
47.6 41 056 1 47 78 930 2.45 52.3 125 146 3.327 50.8 173 852 5.2 51.5 228 690 8 45.86 328 940 12.241 49.859 308 799 8.963 76.646 52 673 1.515 227 314 3.451
0
45.3 49 628 1.2 45.7 71 962 1.881 47.6 98 806 2.248 50.3 106 271 2.63 52.4 112 628 3.261 56.6 129 440 3.681 112.34 122 645 2.524 60.85 103 503 2.6 255 968 3.042
0
0
0
0
5
8
35
84
0
0
0
0
26
50
62
IET Softw., 2012, Vol. 6, Iss. 6, pp. 474 –478 doi: 10.1049/iet-sen.2011.0136
www.ietdl.org in bytes per second, (c) the hits per second and (d) the number of successful virtual users allowed for transaction. 4.2
Experimental results
The testing is performed for 10, 20, 30, 40, 50, 75, 100 and 125 virtual users. The number of run in each experiment is 1. All performance metrics are measured in 128 kBPS bandwidth. We observed various metrics provided by the LoadRunner. All the performance tests are conducted with a ramp up schedule of 30 s. They are phased out at the same time after the completion of the steady-state period [14]. The virtual user levels 75, 100 and 125 are tested to force the web application to work beyond its capacity. The results are given in Table 2.
5
Statistical analysis
The statistical analysis for ten users run for 5 min in steady state is performed. We quantify the performance metrics for performing statistical analysis. The total number of samples considered for the test are 35. The recorded 35 samples are divided into six and seven classes depending on their range. The class interval and range for response time for the .NET technique and Java technique are shown in Tables 3 and 4, respectively. 5.1
Distribution for response time
Our objective is to determine the distribution of response time. The histograms, quantile plots and normal probability plots of the observed metrics for the web application developed by the .NET technique are shown in Figs. 4a – c. The histograms, quantile plots and normal probability plots of the observed metrics for web application developed by using the Java technique are shown in Figs. 5a – c.The applied distributions are normal distributions according to the histograms. However, there is a major drawback with the histograms, that is, depending on the used bin sizes; it is possible to draw very different conclusions. A better technique is to plot the observed quantiles against the recorded data in a quantile plot [15]. If the distribution of the observed data is normal, the plot is close to be linear. Table 3
Class interval and frequency (.NET technique)
Response time, s 47– 49.6 49.6– 52.2 52.2– 54.8 54.8– 57.4 57.4– 60 60– 62.8
Table 4
Observed frequency 3 10 8 7 5 2
Class interval and frequency (Java technique)
Response time, s
Observed frequency
118.269– 121.269 121.269– 124.269 124.269– 127.269 127.269– 130.269 130.269– 133.269 133.269– 126.269 136.269– 139.269
4 4 5 7 9 4 2
IET Softw., 2012, Vol. 6, Iss. 6, pp. 474– 478 doi: 10.1049/iet-sen.2011.0136
Fig. 4 Distribution of response time using .NET technique a Histogram for response time b Quantile plot for response time c Normal probability plot for response time
Based on the observed data, the response time does appear to be normally distributed. The test of normality can be verified graphically, by using the normal probability plot. If the data samples are taken from a normal distribution, the plot will appear to be linear. The data follow a straight line, which predicts that the distributions are normal.
5.2
Null hypothesis
To examine the combined effect of throughput and hits/s on response time, we performed multiple linear regression tests. The tests are carried out at 95% confidence levels. We assumed the null hypothesis (H0), which is: the response time does not depend on hits/s and throughput. The alternate hypothesis (H1) is: the response time is a function of hits/s and throughput. The regression analysis calculates the F ratio and shows that it is significant at 0.05. This implies that there exists a linear relationship between response time, hits/s and throughput. As such, the null hypothesis may be rejected. This implies that the equation has a 95% chance of being true. 477
& The Institution of Engineering and Technology 2012
www.ietdl.org The statistical analysis of data recorded for both the applications shows that both the applications developed with the .NET and the Java techniques are stable and reliable. The .NET platform is a proprietary software, whereas the JSF platform is an open source software. As such, the Java technique is more cost effective than the .NET technique. From statistical testing and analysis it is observed that hits/s and throughput have a combined effect on response time. The regression analysis for both the web applications calculates the F ratio to be significant at 0.05. This provides evidence of the existence of a linear relationship between response time, hits/s and throughput.
7
Conclusion
From our overall investigations it can be concluded that if we consider scalability, stability, reliability and cost, then the Java technique is better than its counterpart .NET technique. However, if we consider efficiency, then the .NET technique overtakes its counterpart Java technique. These results will provide Internet practitioners in research and industrial dynamic web application developers with an indication of the performance tradeoffs associated with current technologies for dynamic content generation.
8
Acknowledgment
This infrastructural facility for the present work is created by financial support from the University Grants Commission (UGC), Government of India.
9
Fig. 5 Distribution of response time using Java technique a Histogram for response time b Quantile plot for response time c Normal probability plot for response time
6
Results and discussion
From our present investigations it is found that the web application implemented with the .NET technique is capable of handling up to 40 concurrent users smoothly. The throughput and hits/s rise to a peak value at 75 virtual users, after that the throughput and hits/s falls with a rise in the response time. The web application implemented with Java techniques is capable of handling up to 50 concurrent users without any error. The throughput and hits/s reaches a peak value at 75 virtual users and then decreases gradually. As such, we can conclude that the web application implemented with the Java technique is more scalable than the web application implemented with the .NET technique. From Table 2, it is observed that the web application developed with the .NET technique performs faster than its counterpart, developed with the Java technique considering the same set of data. The application developed with the .NET technique returns more throughputs to the client than its counterpart, developed with the Java technique. As such, we can conclude that the .NET technique is more efficient than the Java technique. 478 & The Institution of Engineering and Technology 2012
References
1 Baresi, L., Garzotto, F., Paolini, P.: ‘From web sites to web applications: new issues for conceptual modeling’, LNCS, 2000, 1921/2000, pp. 89–100 2 Kachru, S., Gehringer, E.F.: ‘A comparison of J2EE and .NET as platforms for teaching web services’. 34th ASEE/IEEE Frontiers in Education Conf., October 2004 3 Moroney, L., MacDonald, M.: ‘Pro ASP.NET 2.0 in VB 2005’ (Apress, 2006) 4 Vaughan-Nichols, S.J.: ‘Web services, beyond the hype’, Computer, 2002, 35, (2), pp. 18–21 5 Doyle B., Lopes C.V.: ‘Survey of technologies for web application development’ University of California, Irvine 6 Christensen, A.S., Moller, A., Schwartzbach, M.I.: ‘Extending Java for high level web service construction’, ACM Trans. Program. Lang. Syst., 2003, 25, (6), p. 814 7 Burns, E., Schalk, C., Griffin, N.: ‘JavaServer faces 2.0: the complete reference’ (McGraw-Hill, 2010) 8 Dudney, B., Lehr, J., Willis, B., LeRoy, M.: ‘Mastering Java Server Faces’ (Wiley Publishing, Inc, 2004) 9 Kalita, M., Bezboruah, T.: ‘Performance analysis of web application using Microsoft .Net technology’, Int. J. Electron. Eng. Res., 2010, 2, (2), pp. 243– 251 10 Kalita, M., Bezboruah, T.: ‘Investigations on performance testing and evaluation of PReWebD: a .NET technique for implementing web application’, IET Softw., 2011, 5, (4), pp. 357–365 11 Kalita, M., Khanikar, S., Bezboruah, T.: ‘Investigation on performance testing and evaluation of PReWebN: a Java technique for implementing web application’, IET Softw., 2011, 5, (5), pp. 434– 444 12 Kalita, M., Bezboruah, T.: ‘On HTML and XML based web design and implementation techniques’, Far East J. Electron. Commun., 2007, 1, (1), pp. 65–79 13 Application-testing tool: Mercury LoadRunner 8.0, http://pcquest.ciol. com/content/software/2004/104093002.asp 14 Cecchet, E., Chanda, A., Elnikety, S., Marguerite, J.: ‘Willy Zwaenepoel, performance comparison of middleware architectures for generating dynamic web content’ (Springer-Verlag, New York, 2003), pp. 242 –261 ´ ., Szita´s, Z., Levendovszky, T., Charaf, H.: 15 Boga´rdi-Me´szo¨ly, A ‘Investigating factors influencing the response time in ASP.NET web applications’, LNCS, 2005, 3746, pp. 223– 233
IET Softw., 2012, Vol. 6, Iss. 6, pp. 474 –478 doi: 10.1049/iet-sen.2011.0136