A Three-Tier Architecture is traditionally used for software product development. It makes a logical separation between the presentation layer, the business logic layer, and the database layer. Most companies have been implementing applications following the Three-Tier Architecture for years and have now a collection of applications that all behave and look differently, and are hard to integrate.
Disadvantages of Three-tier architecture
The Three-tier architecture is not inherently flawed; it is just out of date. It was designed for software product development before smart phones and other mobile devices existed, when applications only needed to interact with one kind of entity at the presentation tier (the web browser running on the desktop). Its drawbacks derive not from the number of layers nor how data processing is distributed across them, but from the fact that the application is written as single, unified code base. The main disadvantages are given as follows:
- The Three-tier nature makes it difficult for developers to change an application with the agility and flexibility they need to keep pace with the expectations of mobile users, and for operations teams to scale the application up and down to match demand.
- A Three-tier design hampers agility at several phases of the application development process. Even if application functionality is distributed in a modular fashion, a change to any module requires rebuilding and testing the entire application. This can be quite time-consuming. Nowadays, you need to roll out incremental improvements quickly and often to keep up with users’ thirst for ever-better performance and the latest cool new feature.
- The flexibility to choose from an array of solutions isn’t available with a 3-tier design, where solutions are typically built from a set of highly interdependent coupled components.
- The Three-tier architecture lacks scalability, it was designed in an era where the idea of elasticity and rapid scaling did not broadly exist. The functional components of the application are packaged together as a unit, because of which the only way you can respond to changing levels of client demand is to scale the entire application. Applications running on the three-tier architecture are typically unable to scale specific pieces of the application independently because the entire application is coupled together.
SOA to the rescue
A service-oriented architecture is essentially a collection of services (such as RESTful web services). These services communicate with each other. The communication can involve either simple data passing or it could involve two or more services coordinating some activity. Some means of connecting services to each other is needed.
SOA builds on top of the Three-tier architecture and addresses its shortcomings. Instead of looking at the IT infrastructure as set of application silos, SOA looks at a set of services and applications. Services implement some kind of functionality and are used by applications and other services. Services communicate between each other and with applications by exchanging XML documents. If we had to compare SOA to Three-tier architecture, SOA applications correspond to the Three-tier architecture’s presentation layer, while SOA services correspond to the Three-tier architecture’s business logic and data layers.
SOA relies on data and services that are described by metadata that should meet the following two criteria:
- The metadata should be provided in a form that software systems can use to configure dynamically by discovery and incorporation of defined services, and also to maintain coherence and integrity. For example, metadata could be used by other applications, like a catalogue, to perform auto discovery of services without modifying the functional contract of a service.
- The metadata should be provided in a form that system designers can understand
and manage with a reasonable expenditure of cost and effort.
As explained above, the three-tier architecture has significant disadvantages for most of the modern applications. Organizations around the globe have already started disregarding this architecture and have moved on towards better and more advanced software product development architectures such as SOA.