The Interaction between Three-Tier Client/Server Model and Three-Tier Application Architecture Model

Posted on DotNetBlocks See other posts from DotNetBlocks
Published on Sun, 12 Dec 2010 12:57:00 -0500 Indexed on 2010/12/13 4:05 UTC
Read the original article Hit count: 795

The three-tier client/server model is a network architectural approach currently used in modern networking. This approach divides a network in to three distinct components.

Three-Tier Client/Server Model Components

  • Client Component
  • Server Component
  • Database Component

The Client Component of the network typically represents any device on the network. A basic example of this would be computer or another network/web enabled devices that are connected to a network. Network clients request resources on the network, and are usually equipped with a user interface for the presentation of the data returned from the Server Component. This process is done through the use of various software clients, and example of this can be seen through the use of a web browser client. The web browser request information from the Server Component located on the network and then renders the results for the user to process.

The Server Components of the network return data based on specific client request back to the requesting client.  Server Components also inherit the attributes of a Client Component in that they are a device on the network and that they can also request information from other Server Components. However what differentiates a Client Component from a Server Component is that a Server Component response to requests from devices on the network. An example of a Server Component can be seen in a web server. A web server listens for new requests and then interprets the request, processes the web pages, and then returns the processed data back to the web browser client so that it may render the data for the user to interpret.

The Database Component of the network returns unprocessed data from databases or other resources. This component also inherits attributes from the Server Component in that it is a device on a network, it can request information from other server components and database components, and it also listens for new requests so that it can return data when needed.

The three-tier client/server model is very similar to the three-tier application architecture model, and in fact the layers can be mapped to one another.

Three-Tier Application Architecture Model

  • Presentation Layer/Logic
  • Business Layer/Logic
  • Data Layer/Logic

The Presentation Layer including its underlying logic is very similar to the Client Component of the three-tiered model. The Presentation Layer focuses on interpreting the data returned by the Business Layer as well as presents the data back to the user.  Both the Presentation Layer and the Client Component focus primarily on the user and their experience. This allows for segments of the Business Layer to be distributable and interchangeable because the Presentation Layer is not directly integrated in with Business Layer. The Presentation Layer does not care where the data comes from as long as it is in the proper format. This allows for the Presentation Layer and Business Layer to be stored on one or more different servers so that it can provide a higher availability to clients requesting data. A good example of this is a web site that uses load balancing. When a web site decides to take on the task of load balancing they must obtain a network device that sits in front of a one or machines in order to distribute the request across multiple servers. When a user comes in through the load balanced device they are redirected to a specific server based on a few factors.

Common Load Balancing Factors

  • Current Server Availability
  • Current Server Response Time
  • Current Server Priority

The Business Layer and corresponding logic are business rules applied to data prior to it being sent to the Presentation Layer. These rules are used to manipulate the data coming from the Data Access Layer, in addition to validating any data prior to being stored in the Data Access Layer. A good example of this would be when a user is trying to create multiple accounts under one email address. The Business Layer logic can prevent duplicate accounts by enforcing a unique email for every new account before the data is even stored in the Data Access Layer. The Server Component can be directly tied to this layer in that the server typically stores and process the Business Layer before it is returned to the end-user via the Presentation Layer. In addition the Server Component can also run automated process through the Business Layer on the data in the Data Access Layer so that additional business analysis can be derived from the data that has been already collected.

The Data Layer and its logic are responsible for storing information so that it can be easily retrieved. Typical in most modern applications data is stored in a database management system however data can also be in the form of files stored on a file server. In addition a database can take on one of several forms.

Common Database Formats

  • XML File
  • Pipe Delimited File
  • Tab Delimited File
  • Comma Delimited File (CSV)
  • Plain Text File
  • Microsoft Access
  • Microsoft SQL Server
  • MySql
  • Oracle
  • Sybase

The Database component of the Networking model can be directly tied to the Data Layer because this is where the Data Layer obtains the data to return back the Business Layer. The Database Component basically allows for a place on the network to store data for future use. This enables applications to save data when they can and then quickly recall the saved data as needed so that the application does not have to worry about storing the data in memory. This prevents overhead that could be created when an application must retain all data in memory.

As you can see the Three-Tier Client/Server Networking Model and the Three-Tiered Application Architecture Model rely very heavily on one another to function especially if different aspects of an application are distributed across an entire network. The use of various servers and database servers are wonderful when an application has a need to distribute work across the network.

Network Components and Application Layers Interaction

  • Database components will store all data needed for the Data Access Layer to manipulate and return to the Business Layer
  • Server Component executes the Business Layer that manipulates data so that it can be returned to the Presentation Layer
  • Client Component hosts the Presentation Layer that  interprets the data and present it to the user

© DotNetBlocks or respective owner

Related posts about Application Architecture

Related posts about Network Infrastructure