Architectural characteristics of web-based applications

Some web-based 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 typically 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. Alternatively, an intermediate firewall can separate the web server from 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, and another database server on tier four is the data source for a database server on tier three.

If you survey all the web applications that are available today, you would find many variations. For example, the database servers can run on various platforms, as can the clients. Designers of web applications use various 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 different from the puzzles 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 XP 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. The following figure shows the two-tier connectivity between a workstation-based client and both types of servers.

Figure 1. Two-tier connectivity between a workstation-based client and different database servers
Begin figure description. This figure shows two-tier connectivity between a workstation-based client and different database servers. End figure description.

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.

The following figure 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, EJB, and web services). Each of these components performs functions that support client applications.

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 that is produced by JSPs, servlets, and other components that run in a WebSphere Application Server environment. The JSPs or servlets can use JDBC, SQLJ, or EJB (indirectly) to access data at a Db2 database server on the third tier.

Figure 2. n-tier connectivity with a workstation-based client, two web servers, and different database servers
Begin figure description. This figure shows n-tier connectivity with a workstation-based client, two web servers, and different database servers. End figure description.