• No results found

Performance Testing: Reference Technology and

Performance Testing:

Reference Technology

and Languages

Performance testing (PT) is not to be construed as features testing even though it has a definite link with the latter. In fact, PT begins from where the feature testing ends. It presupposes successful completion of features testing, meaning that all the desired functional requirements expected from the system are fully met. However, it is worth noting that conducting PT without features testing is often fraught with great difficulties. This is because the residual defects in the system, which otherwise would have been known in features testing, would give misleading results about the performance. Previous chapters emphasized the need for PT and various factors that have impact the performance of Web-based applications. This chapter provides an insight about the technology aspects, including the software languages, necessary for Web development. Needless to add, that technology as well as software languages have a critical impact on the performance of the system.

Client Server and

Web-Based Technology

The evolution of networking in recent decades has set an interesting challenge for the growth of software science. This evolution is the result of fomenting many new as well as radical ideas over a period of time and manifesting them into invention of new

technologies. The ensuing section emphasizes the evolution of Web-based technology as a successor to client-server technology.

Client Server Technology

Client server technology (see Client/server software architectures – An overview, 2004) is the combination of two simple but distinct processes, that is, client and server process as shown in Figure 3.1. It works on the principle of the request-response mechanism wherein the client process requests a specific service from the server and the server process responds to the client by servicing the request. Client programs usually manage the user interface of the application. The client also manages the local resources such as the monitor, keyboard, workstation, and CPU. A significant volume of processing is done locally at the client side. A server fulfills the client’s request by performing the desired task. Such tasks include database retrieval and updates, servicing file requests, managing data integrity, and sending responses to client requests. The server process may run on another machine on the network.

In a broader vision, a server process acts as a software engine that manages shared resources such as databases, printers, modems, or high-powered processors. Client and server have fundamentally different requirements for computing resources such as processor speeds, memory, disk speeds and capacities, and input/output devices. In such an environment, the performance of the overall system is the function of the performance of both client and server processes. Testing the performance of the system calls for testing not only the client and server but also the network connecting both the entities. The hardware platform and operating system of a client and server are not usually the same. Generally, their environment is heterogeneous and multivendor based. Client and server processes communicate through a well-defined set of standard application program interfaces (APIs) and Remote Procedure Calls (RPCs) (see Marshall, 2004), which enable smooth and interoperable data transfer.

C lient C lient C lient C lient S erver C lient

An important characteristic of a client-server system is scalability, and it provides for horizontal as well as vertical scaling. Horizontal scaling means adding or removing client workstations from the network. Vertical scaling means migrating to a larger and faster server machine or multiservers. Horizontal scaling has less impact on performance than vertical scaling.

Following are the typical servers employed in the architecture to serve specified clients.

File Servers: A repository of documents, images, engineering drawings and other

large data objects. With a file server, the client sends requests for files or file records over a network to the file server. This form of data service requires large bandwidth.

Database Servers: In database servers, clients send requests created by Struc-

tured Query Language (SQL) as messages to the server, and the results of the query are returned over the network. The SQL instructions are processed at the server level as the data are also available. Only the results are transferred to the client.

Transaction Servers: In transaction servers, clients invoke remote procedures

that reside on servers which may also contain an SQL database engine. The applications based on transaction servers are called Online Transaction Process- ing (OLTP) and tend to be mission-critical applications with response time of one to three seconds and require tight controls over the security and integrity of the database.

Groupware Servers: A server containing facilities to manage semi-structured

information such as text, images, mail, bulletin boards, and the flow of work.

Object Servers: A server for which the client-server applications are written as

different sets of communication objects, thereby client objects communicate with server objects using an Object Request Broker (ORB) (CORBA BASICS, 2003).

IRC Servers: An option for those seeking real-time discussion capabilities,

Internet Relay Chat (IRC) consists of various separate networks (or “nets”) of servers that allow users to connect to each other through an IRC network.

Proxy Servers: Proxy server is placed between a client program (typically a Web

browser) and an external server (typically another server on the Web) to filter requests, improve performance, and share connections in Web-based technology.

Web-based technology is an extension of client-server technology. This is similar to client-server technology and based on a request-response mechanism between clients and servers as shown in Figure 3.2.

Client machines employ browser interfaces such as Netscape Navigator or Internet Explorer to facilitate users to interact with servers. They also contain the presentation components like HTML pages. Clients manage local resources like monitor, keyboard, workstation, and CPU. It is not mandatory that all the client machines should have the same hardware environment.

Typical Web architecture involves Web Server, Application Server, and Database Server. All these servers could be employed in a single machine or established in different machines. There could be a presence of load balancer to distribute and balance the incoming load for Web servers.

Web servers act as interfaces between client and application servers. They understand customer usage patterns, build communities among members, and control access to application content and user information. The popular Web servers are Apache Tomcat Server (see Tomcat site, 2004) and Microsoft Internet Information Server (IIS) (see

Internet Information Services, 2004).

The application server acts as an interface between the Web server and the database server. The server side executables run at the application server. The popular application servers are Oracle 9i Application Server, BEA’s Web Logic, and IBM’s WebSphere (see Application Server Matrix, 2004).

Database servers provide storage space for all Web applications. Stand alone queries can run these database servers which help in maintaining the data properly. The popular databases are DB2 (see DB2 product family, 2004), Oracle (see Oracle, 2003), Sybase (see Sybase, 2003), and SQL Server (see SQL Server, 2004).

Difference Between Wired Client Server Technology and

Web Technology

Web is a relatively advanced and complex technology compared to wired client-server technology. So there is a significant difference between testing wired client-server and Web applications. Automated testing of wired client-server as well as Web applications is both an opportunity and a challenge.

In wired client-server applications, design uncertainties are greater: architecture is specific and customized; client is fixed; design must be client specific; drivers are custom specific. In Web applications, uncertainties are greater at run time: clients are unknown; client can use any browser or platform.

In wired client-server applications, both the client and the server are the critical items for testing. Fine-tuning needs to be done at both ends, even though network is not an issue,

C lient C lient C lient C lient C lient C lient Application

Server D atabaseServer W eb Server

farm

Table 3.0. Difference between client-server and Web technology

Wired Client–Server Technology Web-Based Technology

Number of clients is predictable or known

(normally less than 100 clients) Number of clients is difficult to predict (millions of clients) Client and server are the entities to be tested Client, server, and network are the entities to be

tested Both server and client locations are fixed and

known to the user Server location is certain; client locations are uncertain Designed and implemented on intranet

environment

Designed and implemented for Internet environment Server-to-server int eraction is prohibited Server-to-server int eraction is normal

Low multimedia type of data transaction Rich multimedia type of data transaction

as it is an intranet environment. In the case of Web-based applications, the network (Internet, routers, ISPs, etc.) is also to be tuned along with the server. Server side tuning is more complex, as multiple types of servers are involved (Web server, application servers, etc.). Each server exhibits its own properties Table 3.0 provides the major differences between the two technologies.

Both technologies are used for e-commerce applications based on customer require- ments.

Web Server and Application Server

Today’s business environment demands Web and e-commerce applications that accel- erate entry into new markets, help find new ways to reach and retain customers, and allow the introduction of new products and services quickly. To build and deploy these new solutions, we need a proven, reliable e-commerce platform that can connect and empower all types of users while integrating corporate data, mainframe applications, and other enterprise applications in a powerful, flexible, end-to-end e-commerce solution. The solution must provide the performance, scalability, and high availability needed to handle the most critical enterprise applications. A good Web and application server environment provides suitable solutions.

Web Server

A Web server is a server that serves pages for viewing in a Web browser. A Web server typically communicates through HTTP protocol. When the Web server receives an HTTP request, the server responds by sending back an HTML page. When a request comes to the Web server, the Web server simply passes the request to the concerned program. The Web servers do not provide any functionality beyond simply providing an environment in which the server side program can execute and pass back the generated responses.

The server side programs usually provide functions such as transaction processing, database connectivity, and messaging. To process a request, a Web server may respond with a static HTML page or image, send a redirect, or delegate the dynamic response generation to some other program such as Common Gateway Interface (CGI) scripts, Java Server Pages (JSP), Servlets, ASPs (Active Server Pages), or some other server side technology. Such server side programs generate a response, most often in HTML, for viewing in a Web browser.

While a Web server may not support transactions or database connection pooling, it may employ various strategies for fault tolerance and scalability such as load balancing, caching, and clustering features often present in application servers. Most of the servers provide these functions.

Microsoft Internet Information Server (IIS)

MS IIS for Windows is designed for users developing a Web service. IIS replaces the former default Web service, the MS Personal Web Service (PWS), on home and professional versions of Windows (see Information Server Overview and Architecture, 2005). IIS runs in Windows XP, Windows Server OS like Microsoft Windows NT, and Microsoft Windows 2000 series.

As there is an explosive growth of the Internet and an increasing interest in the usage of TCP/IP based information protocols. The software components of IIS are mostly contained in the Application Layer of TCP/IP. The Inetinfo.exe process is the main IIS process; all of the other Internet processes run inside the memory allocated by this process by default. However, it is possible to separate processes from the Inetinfo.exe memory space via the Internet Service Manager as show in Figure 3.3.

Infocomm.dll and Isatq.dll run inside the Inetinfo.exe space and provide many essential services for all the Internet server processes. For example, Infocom.dll provides security, SSL authentication, and caching services. The Isatq.dll (Internet Server Asynchronous Thread Queue Dynamic Link Library) provides TCP port monitoring, bandwidth throt- tling, and thread queue management services for the Internet server.

Several other services run inside the memory space of the Inetinfo.exe process. They are HTTP, SMTP, NNTP, and FTP services. In addition, the Internet server administration (Isadmin) process runs in the application layer, providing an interface for the adminis- tration of the Internet services. Isadmin includes the Distributed Component Object Model (DCOM) facility for the metabase, which allows remote management of the Internet server via command-line scripts.

Internet Server Application Programming Interface (ISAPI) extensions, ISAPI filters, and Common Gateway Interface (CGI) scripts run via the Web (HTTP) service. ISAPI and CGI scripts provide services (and a scripting interface) to animate and automate Web pages. In addition, these scripts can implement additional security measures for the Web server or individual Web pages. We cover scripts in greater detail in later sections.

The interface to the rest of the TCP/IP stack is the Windows Sockets Layer, which is a programming interface separating the protocol from the Internet server applications. Just below the Windows Sockets is the Transport Layer. Inside the Transport Layer is TCP,

which provides reliable data transmission services for the Internet server. All IIS 4.0 applications send their communications over TCP. The Internet Layer houses the IP, which provides the addressing scheme for communications on the Internet or the internal network. The bottom layer of TCP/IP is the Network Interface Layer, which includes both the hardware and software responsible for transmitting the data to the wire or electronic transfer medium.

For more information on IIS, see http://microsoft.com/iis.

Apache Web Server

In the early days of the Web, the National Center for Super Computing Applications (NCSA) created a Web server that became the number one Web server in early 1995. However, the primary developer of the NCSA Web server left NCSA about the same time, and the server project began to stall. In the meantime, people who were using the NCSA Web server began to exchange their own patches for the server and soon realized that a forum to manage the patches was necessary. The Apache Group was born. The group used the NCSA Web server code and gave birth to a new Web server called Apache. Originally derived from the core code of the NCSA Web server and a bunch of patches, the Apache server is now the talk of the Web server community (see Apache: The number

one Web server, 2005). Figure 3.3. IIS architecture

Some of the Apache features are:

Apache not only runs on most flavors of Unix, but it also runs on Windows 2000/ NT/9x and many other desktop and server-class operating systems such as Amiga OS 3.x and OS/2;

Support for the latest HTTP 1.1 protocol;

Support for CGI (Common Gateway Interface);

Support for HTTP authentication;

Support for PHP scripting;

Java Servlet support;

Integrated Proxy server;

Support for Server-Side Includes (SSI);

Support for Secured Socket Layer (SSL).

For more information, see http://apache.org.

These Web servers are popular and provide optimal solutions for Web-based application development.

Application Server

While a Web server mainly deals with sending HTML for display in a Web browser, an application server provides access to business logic by client application programs. Application servers provide the platforms for the execution of transactional, server-side applications in the online world. They are the modern cousins of traditional Transaction Processing Monitors (TPMs) like CICS. Application servers play a central role in enabling electronic commerce in the Web context. They are built on the basis of more standardized protocols and APIs than were the traditional TPMs. The emergence of Java, XML, and OMG standards has played a significant role in this regard. One of the most important features of application servers is their ability to integrate the modern applica- tion environments with legacy data sources like IMS, CICS, VSAM, and so forth. They provide a number of connectors for this purpose, typically using asynchronous trans- actional messaging technologies like MQ Series and JMS. Traditional TPM-style requirements for industrial strength features like scalability, availability, reliability, and high performance are equally important for application servers also. Security and authentication issues are additional important requirements in the web context. Appli- cation servers support DBMS not only as storage engines for user data but also as repositories for tracking their own state.

An application server (see Application Server Matrix, 2004) exposes business logic to client applications through various protocols, possibly including HTTP. The application

program in turn uses this logic in the same way, as it would call a method or a function. This function does not say anything about display or how the client must use the information. Such application server clients can include GUIs (Graphical User Interface) running on a PC, a Web server, or even other application servers. The information traveling back and forth between an application server and its client is not restricted to simple display markup. Instead, the information could be any program logic. Since the logic takes the form of data and method calls and not static HTML, the client can employ the exposed business logic.

In most cases, the server exposes this business logic through a component Application Program Interface (API), such as the Enterprise Java Bean (EJB) component model found on J2EE (Java 2 Enterprise Edition) application servers. Moreover, the application server manages its own resources. Such gate-keeping duties include security, transaction processing, and resource pooling and messaging. Like a Web server, an application server may also employ various scalability and fault-tolerance techniques. Some of the popular application servers are:

Web Logic Application Server (BEA)

Web Logic from BEA (see BEA Weblogic platform, 2004) works at the middle tier with client tier at front end and supported with DBMS, enterprise application, and mainframe applications as backend tier. The client tier is supported with Web browser, java client, and so on. Web logic is an industry leading e-commerce transaction platform. It allows the practitioners to quickly develop and deploy reliable, secure, scalable, and manage- able applications. It manages system level details so that application developer can concentrate on business logic and presentation.

WebSphere® Application Server

WebSphere® Application Server from IBM (see IBM WebSphere, 2004) is the industry’s premier Java™ based application platform, integrating enterprise data and transactions for the dynamic e-business world. Each configuration (version V6.0 and above) available delivers a rich application deployment environment with application services that provide enhanced capabilities for transaction management as well as the security, performance, availability, connectivity, and scalability expected from the WebSphere family of products.

It provides full J2EE V1.4 compatibility as well as Web services support. It also provides rapid development and deployment features that reduce development cycle time and maximize the ability to use existing skills and resources.

Oracle9i Application Server

Oracle9i Application Server (see Oracle Application Server, 2004) makes it easy to consolidate multiple Web sites and applications into portals. It provides performance

enhancing caching technology for turbo-charging Web sites. There are two types of caching in the new application server namely:

Web Caching: Web caching allows site managers to store frequently accessed

static and dynamic pages in a buffer in front of the application server, reducing response times. It also provides load-balancing and a patent-pending surge- protection feature to ensure reliability and performance during peak site activity.