The N-Tier Architecture

Problem

The Client-Server Architecture is the most popular design for distributed applications. As these applications became more complicated too many responsibilities were being assigned to the client or the server. This made these subsystems inefficient and less reusable.

Solution

We can combine the Layered Architecture with the Client-Server Architecture. Layers are called tiers in this context. Each tier runs as a separate program, possibly on different machines. The layers can communicate using standard protocols such as RMI, SOAP, HTTP, TCP/IP, etc.

Structure

The most common N-Tier Architecture is the Three-Tier Architecture:

Notice that this can be viewed as a variation of the Model-View-Control Architecture in which the role of the model is played by the database server, the role of the control is played by the application server, and the role of the view is played by the client.

Behavior

Discussion

A popular variation is the 3.5-Tier Architecture: