How Exactly Web Application Works??

web application

So for those who are not aware of a web application, it is nothing but the program that consists of client-server architecture which runs in a web browser or a program that utilizes web browser and web technology to perform a certain task over the internet. Common web application includes Gmail, web-mail, online retails, online auction, online chatting applications, blogs and many other functions.

Many people are aware of about web application, but they fail to understand that how the web application works…
Basically, we think its just a request and response from the client to server and in returns server sends the requested content i.e. 100% true, but in between this client-server architecture, there are different layers and protocols working to together to fulfill the client-server request and response. For a single client-server architecture a complete OSI model function in the background.

What is OSI(Open System Interconnection) model?

In the world of computer networks, OSI model is one of the most important model to understand the communication between the two system which may be few km away or maybe few continents.
Every system participating in this model is open for communication with other systems.

OSI model is developed by International Organiation Standardiation in 1984.

OSI model has 7 layers, every layer communicates with the layer above and below it i.e. each layer provides some service to the layer above and below it. Each layer has its own protocols so we can say “Protocols work on the same layer of the different machine whereas services work on the different layers within the same machine”.

I will not go into many details to explain how each layer work because OSI model itself is a big concept here I would only explain that how OSI model helps the client-server architecture in the background.

Application Layer: Application layers is where your web application works and is responsible for providing networking services to the user. Consider that you want to transfer a file (file transfers are done usually by file transfer protocol FTP or HTTP).
At this layers users communicate with the systems, these layers provide some protocols using which users can communicate with the system.

For eg: FTP

Presentation Layer: Presentation layer is concerned about the format of the data which is exchanged between end systems.

For eg: If one system “System A” has 32-bit integer format and another system “System B” has the 64-bit integer format then appropriate conversions have to be done in order to form a proper communication between the two systems, this is done by “Presentation Layer”.

Session Layer: As the name suggests, Session Layer allows users to create sessions between them. Session layer combines the different transport streams for a particular session.

For eg: If person A wants to do a video chat so for that he requires an application which has the audio and video streaming facility. Session layer, in this case, combines an audio stream and video stream for a particular session of user A.

Transport Layer: Transport Layer is called as the heart of the OSI model, transport helps the session layer. Transport layer receives the data from the session layer and divides the data into messages and are then forwarded to networking layer. Whereas, on the receiving end transport layer make sure that this messages are accepted properly and are arranged in the correct order. These messages are merged and then passed on to the upper layers.

Network Layer: Network layer receives the data from the transport layer in the form of messages. These messages are then divided into smaller pieces know as “packets” and transport them across the network. The main responsibility of the network layers is to make sure that packets reach the correct destination properly. This feature is called as “routing”. Routing can be implemented on every node of the network. A node here can be computer, switches, routers etc.
Whereas on the receiving end the network layer merges the packets in the correct order and pass it to upper layers.

Data Link Layer: Data link layer is more concerned about transmitting the error-free data over the network. This layer receives the packets from the network layer and converts into the smaller units called “frames”. These frames are further transferred to physical for transmission. Whereas on the receiving end data link layer collects the raw bytes from the physical layer and are passed on to the upper layers. Data encoding, Error detection, and correction techniques are all applied in this layer.

Physical Layer: Physical layer last layer of the OSI model which transmits the raw bits over the physical layer.

Application, Presentation, Session are also known as Software layer and Physical, Data Link and Network layer are also known as Hardware layer.

So once all this background process of an OSI model completes successfully client receives the requested response.

Anurag Kulkarni

Myself Anurag, Software Engineer by Profession and working in the IT industry since 2014. I love blogging because blogging is something where you can learn “new things every day” and it more into “discovering yourself” as well. As an IT professional and blogger, I am more excited towards the technology share my views on the blogs.