Empirical Performance Metrics Study of Execution of Database Queries in Implementation of Web Services

: Problem statement: Web services are increasingly being deployed in business applications, due to its unique features such as flexibility, interoperability and other features. Most of the business applications involve extensive use of database operations for data management in back end. Further business applications demand very high level of performance from software solutions and it is a continual and never-ending process. This study focuses on measurement and analysis of performance metrics of database queries in implementation of web services. Approach: In this experimentation, web services are implemented in two popular and standard platforms and database queries are realized through all commercial and standard databases. Performance measurement is done by implementing a common sample application on each realization and using a pair of performance metrics, response time and packet count, that is, number of packets involved in communication between the layers of implementation. Results and Conclusion: This novel study summarizes the various performance aspects of databases in web services with a basic set of database queries in the back end and concludes with firm results on optimum performance offered by database in execution of database queries in realization of web services.


INTRODUCTION
Nowadays web services are gaining tremendous growth due to its unique features such as flexibility, interoperability. And also web services facilitate for reliable distributed computing and grid computing applications. The web services technology, which is increasingly adopted by companies and research departments to achieve more efficient functions and higher profits, brings reusable components, highly aggregation, low coupling and platform independent to software architecture (Xie et al., 2008). Further, Web services feature ubiquitous protocols, language-independence and standardized messaging (Pacifici et al., 2005). Open Industry standards and simple implementation techniques makes web services usage widespread and grow at exponential rate. A Transaction is a unit of work composed of a set of operations on objects and transactions are fundamental to reliable distributed computing (Li et al., 2004). Transaction based web services that demand real-time performance guarantees, such as on-line auctions, stock trading and real-time database servers generally require a higher level of security and performance compared to normal services (Demir and Ghose, 2005). Concretely, Paypal's Web services, e-Bay Developer Program and Amazon web services are illustrative examples of web services being used in mission-critical, security-sensitive and truly large-scale applications (Wei et al., 2008). These types of large-scale business applications deploy database in back end for maintenance of large volume of data. This leads to a lot of database queries being executed in the back end as part of realization of web services.
Presently business applications demand for two vital key non-functional requirements: Performance and Security. So, Performance and security enhancement at all stages of implementation of web services is inevitable and persistent efforts are necessary to achieve continual growth in performance and also in security. Further, Mission-critical applications based on web services require service agreements between consumers and providers of web services to succeed. Vital service factors include web service availability, performance and redundancy (Barclay et al., 2006). In this study, an attempt is made to measure and analyze performance of execution of database queries in realization of web services, using some standard databases for queries and J2EE and .Net software platforms for web service application.
The motivation behind this study is that web services have become the backbone of distributed computing and grid computing applications. Moreover various standards and technologies involved in web services make web services interoperable and pervasive. In any application, the selection of particular technology is purely based on performance offered by the technology. The performance of web services, to a certain extent, also depends upon database used as back end in implementation of web services. Hence selection of database for web services depends upon performance criteria. In this study, standard set of queries are experimented with all the standard databases as back end of web services to analyze performance of databases in the context of web services. This study attempts to analyze the performance of web services with databases based on execution of some DML commands and performance metrics response time and packet count at the level of data link layer. In a nutshell, this study focuses on performance aspects of the databases by deploying them with J2EE and .Net, for realizing and consuming web services with database queries in back end.

Related works:
Web services and databases have very high level of close association in implementing business applications using web services and so several works have been carried out in different aspects of web services and databases including performance analysis. The commit operation is the vital one in database hence few works (Li et al., 2004;Younas et al., 2006) concentrated on commit protocol. In the context of Quality of Support (QoS) for web service transaction, QoS based commit protocol was presented to enable the QoS integration in web service transactions (Li et al., 2004). The study (Younas et al., 2006) investigates performance of transaction commit protocols in the context of composite web services and introduces new commit protocol to improve performance of composite web services transaction. Some research efforts (Gao et al., 2005;Paul et al., 2007) were made to enhance performance based on database transactions and ACID property of transactions. The experimental results from (Gao et al., 2005) show that by slightly relaxing consistency within individual distributed objects, the application realizes both high availability and excellent performance. The study (Paul et al., 2007) concentrated on maintaining an acceptable level of service in web services without compromising traditional ACID properties for transactions.
Several new attempts were made to measure and analyze performance of web services and databases.
The study (Gounaris et al., 2008) propose a robust control theoretical solution to the problem of optimizing the data transfer in queries over WSs, by continuously tuning at runtime the block size and tracking the optimum point. As part of reverse engineering, web services were deployed to allow remote access and management of legacy databases apart from discovery of functionality (Guzman et al., 2006).
The study (Xie et al., 2008) proposes a configurable web service performance testing framework which contains client module, application module and database table and allows testers to configure transaction characteristics to confirm performance metrics. A middleware infrastructure was presented in (Zarras et al., 2005) for the development of virtual databases in pervasive computing, by replacing traditional treatment of databases. Two new web service architectures were proposed for distributed search (Ivanova, 2004). Pacifici et al. (2005) present an architecture and prototype implementation of a performance management system for cluster-based web services.
A new approach (Jiang et al., 2005) is presented for creating XML views from databases and so applications over web services may exchange data without knowing database structure. Wang et al. (2007) proposes an autonomic, workload-aware approach to generate relational scheme for XML files according to dynamic application characteristics or user-specified workload. Some other works concentrated on experiments on applying web services on other areas or incorporating new concepts in web services. In study (Zhang et al., 2007) experiments were carried out by deploying several geospatial web services on top of popular spatial databases and Geographical Information Systems (GIS) to study performance of geospatial web services. A database management system was developed to provide users with on-line web services to build and manage their database to perform parallel data mining on internet and performance study was done based on toolkits (Liang et al., 2006). Datla and Goseva-Popstojanova (2005) focus on measurementbased performance analysis of an e-commerce application which uses web-service components to execute business operations.   Ma and Bartos (2006) addresses deployment scenarios for optimizing web-based transactions and future optimization of web transactions. The study (Tran and Tsuji, 2008) presents ranking algorithm for web services based on QoS parameters using fuzzy logic. The previous study of authors (Velmurugan and Mohamed, 2009) experimentally measure and analyze performance of software platforms for realizing web services and it provides base for this study. The study (Gupta et al., 2007) uses semantic web concepts in web services matchmaking and presents performance analysis and quantifies gains due to knowledge acquisition algorithm. The study  presents a SLA-based web services guarantee model to improve web services runtime environment, based on the idea of differentiating web services. Stantchev and Malek (2008) evaluates replication possibilities for web services at the operating system level and how they affect web service performance.
This study is novel in the aspect of analyzing performance of execution of database queries in the context of web services, when compared to the works discussed above. The metrics used to analyze performance also unique in the aspect how they are applied, that is, metrics data are collected on executing a basic set of DML commands in web service application.

Experimentation: Experimental setup:
This experimentation is carried out by developing an inventory control application for maintaining stock. The business logic is developed using J2EE and .net based web services. Clients access the web services through a web site and in turn web services uses different databases in back end. The application is developed with same features in all aspects in both the technologies in order to compare the performance. The same type of functionalities are supported, database with same fields and same queries are used for experimentation. Performance measurement is done on web services with DML commands using the metrics response time and packet count. The reason for using these two metrics is response time is the key performance factor involved in any real-time application and packet count reveals size of communication overhead that takes place between the layers of implementation. The size of communication overhead plays a vital role in internet due to the fact that network traffic and cost of communication is directly proportional to the size. Deployment environment: Deployment environment consists of two machines, one for web services provider and other for database server. Clients access the web service in turn web service access database for data access. These systems are connected by means of 100 MB Ethernet LAN. The configurations of the systems stated above are listed in Table 1. Wire shark, network protocol analyzer, is used for analyzing performance based on network traffic involved in communication between different layers of implementation for materializing web services with database in back end.
Databases deployed for experimentation: All the standard and commercial databases were used for experimentation and list is given below. The database drivers deployed for the above databases are provided in Table 2.

Metrics used for performance measurement:
The performance is measured and analyzed through the following metrics: • Response Time (RT): time spent between requests originated from client, reaches the web service server, web service access database for data and response being delivered to Client • Packet Count (PC): Number of packets involved in communication between the layers of implementation

Results of experimentation:
The values mentioned here are arrived by calculating statistical average from fifteen trials so that it reflects closely correct value. To find the overall performance of database, statistical average is calculated for all the average values of operations of each database, because it is tedious to arrive at conclusion just by looking at one operation alone and it is not the correct method to judge performance of database by considering only one operation. Moreover, considering a complete database as a whole, it should cover all basic DML commands and not just one.

CONCLUSION
Conclusions and future study: The performance measurement is viewed in two different dimensions that is response time and packet count. The primary aim of any real time system with web services, is minimum response time and then with minimum packet count. Hence, in total, the experimentations revealed that in case of .Net module, oracle provides better response time and SQL server provides response with lesser packet count which is very slightly higher than oracle. In case of J2EE module, SQL server provides optimum performance with lesser response time and also with minimum packet count for communication compared to other realizations. This study may be extended in several ways and some of them are described below. Cross-platform approach may be applied in the same experiment discussed above. The same setup may be evaluated by more metrics and new QoS parameters may be added to further evaluate the system. Database performance tuning methods may be incorporated in each realization to enhance performance of web services. Different database drivers may be used to establish connection with database to evaluate performance in depth. This experiment is done based on a basic set of DML commands but more complex features of database may be taken into account for further analysis.