Multitier architecture

The layered architecture (also layered model layers or patterns ) is a commonly used principle for structuring the architecture of software systems. This individual aspects of the software system conceptually a layer (german animal or layer) are assigned. The allowed dependency relationships between the aspects are restricted to the extent in a layered architecture that aspects of a "higher" layer may only use such " deeper " layers. A system with a layered architecture is also referred to as multi-layered.

The layers associated aspects can thereby be functionalities, components, or classes, for example, depending on the nature of the system or level of detail of the analysis.

  • 4.1 Presentation layer
  • 4.2 Control layer
  • 4.3 Business logic layer
  • 4.4 Data access layer
  • 5.1 -layer model for operating systems

Classifications

In a strict layered architecture ( engl. strict layering) may no layers are skipped. This is not the case in all implementations of layered architectures, then it leads to a higher degree of coupling between the layers (English loose layering).

Often layered architectures can be divided by the number of layers used. In various application systems use case -based layered architectures are commonly used.

Pros and Cons

Through a layered architecture, the complexity of the dependency is reduced in the system and thus reaches a lower link and an improvement in cohesion of the individual layers. In particular, be avoided in the dependency graph through it cycles. This has benefits both for the understanding of and for the maintenance of the system.

A disadvantage of a layered model may be that the speed of execution of the application is written to the reduced by the transmission and transformation of the data through a shift codes. This is noticeable especially in the parts of the application, the case for which the data would be structurally better suited to deeper layers than in layers to which they may access. A prominent example of this are reports that represent aggregates of data, such as totals or averages. In these cases is often dispensed at said application parts in favor of speed of execution of the advantages of the architecture layers.

Layered architectures according to the number of layers

Two - tier architecture

The two-layered architecture (english two tier architecture ) consists of two layers. Since only allowed to access higher to the lower layer, the lower layer is a service provider (german server) higher. One speaks therefore often of a client -server architecture.

Client- server architectures need not necessarily be realized by means of different computers, but the client may also be understood as a software module which accesses a second software module on the same machine, generally within the same application. However, given the example in the figure uses a computer -side client-server architecture.

When architectures, as shown in the figure, the computational capacity is largely outsourced to the client machine in order to relieve the server. Traditionally, comes a fat client and a fat server to use. On the server, a database application is running. The clients take over the logic and the presentation of the user interface.

Three-tier architecture

The three-layer architecture (English three tier architecture ) is an architecture, the software side has three layers. In contrast to the two-layer architecture still exists in the three-tier architecture, an additional layer, often the logic layer, which performs the data processing.

A typical three-tier architecture consists of the following layers:

  • Presentation tier (client tier) - This refers, also front-end, is responsible for the representation of the data, user input, and the user interface.
  • Logic layer (application server tier, business layer, middle tier or enterprise animal ) - It includes all processing mechanisms. Here, the application logic is united.
  • Data management layer ( data-server tier, back end ) - it contains the database and is responsible for saving and loading data.

Three-tier architectures in distributed systems

Multilayer system architectures, such as the three-layer architecture scales well because the individual layers are separated from each other logically. So can run the data layer on a central database server, for example in distributed system architectures, the logic layer on workgroup servers, and the presentation layer is located on the respective user's workstation. An example of a distributed three-tier architecture is Citrix: Interaction: Client; Function: Citrix server; Data: database server.

As the chart shows, there is between the client and server are different ways to distribute the layers. Basically, the higher (closer to the presentation layer), the layer is, the more likely it will be processed by a client. The deeper (closer to the data layer ), the layer is, the more likely it is the task of a server.

Three-tier architectures within software systems

The architecture can be implemented even within a software system by, assigned to the individual layers of the software modules, which are responsible for presentation, application logic and persistent storage of data and are in accordance with the classification layers decoupled. In addition to a structured according to the Model -View-Controller architectural pattern, such a three- layer architecture is usually considered to be the minimum level of architectural structuring, unless there are compelling reasons for other architectural decisions.

Further layers

In addition to the layers above other partitions are used in different sources. Basic, a layered architecture an architectural pattern that is not limited as to the type and number of its layers. Very often found in software systems as well as for distributed applications, the following layers:

Further details on the individual layers are described in section Classical layers within a layered architecture. An example of an architecture with seven layers provides the OSI reference model, which is shown in the right figure.

Classical layers within a multi-tier architecture

Presentation layer

The presentation layer (german client layer or presentation layer) is responsible for the presentation and acceptance of the software processed data, as well as the functions provided by the software responsible.

In distributed systems exist for the display of the content of two alternatives:

  • You bet on the web browser as a thin client and provides the contents and forms in XHTML, XML, JavaScript, and other for the World Wide Web is created languages ​​, so use a classic " web application ". Communication with deeper layers is usually over HTTP.
  • It produces its own graphical user interface as a fat client. This uses the advanced display options of the programming language or graphics library used for this purpose such as Flash, Java Swing or XAML. This communicates with the application layer network protocols, such as SOAP, Java RMI, or Microsoft. NET remoting.

Control layer

The control layer (process layer) is the coordination of several professional delimited parts of the business logic layer.

For example, in a service-oriented architecture, the Accounting orchestration. In the control layer is often also responsible for transaction control.

Business logic layer

The business logic layer ( also application layer, business logic layer, domain layer, application layer or middle tier ) realized the real business model by the business objects involved in the business model be implemented with the associated logic.

Data Access Layer

The data access layer encapsulates access to persistent data and the techniques used.

For the persistent storage of databases are often used, but other systems and normal files may be used.

When using databases of direct access to the DBMS (Database Management System) for data exchange with the data access layer database interfaces and alternative uses (eg PHP). When using object-oriented programming in conjunction with a relational DBMS an object- relational mapping (object - relational mapping, ORM ) is required in the data access layer, which is often implemented through the use of ORM frameworks.

Further applications of layered architectures

Layer model for operating systems

A layer model, also called the shell model, is one of three main architectural models of operating systems. In addition to the monolithic kernel and microkernel, there is the layer model. In the layer model the various operating system components such as shells are built on each other. This is also seen in the adjacent figure.

The transitions between the layers are formed of interfaces, the transitions must be clean, there are no jumps (eg by an application program directly into the data structure). Communication takes place via the interfaces of each intermediate layer.

Generally speaking, the closer a layer on the hardware, the more privileged is this regarding read and write permissions. The transition from kernel mode to user mode may be difficult to distinguish under certain circumstances.

  • See also: Ring (CPU)

Traceability

An end-to- end tracking of communication between the individual layers is becoming increasingly important in complex systems and can be implemented by the Application Response Measurement standard means of correlated transactions of each layer.

12163
de