Web application environment

Web-based applications run on a Web application server and access data on an enterprise information system, such as a DB2 database server. The components of Web-based applications are spread across multiple tiers, or layers. In general, the user interface is on the first tier, the application programs are on the middle tier, and the data sources that are available to the application programs are on the enterprise information system tier. Developing Web-based applications across a multitiered architecture is referred to as server-side programming.

Writing server-side programs is complicated and requires a detailed understanding of Web server interfaces. Fortunately, application servers, such as WebSphere Application Server, are available to simplify this task. Each of these application servers defines a development environment for Web applications and provides a run-time environment in which the Web applications can execute. The application server code, which provides the run-time environment, supports the appropriate interface for interacting with the Web server. With application servers, you can write programs for the application server's run-time environment. Developers of these programs can focus on the business logic of the Web application rather than on making the application work with a Web server.

The following sections describe the various components and architectural characteristics of Web applications and the role that DB2 plays in the Web application environment.

Components of Web-based applications

All Web-based database applications have three primary components:

  • Web browser (or client)

  • Web application server

  • Database server

Web-based database applications rely on a database server, which provides the data for the application. The database server sometimes also provides business logic in the form of stored procedures. Stored procedures can offer significant performance advantages, especially in a multitiered architecture. In addition to database servers, other enterprise information system components include IMS databases, WebSphere MQ messages, and CICS records.

The clients handle the presentation logic, which controls the way in which users interact with the application. In some cases, the client validates user-provided input. Web applications sometimes integrate Java applets into the client-side logic to improve the presentation layer.

Applet

A Java program that is part of an Hypertext Markup Language (HTML) page. (HTML is the standard method for presenting Web data to users.) Applets work with Java-enabled browsers, such as Internet Explorer; they are loaded when the HTML page is processed.

Web application servers manage the business logic. The business logic, typically written in Java, supports multitiered applications. The Web application server can manage requests from a variety of remote clients. The Web application layer might include JavaServer Pages (JSP) files, Java servlets, Enterprise JavaBeans (EJB) components, or Web Services.

JSP

A technology that provides a consistent way to extend Web server functionality and create dynamic Web content. The Web applications that you develop with JSP technology are server and platform independent.

Servlet

A Java program that responds to client requests and generates responses dynamically.

EJB

A component architecture for building distributed applications with the Java programming model. Server transactional components are reusable and provide portability across application servers.

Web services

Self-contained, modular applications that provide an interface between the provider and the consumer of application resources. You can read more about Web services later in this chapter.

Architectural characteristics of Web-based applications

Some applications use a two-tier architecture, and others use an n-tier architecture that consists of three or more tiers.

Two-tier architecture

In a two-tier architecture, the client is on the first tier. The database server and Web application server reside on the same server machine, which is the second tier. This second tier serves the data and executes the business logic for the Web application. Organizations that favor this architecture usually prefer to consolidate their application capabilities and database server capabilities on a single tier. The second tier is responsible for providing the availability, scalability, and performance characteristics for the organization's Web environment.

n-tier architecture

In an n-tier architecture, application objects are distributed across multiple logical tiers, typically three or four.

In a three-tier architecture, the database server does not share a server machine with the Web application server. The client is on the first tier, as it is in a two-tier architecture. On the third tier, the database server serves the data. For performance reasons, the database server typically uses stored procedures to handle some of the business logic. The application server resides on the second tier. The application server handles the portion of the business logic that does not require the functionality that the database server provides. In this approach, hardware and software components of the second and third tiers share responsibility for the availability, scalability, and performance characteristics of the Web environment.

In a four-tier architecture, more than one logical tier can exist within the middle tier or within the enterprise information system tier. For example:

  • The middle tier might consist of more than one Web server.Or an intermediate firewall can separate the Web server and the application server in the middle tier.

  • A database server on tier three can be the data source for a Web server on the middle tier, while another database server on tier four is the data source for a database server on tier three.

If you surveyed all the Web applications that are available today, you would find many variations. For example, the database servers can run on a variety of platforms, as can the clients. Designers of Web applications use a variety of tools, which affect how the applications work and how they look. Different companies choose different tools. The puzzle pieces that comprise one company's puzzles end up being very different from those of other companies.

In many cases, the client and server for a Web application are on different operating systems. The client, for example, can be on a workstation-based operating system, such as Windows 2000 or UNIX. The server for the application can also be on a workstation-based server, or it can be on an enterprise server, such as z/OS. Figure 10.2 shows the two-tier connectivity between a workstation-based client and both types of servers.

Figure 10.2. Two-tier connectivity between a workstation-based client and different database servers


The browser uses Hypertext Transfer Protocol (HTTP) to forward user requests to a second-tier server machine. (HTTP is a communication protocol that the Web uses.) The Web server on the second tier invokes the local database server to satisfy the data requirements of the application.

Figure 10.3 illustrates the use of an n-tier architecture. In this example, two Web servers are installed on the middle tier: an HTTP server, such as the IBM HTTP Server, and a Web application server, such as WebSphere Application Server. The application server supports the various components that might be running on the middle tier (JSP files, servlets, EJBs, and Web services). Each of these components perform functions that support client applications.

Figure 10.3. n-tier connectivity with a workstation-based client, two Web servers, and different database servers


In the WebSphere Application Server environment, a device on tier one, such as a browser, can use HTTP to access the HTTP server on the middle tier. The HTTP server can then render output produced by JSPs, servlets, and other components running in a WebSphere Application Server environment. The JSPs or servlets can use JDBC, SQLJ, or EJBs (indirectly) to access data at a DB2 database server on the third tier.

Benefits of DB2 UDB for z/OS server

For each type of architecture, DB2 UDB for z/OS offers a robust solution for Web applications. Specifically, using DB2 UDB for z/OS as a database server for a Web application provides the following advantages:

  • Exceptional scalability. The volume of transactions on any Web application varies. Transaction loads increase, or spike, at different times of the day, on different days of the month, or at different times of the year. Transaction loads also tend to increase over time. In a Parallel Sysplex environment, DB2 UDB for z/OS can handle the full range of transaction loads with little or no impact on performance. Any individual user is generally unaware of how busy the system is at a given point in time.

  • High degree of availability. When DB2 UDB for z/OS runs in a Parallel Sysplex environment, the availability of data and applications is high. If one DB2 subsystem is unavailable, for example, because of maintenance, other DB2 subsystems in the Sysplex take over the workload. Users are unaware that part of the system is unavailable because they have access to the data and applications that they need.

  • Ability to manage a mixed workload. DB2 UDB for z/OS effectively and efficiently manages priorities of a mixed workload as a result of its tight integration with z/OS Workload Manager.

  • Protection of data integrity. Users of DB2 UDB for z/OS can benefit from the product's well-known strength in the areas of security and reliability.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.70.60