This conversation took place between me and My dad.
My dad is a retired Govt. Officer who could not leverage
enough technology in his service tenure. So to keep the interest running and as
an interesting pastime, he reads a lot about computers and technology. This is
the transcript of one such phone conversation I have had with him about basic
concepts of System Architecture.
========================================================================
Me : Namaste Dad.. How are you ? what was on the reading
agenda today ?
Dad : I am good , son.. Was trying to read through some
concepts of Systems Architecture today morning. Couldn’t get a good enough hold
of it. So left it for a better day..
Me : I can help you
through it.. I recently read the same topic in the class.. what did you not
understand.. ?
Dad : The different tiers and the concept of data being
different from business logic.. u can say almost everything.. can you explain
all this on the phone ?
Me : Sure . I ‘ll start right away. See , as you would know
a system when learnt in IT parlance is a set of devices integrated together to
process data and provide valuable information in return. It requires some input
depending on which the output would vary accordingly. Now when it comes to
designing a complex web application , there arises a need for a robust
architecture pertaining to the fulfilment of all requirements. Such arrangement
of systems is called systems architecture. Its actually a structure made up of
different components which integrate to work as one entity.
Dad: what about those tiers.. Is it some classification ?
Me : yes dad , there are basically 2 distinct important entities
in a system. A Client and a server. A client is the basic end user of an
application residing on his personal machine. This client application access
data which is lying on a “server”. Now depending upon this client server model
and the distinction between the data and the application , the system
architecture can be broadly classified into - :
- - Two Tier Architecture
- - Three Tier Architecture
- - N- Tier Architecture
Also , i hope it doesnt confuse you , if both the application and the data it uses
lie on the same physical machine then that kind of architecture is known as single tier architecture. This is the
most basic type of integrated system wherein data and application co-reside. Ok.
Just to make things simpler for you , i will try to define data and
application. Data is the set of elements or facts collected and stored in a
machine. An application is a programmed logic which uses the data for its
functioning.
We basically do not classify this as a client server model
as there is only 1 physical machine involved. I hope you got the concept ?
Dad : yes.. Single
tier has the data and application mutually residing on 1 machine. If i have to still
co-relate with the client-server model then i would say the client and the
server is 1 single machine itself like my new laptop J. Right ? How different are other
tiers then ?
Me : Yes dad.. You
are getting the gist of it .. J
Before jumping to different tiers I would want to describe some technical terms
for you. These are Presentation Logic(PL) and Business Logic(BL). PL and BL are
sub parts of application logic. PL deals with the interface or the front end
which the user sees. BL is the programmed logic/business rules which the
application uses to render the output. The BL and the PL both require a set of
data which is a different entity defined as data/database.
Now Coming to 2 tier architecture where the data/database is
centrally located on 1 machine called the “server”. The application i.e PL +BL
is kept on a separate machine. Now there can be multiple instances of such
systems wherein applications are installed. All these instances access data
from the centrally located data on the server machine using the internet. Hope
you can make the difference between Single tier and two tier architecture now ?
Dad : yes .. the difference is very much evident.. This is
simple.. Please explain 3 tier and N-tier too..
Me : haha.. hold your horses dad.. Let me tell you the pros
and cons of the 2 tier architecture and the need of a 3 tier architecture. The
advantages are -:
-
The business logic is repeated in each client
system.
-
Also the presentation logic or the Graphical User
Interface(GUI) is separate for each user.
Due to the above the burden on server
machine is lessened.
But , the darker side is due to
the internet . At times when multiple users are accessing simultaneously , the
application may slow down.
Also , if there ought to be a
change made to the business rules/logic of the application. It has to be made
to each and every copy of the application residing on client machine which is
cumbersome to say the least.
That is when the 3 tier
architecture comes into use.
Dad : Yes , exactly. Replacement of all possible copies of
application isn’t an easy task. How does 3 tier help in this regard ?
Me : Hmmm.. In a 3 tier architecture , the business logic or
the rules are also separated from the presentation logic or the GUI. This is
done to enable changes to business logic as and when required without hassling
the end users. The data was already separate. The BL is also a separate entity
now. Only the PL is residing on client machine. So you see we have moved a lot
farther from where we started at single tier architecture.
Now if i generalise on this 3 tier architecture , i can term
this as an n-tier architecture . We can add a web server tier before the client
is serviced for his web request. The web server would make sure that the load
is properly balanced in case more no of application servers(business logic) are
used. For using n-tier systems , the
applications at the client end must be web enabled and secure.
For security purpose
, one can install firewalls at the client side. A firewall is a software which
monitors the incoming and the outgoing web request/traffic. It determines if a
certain packet of data should be allowed through it or not keeping your PC safe
from malicious use. That sums it up for you Dad. Hope it wasn’t an information overload..
J
Dad : Not at all.. I will catch up with the rest of the
concepts as well from the book.. Will check with you tomorrow again if there is
any missing link.
Me : Sure Dad.. And by the way whatever I just told you over
the phone is also available on my blog
http://time2create.blogspot.in/ with illustrative diagrams for all the
tiers separately. Do look it up in case you would need any help.. Good Night..
========================================================================