Multi-tier architecture means application is separated into multiple or n number of tiers. Applications are most commonly broken into Presentation Tier, Business/Application Tier, Data Tier .
What is Multi-tier Architecture?
Multi-tier architecture means application is separated into multiple or n number of tiers. It is a clientâserver architecture in which presentation, application processing, and data management functions are physically separated.
Applications are most commonly broken into three different tiers,
Business/Application Tier
Above three layers works together as single application and they also can operate independently.
One of the examples of 3-tier architecture is online shopping cart (Amazon/Flipkart) where we are having User Interface which will have products (Presentation Layer), business logic to handle orders/search/update operations and database (data tier) to store user and order information. Business logic and Database implementations are hidden to user.
This is topmost level of the application and provides services that display data to end users, allowing users to process and manipulate the presentation.
For example, online shopping cart user interface(UI). These are web pages that the customer uses to browse the store, place orders, register on the site, view order information, and update the user profile/order information.
This is the second tier which controls application functionality and holds business logic. It provides back-end services that typically retrieve data from the data tier to provide to other services within the presentation or business service tiers.
For example, online shopping cart business logic to handle placed orders/existing order/user information. When we submit new order using UI, following sequence will occur to complete order.
UI writes order to DB and new order event will be triggered.
Order process service will receive this event and start processing the order which includes verification of user information, credit card details, purchase amount for authorization/approval and product.
Once order is approved, order information will be sent to suppliers to obtain bid. Once bid is received, business rule chooses supplier with lower bid and authorize for fulfillment.
Once order is fulfilled, business logic sets order status to complete and notification (SMS/Email) will be sent to customer with order details.
Provides database services accessed by services within business service tier. Data tier includes the data persistence mechanisms and the data access layer that encapsulates the persistence mechanisms and exposes the data.
For example, online shopping cart database which is used to store order information, status, user, credit card, suppliers details.
Benefits of n-tier Architecture:
Improved Security:
n-tier architecture let us enforce security differently for each tier.
For example business logic and data tier requires more security than presentation tier.
Multi-tier architecture gives us full control of security on each layer.
Scalability:
Multitier architecture let us to scale individual tier as needed.
For example, we can scale up data tier with database clustering without touching other two tiers.
Simple Maintenance:
Itâs easier to maintain. Different people can manage single tier without the risk of touching other tiers.
For example, we want web designer to work on presentation layer but we donât want him to touch business or data layer.
Easy Enhancement:
Multitier architecture let us easily upgrade and modify applications. We can do it on individual layer separately without touching the other layers.
For example, we can add additional DB to data layer or we can add additional buiness rules to business logic tier.
Reusability:
It helps us to reuse services with common functionality. For example, web services.
Web/Presentation Tier: The Web tier consists of components like WebCache and Oracle HTTP Server which protect resources and control access to applications.
Mid/Business Logic Tier: The Middle tier runs Oracle WebLogic Server, which hosts the security Service Provider Interfaces (SPIs) and APIs. Oracle Fusion Middleware components such as Oracle SOA Suite, Oracle WebCenter, and Oracle Web Services Manager operate in the middle tier.
Data Tier: The data tier is the repository for LDAP directories and databases, such as Oracle Internet Directory, Oracle Virtual Directory, and Oracle Database.