Understanding three tier architecture


Introduction: What is Tier...?

Have you seen Movie Theatre's arrangement...?

1.gif

Fig 1.1

It is arranged in the following manner:

First Class
Second Class
Third Class

There is a border between each class. It looks like a layer.

Have you seen wedding cake...?

2.gif

Fig 1.2 Wedding Cake.

It contains several layers...At the top of the cake, it is dressed with Cherry fruits.

These different types of layers are understood as tier.

What is 1-Tier...?

We understood what is Tier. Okay fine. Now we can discuss about what is 1- tier...?

Let us take your stand alone PC. Your PC is stand alone. It means it is not connected with any other computers or net works. There you can create a word document and save it. You can read it whenever you need.

3.gif

Fig 2.1.This is a Stand Alone PC.

One thing we can understand here, your document is saved. i.e. Your Data is stored. But there is no Database Logic.

(What is Database...? A collection of information organized in such a way that a computer program can quickly select desired pieces of data. You can think of a database as an electronic filing system.).

No data sharing in Stand alone PC.

Stand Alone System is the best example for 1-Tier Architect. i.e... there are no two layers. Like in Cinema Theatre only one class instead of several classes. One layer in cake. Direct access within your computer.

What is 2-Tier...?

Now we can discuss about 2-tier architecture.

Let us assume Mr.X is booking a Railway Reservation from Hyderabad to Chennai by Hyderabad Express at Counter No 1. In the same day, the same time Mr.Y also booking from Hyderabad to Chennai in the same train at Counter No 2.

Staff from Counter No 1. Keying the data into computer and checking the availability into their Database. What would happen if the staff from Counter No 2 keying in the same time of Counter No 1...? Surely, there might be a great chaos and confusion occurs. There is a chance to lock the record.

But practically we are seeing, we can book the tickets anywhere in India. How it is possible...?

Even there should be at least a Nano seconds difference between two staff in keying. Let us assume Counter No 1. Staff keying at first than Counter No 2. System locks that record. So the Counter No.2 staff is put into queue.

Here Staff is end user. He uses an Application Software. He feeds your data through this Application Software and sends requests to Server. Database and Server are integrated as a big computer. Such like this technology is called as "Client-Server Technology" 

4.gif

Fig 3.1 Sample Client-Server Technology.

Okay. What is Client-Server Technology...?

  • It is a Network Architecture
  • It separates Client from Server. Client has an Application using GUI.
  • Each Instance of Requests Client software can request to server.

Here we can understand the following facts:

  1. Database runs on the server.

  2. Need Database products like Oracle/DB2/Sybase/Informix/Ingress

What is 3-Tier...?

Here we can consider a different scenario. Let us assume a small Shop. All data are stored in a server/DB. The server is located at a separate computer room. There is 8 counter. Each terminal is connected with this server. All the requests are going to server and getting required data and you can update new transactions.

The above mentioned technology we can call it as "Client-Server Technology".

Now the business is expanded. It has so many branches in various locations throughout the country.

All transactions through various locations should come under one database. It is not possible to do transactions through this Client-Server Technology.

What can we do...? Let us think...

Huge transactions may occur in various locations and it is updated in one database...Now is it okay...?

Again there is a chance to get damage on the database/locking records/getting chaos and confusions, because of number hits on the database. So one thing we can understand. The number of hits should be minimized or organized, else problem will continue.

OK. Now what we can do...? Is there any solution to solve this problem...?

Yes. Now we are introducing one layer between this client and server database. Speaking with terminologically, we are introducing a middle tier between client and server database.

This middle tier receives all the requests from client instead of server database. This tier organizes the requests and making queue to sending to database and retrieving from database. Thus the number of hits is organized and load is balanced.

This middle tier is called Application Tier or Application Server.

Here in 3-tier Architecture, the following tiers are available:

  • Client Tier
  • Application Tier
  • Database Tier

For recalling purpose, here below I have given Mind Map for the above discussions for your easy memory.

5.gif

Fig 4.0 Mind Map for easy memory.

Up Next
    Ebook Download
    View all
    Learn
    View all