Difference between revisions of "Cloud Architecture Design Patterns"
Line 24: | Line 24: | ||
==[[Three-Tier Architecture]]== | ==[[Three-Tier Architecture]]== | ||
+ | |||
+ | |||
+ | Three-tier architecture typically comprise a presentation tier, a business or data access tier, and a data tier. Three layers in the three tier architecture are as follows: | ||
+ | |||
+ | *'''Client layer''' : Represents Web browser, a Java or other application, Applet, WAP phone etc. The client tier makes requests to the Web server who will be serving the request by either returning static content if it is present in the Web server or forwards the request to either Servlet or JSP in the application server for either static or dynamic content. | ||
+ | |||
+ | *'''Business layer''': This layer provides the business services. This tier contains the business logic and the business data. All the business logic like validation of data, calculations, data insertion etc. Are centralized into this tier as opposed to 2-tier systems where the business logic is scattered between the front end and the backend. The benefit of having a centralized business tier is that same business logic can support different types of clients like browser, WAP (Wireless Application Protocol) client, other standalone applications written in Java, C++, C# etc. This acts as an interface between Client layer and Data Access Layer. This layer is also called the intermediary layer helps to make communication faster between client and data layer. | ||
+ | |||
+ | |||
+ | *'''Data layer''': This layer is the external resource such as a database, ERP system, Mainframe system etc. responsible for storing the data. This tier is also known as Data Tier. Data Access Layer contains methods to connect with database or other data source and to perform insert, update, delete, get data from data source based on our input data. Following diagram representing the 3-tier architecture. | ||
+ | |||
+ | https://www.ibm.com/support/knowledgecenter/SSEQTP_9.0.5/com.ibm.websphere.base.doc/ae/images/thtrcs.gif |
Latest revision as of 08:23, 12 January 2020
Architecting on AWS
All applications are broadly divided into two types. These are 2 tier or 3 tier architecture. Basically at high level we can say that 2-tier architecture is Client server application and 3-tier architecture is Web based application.
Two-Tier Architecture
The two-tier is based on Client Server architecture. The two-tier architecture is like client server application. The direct communication takes place between client and server. There is no intermediate between client and server. Because of tight coupling a 2 tiered application will run faster.
The above figure shows the architecture of two-tier. Here the direct communication happens between client and server, there is no intermediate layer between client and server. The Two-tier architecture is divided into two parts:
- Client Application (Client Tier)
- Database (Data Tier)
On client application side the code is written for saving the data in database server. Client sends the request to server and it process the request & send back with data. The main problem of two tier architecture is the server cannot respond multiple request same time, as a result it cause a data integrity issue. When the developers are not disciplined, the display logic, business logic and database logic are muddled up and/or duplicated in a 2tier client server system.
Advantages:
- Easy to maintain and modification is bit easy.
- Communication is faster.
Disadvantages:
- In two tier architecture application performance will be degrade upon increasing the users.
- Cost-ineffective.
Three-Tier Architecture
Three-tier architecture typically comprise a presentation tier, a business or data access tier, and a data tier. Three layers in the three tier architecture are as follows:
- Client layer : Represents Web browser, a Java or other application, Applet, WAP phone etc. The client tier makes requests to the Web server who will be serving the request by either returning static content if it is present in the Web server or forwards the request to either Servlet or JSP in the application server for either static or dynamic content.
- Business layer: This layer provides the business services. This tier contains the business logic and the business data. All the business logic like validation of data, calculations, data insertion etc. Are centralized into this tier as opposed to 2-tier systems where the business logic is scattered between the front end and the backend. The benefit of having a centralized business tier is that same business logic can support different types of clients like browser, WAP (Wireless Application Protocol) client, other standalone applications written in Java, C++, C# etc. This acts as an interface between Client layer and Data Access Layer. This layer is also called the intermediary layer helps to make communication faster between client and data layer.
- Data layer: This layer is the external resource such as a database, ERP system, Mainframe system etc. responsible for storing the data. This tier is also known as Data Tier. Data Access Layer contains methods to connect with database or other data source and to perform insert, update, delete, get data from data source based on our input data. Following diagram representing the 3-tier architecture.