Pattern-based J2EE Application Deployment with Cost Analysis



Similar documents
Performance Prediction, Sizing and Capacity Planning for Distributed E-Commerce Applications

Test Run Analysis Interpretation (AI) Made Easy with OpenLoad

Tuning Dynamic Web Applications using Fine-Grain Analysis

What Is the Java TM 2 Platform, Enterprise Edition?

New Methods for Performance Monitoring of J2EE Application Servers

The Key Technology Research of Virtual Laboratory based On Cloud Computing Ling Zhang

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

A Middleware Strategy to Survive Compute Peak Loads in Cloud

Figure 1. The cloud scales: Amazon EC2 growth [2].

Introducing Performance Engineering by means of Tools and Practical Exercises

Monitoring Pramati EJB Server

ANALYSIS OF GRID COMPUTING AS IT APPLIES TO HIGH VOLUME DOCUMENT PROCESSING AND OCR

Cloud Storage Solution for WSN Based on Internet Innovation Union

Distributed Objects and Components

Implementation of an Enterprise-level Groupware System Based on J2EE Platform and WebDAV Protocol

Performance Evaluation for Software Migration

Glassfish, JAVA EE, Servlets, JSP, EJB

WASv6_Scheduler.ppt Page 1 of 18

Modeling Web Applications Using Java And XML Related Technologies

MagDiSoft Web Solutions Office No. 102, Bramha Majestic, NIBM Road Kondhwa, Pune Tel: /

Excerpts from Chapter 4, Architectural Modeling -- UML for Mere Mortals by Eric J. Naiburg and Robert A. Maksimchuk

Configuration Management of Massively Scalable Systems

Dynamic Adaptability of Services in Enterprise JavaBeans Architecture

25 May Code 3C3 Peeling the Layers of the 'Performance Onion John Murphy, Andrew Lee and Liam Murphy

Strategies for Application Server Deployment Using Multiplatform Installers. October 17-18, 2006 l Santa Clara, CA

Bernie Velivis President, Performax Inc

NetBeans IDE Field Guide

Software Engineering. Software Engineering. Component-Based. Based on Software Engineering, 7 th Edition by Ian Sommerville

A Performance Comparison of Web Development Technologies to Distribute Multimedia across an Intranet

Java Technology in the Design and Implementation of Web Applications

Chapter 1 Introduction to Enterprise Software

CMotion: A Framework for Migration of Applications into and between Clouds

A framework for web-based product data management using J2EE

Improve Business Productivity and User Experience with a SanDisk Powered SQL Server 2014 In-Memory OLTP Database

Distributed Database Design

What Is Specific in Load Testing?

Scalable Multiple NameNodes Hadoop Cloud Storage System

Enterprise Applications

Evaluation Methodology of Converged Cloud Environments

Recommendations for Performance Benchmarking

WITH A FUSION POWERED SQL SERVER 2014 IN-MEMORY OLTP DATABASE

3-Tier Architecture. 3-Tier Architecture. Prepared By. Channu Kambalyal. Page 1 of 19

Managing Java EE Performance with Embarcadero s J Optimizer Request Analyzer

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Chapter 1 - Web Server Management and Cluster Topology

Load Balancing in Cluster

Software Configuration Management Related to Management of Distributed Systems and Services and Advanced Service Creation

Relational Database Basics Review

SAP NetWeaver BRM 7.3

Case Study - I. Industry: Social Networking Website Technology : J2EE AJAX, Spring, MySQL, Weblogic, Windows Server 2008.

2012 LABVANTAGE Solutions, Inc. All Rights Reserved.

Developing modular Java applications

A Framework for Automatic Performance Monitoring, Analysis and Optimisation of Component Based Software Systems

J2EE Applications DEployment : A first Experiment. Abstract

enterprise^ IBM WebSphere Application Server v7.0 Security "publishing Secure your WebSphere applications with Java EE and JAAS security standards

BSPCloud: A Hybrid Programming Library for Cloud Computing *

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Titolo del paragrafo. Titolo del documento - Sottotitolo documento The Benefits of Pushing Real-Time Market Data via a Web Infrastructure

Techniques for Scaling Components of Web Application

Shared Parallel File System

A STUDY OF THE BEHAVIOUR OF THE MOBILE AGENT IN THE NETWORK MANAGEMENT SYSTEMS

Planning Configuration Relocation on the BonFIRE Infrastructure

JReport Server Deployment Scenarios

Towards Architecture-based Management of Platforms in Cloud

Principles and Software Realization of a Multimedia Course on Theoretical Electrical Engineering Based on Enterprise Technology

Chapter 3 Technology adapted

How To Manage A Virtual Data Center In A Country With Limited Space

Reverse Auction-based Resource Allocation Policy for Service Broker in Hybrid Cloud Environment

Analysis and Research of Cloud Computing System to Comparison of Several Cloud Computing Platforms

InfiniteGraph: The Distributed Graph Database

Instituto Politécnico Nacional Escuela Superior de Cómputo. THEMATIC UNIT: I Introduction to Web Applications

Performance Modeling for Web based J2EE and.net Applications

Final Project Proposal. CSCI.6500 Distributed Computing over the Internet

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Variations in Performance and Scalability when Migrating n-tier Applications to Different Clouds

IBM Rational Asset Manager

Capacity Management for Oracle Database Machine Exadata v2

Newsletter 4/2013 Oktober

Clustering Versus Shared Nothing: A Case Study

CS 487. Week 8. Reference: 1. Software engineering, roger s. pressman. Reading: 1. Ian Sommerville, Chapter 3. Objective:

Course Title: ITAP 4371: E-Commerce. Semester Credit Hours: 3 (3,0)

Flauncher and DVMS Deploying and Scheduling Thousands of Virtual Machines on Hundreds of Nodes Distributed Geographically

Customer Bank Account Management System Technical Specification Document

Continuous Fastest Path Planning in Road Networks by Mining Real-Time Traffic Event Information

Umbrella: A New Component-Based Software Development Model

Performance Best Practices Guide for SAP NetWeaver Portal 7.3

[Rokadiya,5(4): October-December 2015] ISSN Impact Factor

Chapter 10: Scalability

Installation Guide of the Change Management API Reference Implementation

A Systematic Method for Big Data Technology Selection

Design and Implementation of Supermarket Management System Yongchang Rena, Mengyao Chenb

Scott Barber Chief Technology Officer PerfTestPlus, Inc.

Software Performance and Scalability

WHITE PAPER Application Performance Management. A Practical Approach to Balancing Application Performance and J2EE Instrumentation Information

Architectural Overview

Deploying to WebSphere Process Server and WebSphere Enterprise Service Bus

Affinity Aware VM Colocation Mechanism for Cloud

JSLEE and SIP-Servlets Interoperability with Mobicents Communication Platform

WEBSPHERE APPLICATION SERVER ADMIN V8.5 (on Linux and Windows) WITH REAL-TIME CONCEPTS & REAL-TIME PROJECT

Transcription:

Pattern-based J2EE Application Deployment with Cost Analysis Nuyun ZHANG, Gang HUANG, Ling LAN, Hong MEI Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Key laboratory of High Confidence Software Technologies (Peking University),Ministry of Education, Beijing, 100871, China zhangny04@sei.pku.edu.cn, huanggang@sei.pku.edu.cn, lanling@pku.edu.cn, meih@pku.edu.cn Abstract 1 The most challenging problem of J2EE application deployment is to determine which components should be deployed onto which servers in terms of non-functional properties. This paper proposes an empirical approach with some mathematic enhancement. It does two contributions to J2EE application deployment: 1) patterns are adopted to specify why, when, where and how to deploy so that the empirical approach becomes more comprehensible and operational; 2) a mathematic framework to analyze the deployment cost is defined for helping the selection of the best-of-breed pattern. We experiment several patterns on a J2EE benchmark application and evaluate the cost analysis framework. 1. Introduction Deployment of J2EE application is the process to deploy application clients, applets, web components and Enterprise JavaBeans components into specific operational environments [6]. The most challenging problem of deployment is component arrangement, namely which components should be deployed onto which servers in terms of performance, reliability, cost and other non-functional properties. Existing approaches for the problem can be summarized as: mathematics, artificial intelligence (AI) and empirical methods. The mathematics methods build delicate models about the system and solving it to find the optimal deployment plan [4]. They require precise parameters, such as memory consumption of each component and reliability of each node. The AI methods use AI technology to reduce the complexity of the search space that is involved in finding an optimal plan [5]. They need a number of parameters, too. The empirical methods try to conclude some guidelines from experiences or best practices for deployments. The math and AI methods neglect some details of the running of the application system. In addition, some of the parameters they need are difficult to measure or their precision cannot be guaranteed. Totally depending on 1 This work has been supported by the National Grand Fundamental Research 973 Program of China under Grant No.2005CB321805, the National Natural Science Foundation of China under Grant No. 90412011, 90612011, 60403030. them is usually impractical. On the other hand, when turning to the empirical methods, we find their carrying out is seriously depend on the deployers understanding and manual operations. This paper proposes a pattern based approach for J2EE application deployment. It is an empirical method but more formal and specific than the traditional ones. It includes clear operational steps and can be carried out automatically. However, there are 2 problems in the approach: how to choose a pattern to execute from several useful patterns and how to map the deployment solutions onto physical machines. We again propose a deployment cost analysis framework to meet the problems. The contribution of this paper is: it not only brings forward a pattern based approach to J2EE application deployment but also makes it practical. It makes use of patterns to describe deployment guideline and gives a quantitative cost analysis framework to support the execution of patterns. It implements based deployment process and validates the effectiveness of the approach and the framework by experiments. 2. Approach Overview 2.1 Description of Deployment Pattern The description of deployment patterns contains several sections which are shown in Table 1. 2.2 Pattern based Deployment Process We divide J2EE deployment process into seven stages that are release, installation, update, adaptation, activation, deactivation, and uninstallation. The pattern based J2EE deployment adds some steps between the stages as shown in Figure 1.The execution of pattern starts after the configuration step. Then it goes on as follows: Firstly, execution tool identifies candidates by checking the goal sections and context sections of all patterns. Secondly, execution tool picks out one of candidates to execute. It follows the solution section to make a deployment plan, the implementation section to make a physical deployment plan.

Table 1 Description of Deployment Pattern Section Purpose Content Examples Name Unique identification for A meaningful name Components collocating pattern Goal For automatic recognition WHY: The goal of deployment short response time. of Context For automatic checking of WHEN: Preconditions for using Workloads, resource constraint of nodes. Solution For automatic execution WHERE: Relationships between Component A is on node n. of components and nodes Component B is on node m. Implement For automatic execution ation of HOW: Relationships between components and physical machines Component A is on node n. Component B is on node m. Node n is Dell PC 1. Node m is Dell PC 2. Figure 1. Pattern based deployment process Thirdly, the deployment tool packages the components and transfer them to their destinations according to the physical deployment plan. Fourthly, the application servers install the packages and start them. If this is a redeployment, the application servers will stop and uninstall the old components before the installation and starting. Finally, after a period of running, the tools check whether the deployment has the expected results and adjust the parameters in s. The tools may start a new round of pattern based deployment process to improve the deployment. 3.Deployment Cost Analysis Framework The challenges in pattern based deployment process are: 1) in the implementation section of a pattern, we should map the solution to the physical machines. 2) If useful patterns are more than one, we should select one for execution under circumstances that we do not know which pattern will make the system work most well. There could be many kinds of solutions to the challenges. We consider in an enterprise application like J2EE application that the Cost/Benefit is most important. Since we have no idea of how many benefits deployment will bring, we try to make the cost of deployment minimum. In the deployment process, the service is stopped and that adds to the cost. Therefore, we proposed a framework to evaluate the cost of J2EE application deployment process. We define the deployment cost as the time deployment takes. In the deployment or redeployment process, loses are brought by the system down time. So we care about it instead of the other expenses such as memory or network occupation. Our goal is to find whose deployment time is the least. For this purpose, the cost analysis framework only care about the cost differences in deployment processes, not their absolute values. Some constants will be neglected to simplify the framework. Packaging and transferring do not interrupt the running of the application system. We do not include them in deployment cost analysis. The analysis framework is as follows: First, we define a package as a group of components placed on the same node. The deployment process of an application system is composed of the concurrent deployment processes on all the nodes in the system. The deployment time is determined by the slowest subprocess. We describe it as: CostOfApplication = max{costoneachnode} 1 The deployment cost on a node is composed of undeploy time of old packages and deployment time of the new ones, as shown in equation 2.

costoneachnode = deploymenttime + undeploymenttime 1. The deployment time is closely related with the implementation of application server. We have done some experiments on Peking University Application Server (PKUAS) [3] try to find some rules in deployment time. The deployment time is composed of installation time and starting time. The following hot color map is a contour figure showing the installation time of JAR packages. The 20 colors evenly ranged from 3396 to 17626 ms. The darkest red in the upper right area of the map represents the longest time that is 17626 ms. The darkest blue in the lower left represents the shortest time that is 3396 ms. There is a blank area in the right lower part of the figure, because when package number is small, the package size can hardly be very large. 2 2. We do the same kind of experiments to figure out the installation time of WAR packages. In our experiments, the installation time of WAR differs from 282 to 33829 ms as the package size ranges from 41 to 64634 kb. The installation time of WAR is about ten times less than that of JAR of the same size. We find that no matter how many html, JSP, and images are in the package, the installation time is the same if the whole package size is the same and the Java class number is the same. Figure 3 shows the installation time of WAR when there are a fix number of Java classes. We can see that the installation time has a linear relationship with the size of WAR package. installationtimewar = c*warsize where c is a constant that has something to do with the implementation of the application server and the Java classes in the package. Figure 2. Contour map of installation time of JAR Figure 3. Installation time of WAR From figure 4 we can see the installation time has something to do with package size and number of JARs. The more JARs are, the longer the time is. The larger the size is, the longer the time is. Because the contour lines are almost vertical, we know the size of package plays a more important role in the installation time and their relationship can be approximately described by linear equation. In our cost analysis problem, what we want is only a comparable result, not the absolute number. To simplify the comparison, we give each installation time a reasonable value instead of its real value. The given value can reflect its real value in proportion. The simplified expression of installation time of EJB package should be in a linear form, and we omit the constant to get the following expression: ejbpackagesize( kb) installationtimeejb = 3 If necessary, by curve fitting and further analysis of the sub deployment time,we can get the exact relationship of installation time, the JAR number and the package size. We can give a set of test packages. In another specific environment, by deploy the test packages, we can figure out the relationship of installation time, the JAR number and the package size automatically. For the purpose of comparison, consulting the experiment results of the installation time of EJB package, we give a simplified expression for WAR installation time: WARsize installationtimewar = 0.1* 4 JARsize where JARsize represents the size of all the JARs in the system. Integrating the expression 3 and 4 we get the installation time of a package as: ejbpackagesize WARsize installationtime = + 0.1* JARsize 3. By experiments we know the starting time is really small and can be neglect. 4. The undeployment time is composed of the uninstallation time and the stopping time. By experiments we know the stopping time is very small and can be neglected. 5. In our experiments, the uninstallation time of WAR varies from 188 to 781 ms as the package size ranges from 41 to 64634 kb. It plays a so trifling part in the whole deployment time that we neglect it. 5

4.1 Redeployment of RUBiS 4.1.1 Initial Deployment of RUBiS 3 In the given environment, there are 18 = 2592 deployment plan of RUBiS, where 18 is the component number and 3 is the node number. We make an initial deployment randomly, as shown in Table 3. We assume the number of concurrent clients is 500. Table 3. An initial deployment plan Figure 4. Uninstallation time of JAR 6. Figure 4 is the contour map of uninstallation time of JAR packages by experiments. Because the contour line is almost horizontal, we know the number of JAR is the most important factor in uninstallation time. Using the same analysis method of the installation time, we get the following expression: uninstallationtimejar = 0.2* JARnumber 6 In conclusion, applying the expression 5 and 6 to 2, we obtain the deployment cost on each node. Applying the expression 2 to 1, we obtain the cost of the whole deployment process. In different implementations of J2EE deployment process, the cost analysis methods may need adjustment in detail, but the framework is still applicable and it is our future direction of research. 4.Case study In this section, we use cost analysis based deployment patterns to redeploy RUBiS [7], which is an auction site prototype modeled after ebay.com that is used to evaluate application design patterns and application server performance scalability. First, we give an entire redeployment process of RUBiS. Then, we verify our cost analysis framework by comparing experimental deployment time and its estimated values. The process is aided by CADTool, which is a J2EE deployment tool [2]. The environment of experiments is shown in Table 2: Table 2. Deployment environment Node Software Database CPU Memory none 2.79G 504M MySQL 4.0.15 2.99G 504M none 2.79G 512M Client none 2.79G 512M Node Deploys WAR(241kB), 4 JARs(262kB) MySQL DB, 7 JARs(569kB) 6 JARs(369kB) 4.1.2 Identification of Pattern Candidates 1. Deployment goal recognition. The deployment goal is to achieve a good performance in average client session time, as mentioned in section 2.We find out 5 patterns have the goal. They are in Table 4. Table 4. Pattern Candidates ID Key elements in Main idea of Solution context 1 Client Number<1000 Collocating WAR and JARs 2 Client Number<1000 Centralized deployment of EJB 3 Client Number>1000 Separate WAR and JARs 4 Client Number>1000 Distributed deployment of EJB 5 Separate Resource consuming servers 2. Initial context verification. In the experiment environment, the logic expressions in the contexts of Pattern 1 and 2 are true. Pattern 1 and 2 are useful. 4.1.3 Cost Analysis Aided Pattern Execution 1. Selecting an implementation for each pattern candidate. We use the cost analysis framework to estimate the every possible implementation of the candidate pattern1 and 2. We use the following formulae mentioned in section 3 to make the estimation: CostOfApplication = max{ costoneachnode } ejbpackagesize WARsize installationtime = + 0.1* JARsize undeploytimejar = 0.2* JARnumber

Table 5. Costs of the implementations of candidate Pattern Implementation Cost on Cost on Cost on Maximu Time by m Cost experiment Deploy cost Undeploy Deploy Undeploy Deploy cost Undeploy (ms) cost cost cost cost 1 Put all on 12+0.02 0.2*4 0 0.2*7 0 0.2*6 12.82 14496 Put all on 0 0.2*4 12+0.02 0.2*7 0 0.2*6 13.42 15695 Put all on 0 0.2*4 0 0.2*7 12+0.02 0.2*6 13.22 15476 2 Put all EJBs on 12+0.02 0.2*4 0 0.2*7 0 0.2*6 12.82 14496 Put all EJBs on 0 0.2*4 12 0.2*7 0 0.2*6 13.4 14663 Put all EJBs on 0 0.2*4 0 0.2*7 12 0.2*6 13.2 15278 The estimation processes and results are in Table 5. Taking pattern 1 for example, it has 3 implementations. They are to put all the components on, and. By cost analysis we know the deployment cost on is the least, therefore we take it as the implementation of Pattern 1. By the same way we take deployment on again as the implementation of Pattern 2. The last column in 5 is the experiment result for the 6 implementations. We can see our cost analysis framework do find the implementation with least deployment cost for each pattern. 2. Selecting a pattern to execute. From Table 5 we know the costs of the two implementations are the same, so we are free to choose any one of them. As a matter of fact, they happen to be the same deployment, which is shown in Table 6. Table 6. Implementation of the two Patterns Node Deploys WAR, 17 JARs MySQL DB none 3. Executing the redeployment. We carry out the redeployment by CADTool and monitor the system running to know that the average session time of the redeployed system is reduced by 627 ms. 4.2 More Experiments on Cost of Deployment We apply more patterns and their different implementations to make redeployments. No Table 7. Experiment results of redeployments initial deployment ID Applied pattern ID Redeploy ment ID Cost Time by experiment (ms) 1 1 1 2 13.42 15695 2 1 2 3 13.4 14640 3 3 1 2 15.42 15297 4 2 5 4 7.4 7693 5 2 5 5 8.42 8532 Table 7 depicts the results of our experiments. The last two columns show the estimated deployment cost is approximately in proportion to the real deployment time. The relationships of the deployment cost can be reflected by that of the estimated costs. 5.Conclusions This paper proposes a pattern based approach of J2EE application deployment and make it practical by a quantitative method to evaluate deployment cost. It gives experiments to validate them. The idea of deployment pattern is not novel, but there is little attention paid in using of them, especially from the deployment cost point of view. To our best knowledge, there is no other work that does the same thing as we do, i.e., giving a deployment cost analysis framework of J2EE application by time. The current weaknesses of the approach are: lacks of tool support and more analysis experiments on other kinds of application servers. The future work can be on studying more implementation of J2EE deployment process to find more common rules about the deployment cost. In our study of PKUAS deployment, an enhancement of the cost analysis precision is also needed. References [1] Gamma et al. Design patterns: elements of reusable objectoriented software, Addison Wesley Longman, 1995. [2] Ling LAN, Gang HUANG et al. Architecture based Deployment of Large-Scale Component based Systems: the Tool and Principles, CBSE, Lisbon, Portugal, 2004.. [3] Mei, H. and G. Huang. PKUAS: An Architecture-based Reflective Component Operating Platform, invited paper, 10th IEEE International Workshop on Future Trends of Distributed Computing Systems, Suzhou, China, 2004. [4] Marija Mikic-Rakic, Sam Malek, and Nenad Medvidovic. Improving Availability in Large, Distributed Component-Based Systems Via Redeployment, Component Deployment, Grenoble, France, 2005. [5] T. Kichkaylo et al. Constrained Component Deployment in Wide-Area Networks Using AI Planning Techniques, International Parallel and Distributed Processing Symposium, Nice, France, 2003. [6] SUN Microsystems, Java 2 Platform Enterprise Edition Specification, Version 5.0, SUN Microsystems, 2005. [7] SUN Microsystems, Java 2 Enterprise Edition Deployment API Specification, Version 1.1, SUN Microsystems, 2002. [8]http://msdn2.microsoft.com/en-us/library/ms998478.aspx [9] http://rubis.objectweb.org