Evolution is a part of live. Definition of evolution states that is the gradual growth of something. It can be either biological or technical. In this article we will be taking a look at how software engineering developed and the various different architectures that has been implemented.
1 tier Architecture
- Presentation Tier: It is the component (UI in most cases) that the user uses to interact with the application.
- Application Tier: It is the business component (Logic) of the application that decides what to do with the inputs that it receives from the presentation layer.
- Database Tier: It is the component where all the data related to the application is stored and received from.
Note: The Above mentioned naming's will be used for the other architectures that are explained in the upcoming sections.
At first if a company is needed to run a software, that specific piece of software is installed on every piece of machine that needs to run that. In this architecture the user interfaces , the logic to run the application as well as the database that stores the data for that application is all stored one single machine.
The main advantage of this architecture is that it is the least complex one. But it carries major disadvantage as the business logic and the structure of the database is stored on the client system.
2 tier Architecture
Programmers thought that instead of having the database on every single system why not have it on a separate system so that every machine using the application will be able to access the same database which in case will also reduce the load on the hard disk.
With the help of LAN (Local Area Network) computers were able to be interconnected with each others. So instead of saving data on every single computer, it was saved on one particular machine and then every other machine that is connected to that machine will be able to get the data. Now instead of running on one single machine the application is run on multiple machines. Now the computers which have the application (client)will be communicating with the system that has the database(server).
The main advantage of this architecture is that it is easy to design, but it is not the most secure one as the business logic is with the client side.
Note: Two tier architecture and the upcoming architecture designs are also known as client server architecture
3 tier Architecture
Currently we have our application system in one place and our database logic in another place. Programmers wanted to optimize the 2 tier system even more.
So they thought of a way to divide the presentation tier(UI) and the application tier(Business logic) separately, so that multiple machines will be able to use one application that is stored on a single machine while accessing the database that is in another machine.
The advantage of using this architecture is that it has better data connectivity compared with 2 tier, as the application tier has been separated from the client machine it is more secure. The only limitation would be the connectivity issues as the application tier will act as a middleware between the client and the database(server).
n tier Architecture
This is also know as the multi tier architecture. Here the processes that are used to create an application are broken down into multiple different parts and are loosely coupled together. As it is loosely coupled it is an advantage for system developers to update the systems easily and a lot of developers can individually work on sperate components at the same time.
Note: 3 tier architecture is also an example of n tier architecture.
The above mentioned architectures could be implemented through a local area network. But the arrival of internet created a new challenge for developers on how their systems would be accessed. With that there were 3 different types of web servers that was used for development purposes.
- Web Server
- Web Container
- Application Server
Web servers are responsible for storing the static content on the internet. It can store static html pages, videos, images and music files. These web servers do not deal with any type of dynamic processes. They will simply return a file type that is being requested by the users. Lets look at an example.
When a user types in a URL (starting from http:) the browser will go and check the local DNS server for that URL. The local DNS server will contact the web server to make a connection. The web server will then see if it has the requested data. If it does have it, it will send the data to the DNS which will then send it back to the web browser. If the data does not exist it will send an error message.
Instead of sending static content back to the users developers thought of a way for dynamic content to be also sent back. Web container also contains web server within it. In order to send dynamic content web container will work with servlet component.
Servlet will contain the methods to run for the dynamic content. Lets look at an example. If a request is made to the web container it will check for the content that need to return. If it is static, it will communicate with the web server and return the needed file, if it is something dynamic it will contact the servlet component and the methods are loaded onto the container. The container after processing will pass it on with the file from the web server back to the user.
Note: Servlets do not have a main method. So the loading is done at the web container.
The major disadvantage with web container is that it can only load one type of class, for example a web container might only be able to get methods for the math class only.
Web containers were not able to load different classes at the same time. Only one type of class. So in order to run a fully functional enterprise application the Application Server was built. Application server is able to do the processes of both web servers and web containers. The following diagram can make it easier to see the hierarchy of the three.
Application server’s can do all of the tasks that both web container and web server can do.
EJB (Enterprise Java Bean) is developed on application servers. These types of application will require heavy processing on the server side. So Application servers are more expensive than the other two servers.
Note : EJB is a technology that is built on top of RMI(Remote Method Invocation). There are 3 major EJB technologies. Session bean, Event Driven Bean and Entity Bean. Click Here for more information.
Microservice Architecture in simple terms would be loosely coupled components that will communicate within each other to do their processes. Because these are loosely coupled a lot of developers are able to independently develop components and then implement them together. This architecture is good for new developers to jump into a project and start working immediately. The major drawback of this architecture design is that it might get complex for larger projects and the implementation part may be difficult considering the large amount of components that bigger projects deal with.
Cloud Based Architecture
If we are talking about the evolution of software architecture we must definitely talk a little about something called cloud. Cloud is the trend nowadays, everyone that develops applications are thinking about cloud capabilities mainly. Cloud computing can be divided into two parts.
- Front End : This would be the client infrastructure. Clients would be able to directly interact with. Ex: Web Browser, Mobile Devices.
- Back End : This is where all the other parts of the application including the database, application logic and all inter communication takes place. Security for the system and maintenance are all done on the back end.
Note: Cloud computing is a big topic to cover on this article. For bit more inside on cloud computing click here.
N Tier(Multi-Tier), 3-Tier, 2-Tier Architecture with EXAMPLE
An N-Tier Application program is one that is distributed among three or more separate computers in a distributed…
Web Server vs. Application Server: What Are the Differences?
Learn the difference between web servers and application servers, and see how the two work together to deliver most…
Server: Web vs Application - javatpoint
Server is a device or a computer program that accepts and responds to the request made by other program, known as…