This dialogue talks about two friends – Humpty and Dumpty. Humpty is doing software engineering and Dumpty is currently doing his MBA. One evening,
Humpty: Why are you so tensed today?
Dumpty: Our Systems Engineering professor taught us a weird topic today. I was really zapped by what he was teaching today and to add to that, he has asked us to submit an assignment explaining the topic in a dialogue form. He was talking about some tyres (tier) and architecture today. I don’t know how am I going to do the assignment.
Humpty: I think I can help you out. I know this topic and can explain it to you.
Dumpty: Thanks dude.
Humpty: Let me start by explaining what architecture is. Tell me one thing: what is the first step in getting your house built?
Dumpty: We hire an architect and get the plan made for our house.
Humpty: Exactly! In computer parlance, your plan is the architecture. So we can define Architecture as the blue print, or the underlying schematics used to map out or design an application.
Dumpty: Got it! Can you explain the tyres that our professor was talking about? What relation does a car tyre have in Systems Engineering?
Humpty: Your professor was not talking about car tyres buddy. He was talking about tiered architecture.
Coming back to our example of a house plan, how does an architect design the house? He starts by deciding how many rooms will be there. Similarly, for system architecture, a tiering is there. A tiered architecture involves breaking up an application into logical chunks, or tiers, each of which is assigned general or specific roles. Tiers can be located on different machines or on the same machine where they are virtually or conceptually separate from one another.
Dumpty: Our professor also talked about the types of these tyres (tiers).
Humpty: There are various types of system architecture like – Single tier, two tiers, three tiers, three tier web based.
For understanding single tier architecture, consider yourself sitting on a desktop computer using Microsoft Access to load up a list of personal addresses and phone numbers that you have saved in MS Windows’ “My Documents” folder. This is the most basic example of one-tier database architecture. The program (Microsoft Access) runs on the your (user’s) local machine, and references a file that is stored on that machine’s hard drive, thus using a single physical resource to access and process information.
Now coming to two tier architecture, the simplest explanation would be of a Microsoft Windows based client program that accesses a server database such as Oracle or SQL Server. Users interact through a GUI (Graphical User Interface) to communicate with the database server across a network via SQL (Structured Query Language).
For understanding a three tier architecture, consider an intermediary in money markets who takes commission from both sides. Similarly we have an intermediary in a three tier architecture which is called a middle tier (business tier), which is an application server that houses the business logic. This middle tier relieves the client application(s) and database server of some of their processing duties by translating client calls into database queries and translating data from the database into client data in return. Consequently, the client and server never talk directly to one-another like when we lend money through an intermediary who goes to the lenders and borrowers and the two do not talk to each other directly.
Now if a you web-enables the whole thing, the clients would only require a web-browser via which he would get his application. And for this the company would require a web server. This architecture is known as a multitier architecture.
Dumpty: What do we require so many architectures?
Humpty: It depends on the user’s requirements. Each approach has its own advantages and disadvantages.
The 1-tier approach is a simple design that’s easy to distribute, it does not scale well. In addition, you are limited to running the entire application (including the user interface) on single machine.
Although the 2-tier approach increases scalability and separates the display and database layers, it does not truly separate the application into highly specialized, functional layers. Because of this lack of specialization, most applications quickly outgrow this model.
The 3-tier approach increases scalability and introduces a separation of business logic from the display and database layers, it does not truly separate the application into specialized, functional layers.
Dumpty: Thanks a lot buddy.