N-Tier Applications

N-Tier Applications
--

N-Tier application architecture is the pattern that separates concerns of your systems into a layer of systems.  For example, the most common N-Tier application is a three tier application, which consists of the presentation layer, the domain layer, and data layer.

The Layers

Presentation Layer - The layer of your system that interacts directly with the user. In web projects this is will usually be some sort of javascript framework such as Angular, React, or many others.

Application Layer - The layer that encapsulates all your business logic, domain concepts, and interacts with the data layer. In mos web projects, this will usually consist of an HTTP server such as IIS or Apache, and RESTful endpoints such Web API, Spring, or Express.

Data Layer - The layer that stores and managers the application data. Popular data stores can be sql or nosql based, such as SQL Server, MYSQL, MongoDB, Cassanda.

The advantage of N-Tier applications is that it emphasizes separation of concerns, and promotes flexibility of design and maintenance.

Advantages

Scalability - Be separating out your system into smaller components, you can scale individual components as needed. For example if your system relies heavily on your database, you can choose to scale out the database component, without having to scale out your entire vertical.

Finer control over the system - As you have multiple systems, you can configure each system to fit it's individual needs.

Better fault tolerance - As part of separating out your systems, we have better tooling to deal with how different systems need to be built to include more fault tolerance. Databases can be replicated, and web servers can be load balanced.

Independent tier updates - You can update only the necessary parts of a system while keeping components that don't need any changes stable.

Friendly and efficient for development - Separating out the components make each project's boundaries more distinct, and it allows you to group relevant code together.

Comments

Popular posts from this blog

Uncle Bob's Clean Architecture

C4 Model: Describing Software Architecture

Running RabbitMQ with Docker