When using an n-tiered architecture, where does the application logic reside?

A 3-tier application architecture is a modular client-server architecture that consists of a presentation tier, an application tier and a data tier. The data tier stores information, the application tier handles logic and the presentation tier is a graphical user interface (GUI) that communicates with the other two tiers. The three tiers are logical, not physical, and may or may not run on the same physical server.

The logical tiers of a 3-tier application architecture

Three-tier architecture

Presentation tier: This tier, which is built with HTML5, cascading style sheets (CSS) and JavaScript, is deployed to a computing device through a web browser or a web-based application. The presentation tier communicates with the other tiers through application program interface (API) calls.

Application tier: The application tier, which may also be referred to as the logic tier, is written in a programming language such as Java and contains the business logic that supports the application's core functions. The underlying application tier can either be hosted on distributed servers in the cloud or on a dedicated in-house server, depending on how much processing power the application requires.

Data tier: The data tier consists of a database and a program for managing read and write access to a database. This tier may also be referred to as the storage tier and can be hosted on-premises or in the cloud. Popular database systems for managing read/write access include MySQL, PostgreSQL, Microsoft SQL Server and MongoDB.

Benefits of a 3-tier app architecture

The benefits of using a 3-tier architecture include improved horizontal scalability, performance and availability. With three tiers, each part can be developed concurrently by a different team of programmers coding in different languages from the other tier developers. Because the programming for a tier can be changed or relocated without affecting the other tiers, the 3-tier model makes it easier for an enterprise or software packager to continually evolve an application as new needs and opportunities arise. Existing applications or critical parts can be permanently or temporarily retained and encapsulated within the new tier of which it becomes a component.

3-tier application programs may also be referred to as n-tier programs. In this context, the letter n stands for "a number of tiers."

When we technology recruiters get a Job Description, we are told that the hiring manager is looking for an architect who is proficient in n-tier architecture or multitier architecture. But what do these terms actually mean? In this article, we will try to understand some basic concepts behind this popular and modern architectural practice. To explain the concepts of mutitier architecture (which is also called n-tire architecture), let us start with understanding Client-Server Relationship.

In computing, a client is a piece of computer hardware or software that accesses a service made available by a server as part of the client–server model of computer networks. The server is often (but not always) on another computer system, in which case the client accesses the service by way of a network. A client can be any device – a computer, a tablet or a mobile.

Therefore, Client-server denotes a relationship between cooperating programs in an application, composed of clients initiating requests for services and servers providing that function or service. There are 3 main categories of client-server computing:

One-Tier Architecture consists of a simple program running on a single computer without requiring access to the network. User requests don’t manage any network protocols, therefore the code is simple and the network is relieved of the extra traffic.  

Two-Tier Architecture consists of the client, the server, and the protocol that links the two tiers. The Graphical User Interface code resides on the client host and the domain logic resides on the server host. Domain logic or business logic is the part of the program that encodes the real-world business rules that determine how data can be created, stored, and changed. Business logic should be distinguished from business rules. Business logic is the portion of an enterprise system which determines how data is transformed or calculated, and how it is routed to people or software (workflow). Business rules are formal expressions of business policy. Anything that is a process or procedure is business logic, and anything that is neither a process nor a procedure is a business rule. For example, welcoming a new visitor is a process (workflow) consisting of steps to be taken, whereas saying every new visitor must be welcomed is a business rule. Further, business logic is procedural whereas business rules are declarative.

Multi-Tier Architecture (often referred to as n-tier architecture) or multilayered architecture is a client–server architecture in which presentation, application processing and data management functions are physically separated. The most widespread use of multitier architecture is the three-tier architecture.

Three-tier architecture is a client-server software architecture pattern in which the user interface (presentation tier), functional process logic (logic or application tier), computer data storage and data access (data tier) are developed and maintained as independent modules, most often on separate platforms.

The presentation tier is the front end layer in the 3-tier system and consists of the user interface. This user interface is often a graphical one accessible through a web browser or web-based application and which displays content and information useful to an end user. This tier is often built on web technologies such as HTML5, JavaScript, CSS, or through other popular web development frameworks, and communicates with others layers through API calls. An application program interface (API) is code that allows two software programs to communicate with each other.

The logic or application tier contains the functional business logic which drives an application’s core capabilities. The logical tier is pulled out from the presentation tier and, as its own layer, it controls an application’s functionality by performing detailed processing. It’s often written in Java, .NET, C#, Python, C++, etc.

The data tier comprises of the database/data storage system and data access layer. Examples of such database

systems are MySQL, Oracle, PostgreSQL, Microsoft SQL Server, MongoDB, etc. Data is accessed by the application layer via API calls.

The typical structure for a 3-tier architecture deployment would have the presentation tier deployed to a desktop, laptop, tablet or mobile device either via a web browser or a web-based application utilizing a web server. The underlying application tier is usually hosted on one or more application servers, but can also be hosted in the cloud, or on a dedicated workstation depending on the complexity and processing power needed by the application. And the data layer would normally comprise of one or more relational databases, big data sources, or other types of database systems hosted either on-premises or in the cloud.

A simple example of a 3-tier architecture in action would be logging into a media account such as Netflix and watching a video. You start by logging in either via the web or via a mobile application. Once you’ve logged in you might access a specific video through the Netflix interface which is the presentation tier used by you as an end user. Once you’ve selected a video that information is passed on to the application tier which will query the data tier to call the information or in this case a video back up to the presentation tier. This happens every time you access a video from most media sites.

So, now the question arises, why do we need this complex multitier architecture?

As mentioned, modularizing different tiers of an application gives development teams the ability to develop and enhance a product with greater speed than developing a singular code base because a specific layer can be upgraded with minimal impact on the other layers. It can also help improve development efficiency by allowing teams to focus on their core competencies. Many development teams have separate developers who specialize in front- end, server back-end, and data back-end development, by modularizing these parts of an application you no longer have to rely on full stack developers and can better utilize the specialties of each team.

Scalability is another great advantage of a 3-layer architecture. By separating out the different layers you can scale each independently depending on the need at any given time. For example, if you are receiving many web requests but not many requests which affect your application layer, you can scale your web servers without touching your application servers. Similarly, if you are receiving many large application requests from only a handful of web users, you can scale out your application and data layers to meet those requests without touch your web servers. This allows you to load balance each layer independently, improving overall performance with minimal resources.

Additionally, the independence created from modularizing the different tiers gives you many deployment options. For example, you may choose to have your web servers hosted in a public or private cloud while you’re application and data layers may be hosted onsite. Or you may have your application and data layers hosted in the cloud while your web servers may be locally hosted, or any combination thereof.

By having disparate layers you can also increase reliability and availability by hosting different parts of your application on different servers and utilizing cached results. With a full stack system you have to worry about a server going down and greatly affecting performance throughout your entire system, but with a 3-layer application, the increased independence created when physically separating different parts of an application minimizes performance issues when a server goes down. Hope, next time when you will go to hire an architect, this will help you.

When using an N tiered architecture where does the data access logic component reside?

N-tiered architecture: An n-tiered architecture uses more than three sets of computers. In this case, the client is responsible for presentation, a database server(s) is responsible for the data access logic and data storage, and the application logic is spread across two or more different sets of servers.

In which architecture is the application logic usually on the client side?

Platform Architecture While data access logic and data storage reside on the server side, presentation and application logic reside on the client side.

What is a characteristic of client server database system with N

In an n -tier architecture, application objects are distributed across multiple logical tiers, typically three or four. In a three-tier architecture, the database server does not share a server machine with the web application server. The client is on the first tier, as it is in a two-tier architecture.

Why would a business using client server architecture most likely adopt the n

There are several benefits to using n-tier architecture for your software. These are scalability, ease of management, flexibility, and security. Secure: You can secure each of the three tiers separately using different methods.

Toplist

Neuester Beitrag

Stichworte