Saturday, 4 August 2012

Computer Architecture? Whats that?


Here is an imaginary conversation with a friend of mine, who happens to be a student of architecture.

Josh: Hey Vineeth! I have just completed my first “floor plan”.

Me: Wow!! Let me take a look. It looks like Greek and Latin to me apart from a few boxes which seem to depict rooms. Luckily for me, computer architecture diagrams are not drawn to that level of detail.

Josh: Computer Architecture? What on earth do you mean?

Me: Well, it might sound a bit strange, but then, computer architecture  relates to the manner in which a computer is organized and designed to work.
Buildings are designed in such a way that each room serves a specific purpose. Take the bedroom, kitchen, bathroom, dining room etc.  for instance. In the same way, a computer has various components and can perform various tasks like playing a movie, users can create/edit documents, browse the internet, upload and download data from the internet etc.
For a computer to function the way it does, it must have a brain that coordinates various functional components and processes data. This is done by the CPU. But below all of this, we have a computer floor plan which shows us how the core of the computer is organized.

Josh: Hmm a floor plan? Sounds interesting! Tell me more.

Me: Okay. Assume that your computer is like a house which you might build in the future. A house will be incomplete without a bedroom, a labyrinth, kitchen, dining room, drawing etc, each of which serve a unique purpose but all of which are required together for a building to be considered as a house. Any of these rooms might serve a purpose on their own but individually they will not be very useful.
For a computer to function as it does, it needs hardware, an operating system and software. The computer hardware is comprised of visible physical components such as the cpu box, monitor, mouse etc.. as well as an operating system such as Windows 7. The hardware and operating system  go hand in hand and a computer would be useless unless both of these are present. Examples for software could be the MS office suite, the internet browser, a computer game etc..
A software application is basically a program that performs a specific/varied set of tasks depending on the requirement. A computer game is an example of such an application.
All the images, videos and text displayed in the game are essentially data stored on your computer which is retrieved when necessary by the software application, in this case, the computer game or by the end user if he is working on a document.
Josh:I already know most of this. What is so special about computer architecture? The real world building architecture which I study is the real deal. It is challenging and not as simple as the computer architecture you just spoke about.

Me: I am coming to that. Computer architecture refers to the pictorial representation of the manner in which the hardware and software are organized and linked to each other.
   In the above example of the computer game your application and data are separate entities, yet they are linked together in the game. How does this interaction of data and application take place? This is what the computer architecture indicates.
There are several types of computer architecture, each of which can be used to meet the objective of a specific requirement. What I have explained to you via the computer game example is the “Single Tier Architecture”. This type of architecture is used for personal computers which do not have to perform a lot of processing and data transfer.

Josh: Single tier architecture? It sounds queer. Do you guys have 2 tier, 3 tier, 4 tier, 5 tiers architectures for computers?

Me: Actually we do. Let me give you a brief overview on some of the different types of architecture that computers use.
A  single tier architecture works well when the computer serves a single user. However, when multiple users need to work on a single document at the same time, it does not make sense to have multiple copies of the same document on individual machines. It becomes very difficult to track all the changes and combine these documents. Thus we need an alternative which allows multiple users to work on the same document at the same time.
This led to the concept of the "Two Tier Architecture". Here, the data to be processed i.e. the document is placed on a single system called the server while all the users have their own individual systems from which they can access and modify the same document. Only the data is placed on the server machine while the software application is installed on each of the individual user machines. All the image processing is performed on the individual user machines too. Thus the workload is distributed across multiple computers rather than just one computer in the case of the single tier architecture.  
This greatly reduces the processing time of the computer and results in a faster response.




Josh: This sounds interesting, but how can multiple computers be made to work together and exchange data in the two tier architecture?

Me: I was coming to that. The various computers are connected together by a network which can be imagined as a group of wires connecting the various systems though this might not always be the case. The network could be a local area network or maybe even the internet.

For organizations, a three tier or a multiple tier architecture would be ideal since typically, these organizations would have to cater to hundreds or thousands of employees and a two tier architecture would not be ideal for such purposes due to a high bandwidth requirement and since software updates/version control would be difficult to track over hundreds of users distributed over multiple geographies.

The three tier architecture has one additional level of segregation in which, in addition to the data server and individual client machines, we have a server machine which controls the functionality of the applications used by the end users and which processes all the data. This server called the application server is placed between the data server and the client machines. The data server holds only the data while the end user client systems handle the user interface for each server.
Thus the distance of data traffic is reduced with an increase in processing speed and it becomes much easier to maintain software version control since any major software updates can be made just once on the application server system.



The 3 tier architecture requires that each end user system should have a client version of the software installed. However, if the internet is used as the network, we will just need to use a web browser, provided that a web server is included between the Application server and the client machines. This web server functions as a translator between the application server and the client machines. This is the multiple tier architecture. 

Josh:  Interesting. I just have one last doubt. The internet is open to the public. How can organizations rely on the internet as a part of the computer architecture?

Me: The internet may seem to be an insecure network since anyone can try to access protected company data, however, we have a software called a firewall which functions like an internet watchman by  preventing external users and hackers from accessing the data, provided ,the firewalls are configured right.

Josh: Cool. I was shocked when I heard that computers have architectures similar to buildings, but now, it starts to make sense. Oops, it is time for my next class. Bye.

Me: Bye