Architectural Partitioning  «Prev  Next»
Lesson 3Two-tier Architecture
ObjectiveDescribe the architectural layering in a two-tier approach.

Two-tier Architecture versus Client-Server

The industry has tended to use the phrase two-tier[1] rather than client-server[2] because client-server refers more to a style of communication than to the architecture itself. The client-server style of communication can be applied to any pair of entities, even entities as small as individual objects. In fact, the same object could function as a client in relation to one object and as a server to another object. This possibility will become even more apparent as you learn about three-tier and n-tier architectures
  • Client-Server Model:
    The client-server model of computing is a distributed application structure that partitions tasks between the providers of a resource called servers, and service requesters called clients. Often clients and servers communicate over a computer network on separate hardware, but both client and server may reside in the same system. A server host runs one or more server programs which share their resources with clients. A client does not share any of its resources, but requests a server's content or service function. Clients therefore initiate communication sessions with servers which await incoming requests.
    The client/server software architecture describes the partitioning of an application into software processes. In this environment, clients and servers are seen as software processes rather than computers. These processes may reside on the same computer or may be distributed across a network of computers. The client/server application can be viewed as a set of programming modules sharing resources to solve a problem. This module discusses the client/server software architecture from a historical perspective. A client shall refer to a software process that requests services from other software processes and a server shall refer to a software process that provides services to other software processes. Review of three common client/server classification methodologies.
    1. The first methodology classifies a client/server application based on the computational role of the constituent processes. In particular, how an application distributes its presentation, application processing, and data services determines how the application is classified.
    2. The second methodology classifies an application based on the number of constituent processes; this is known as the tier-based classification.
    3. Finally, a server-based classification methodology is presented; it describes a client/server application in terms of the server process utility.


Domain Driven Design

Two-Tier Architecture

The term two-tier architecture describes an architecture that consists of remote PC-based applications and large corporate legacy systems. The client applications running on remote PCs have evolved to handle more and more of the processing, and the legacy systems running on the mainframes have primarily become transaction managers and database access services.
Two Tier
Presentation, Logic, Data

Lessons learned from two-tier Architectures:
When developers partitioned systems in a two-tier arrangement they learned some very important things. They learned that functionally different system responsibilities can be isolated and managed independently. What they had done, essentially, was split the spectrum of responsibilities somewhere between the areas of data and logic, assigning each responsibility to entirely different technological environments.
Presentation, Logic, Data
Presentation, Logic, Data

Split the Existing System

Developers also learned that every time they split the system they had to provide a new way for the separate pieces to communicate.
Communication Partition
Communication Partition

  • Cohesion and Coupling
    The key to simple partitioning is deciding precisely what responsibilities will be assigned to each partition. The basis for this decision is found in the principles of high cohesion and loose coupling. High cohesion stresses the need to have a single, very clear purpose for each partition. Loose coupling stresses the importance of reducing the dependencies between the partitions as much as possible. Now the principles of cohesion and coupling are being applied to entire blocks of functionality within systems and not just to program modules. This practice has opened the door to further partitioning and specialization following a simple pattern:
    1. Separate
    2. Assign specific responsibility.
    3. Re-establish communication through an interface.

    View the Image below to see an example of simple partitioning.
    Original Spectrum of system behaviors: 1) Separate the system behaviors, 2) Assign the system behaviors to different partitions, 3) Re-establish communication between the 2 new partitions
    Original Spectrum of system behaviors: 1) Separate the system behaviors, 2) Assign the system behaviors to different partitions, 3) Re-establish communication between the 2 new partitions

Systems Analysis Design

Two Tier Architecture - Quiz

Click the Quiz link below to test your knowledge of architectural partitioning.
Two Tier Architecture - Quiz

[1] A two-tier client/server: A two-tier client/server is a type of multi-tier computing architecture in which an entire application is distributed as two distinct layers or tiers. It divides the 1) application logic, 2) data and 3) processing between client and server devices.
[2] Client-server communication simply means that one object, the client initiates all actions between the two, and another object, while the server responds.

SEMrush Software