The Application Layer is the 1st layer in the TCP/IP stack according to Top-Down Approach. The Computer Applications are the main reason behind the existence of the computer networks. If there wouldn’t have been any Application, then there was no need of any transport or networking protocol, that support these applications. After the Internet came into existence , number of useful , entertaining and applications have been developed and still the procedure is on.
Beginning from the text based applications, such as text mails, file transfers, further e-commerce websites and the world wide web. Now from the last couple of years , number of voice and video conferencing applications are developed. Such as , For android, there are two voice chat applications , We-chat and LINE. Video applications like Skype, Gmail video conferencing etc. are being developed.
There has been no slowing down of dashing and super applications to be developed. And I hope, you can also create a killer application for your future generation.
To begin with the further discussion , I want to tell you one more thing. Before developing an application, you should have a basic understanding that how the programs on the different hosts communicate with each other. In computer networks, its not the programs but the the processes that communicate with each other. A process can be termed as the subset of a program, that is running within a system.
Processes on two different hosts communicate with each other by exchanging messages across the computer network. A sending process creates and sends messages into the network a receiving process receives these messages and responds by sending messages back. So you remember this, throughout your network study, that processes communicate. Two processes on same hosts communicate via Inter-process Communication. So now you are ready and we should move on.
Aspects of Network Applications:
You have to develop an application that should run on different hosts and can interact with each other over the network. For Example: In Web applications, there are two processes that interact with each other. A Web Browser process running on the Client or user’s side(can be a desktop, laptop or ipad) and a Web Browser process running on the on the Server side.
1. Client-Server Architecture
Briefly we can say that, a process that initiates the communication is Client. The process that waits to be contacted is a Server.
Characteristics of Client-Server Architecture
1. Two clients never communicate directly with each other. For Example: Two browsers never communicate directly.
Some Examples of Client-Server Architecture Applications are E-mail, FTP, Telnet etc.
Many times, a single server is incapable of responding to all he requests of the clients. For Example: A Google server gets millions of requests every second, So its impossible for it to respond from a single system. To overcome this problem, the Data Center, combination of large number of hosts, is formed. Data Center is a virtual Server that is a combination of 1000’s of servers that works as a single host. That’s why they are called virtual server. Companies such as Yahoo, Google, Facebook have one or more data centres.
2. Peer-to-Peer Architecture (P2P)
In P2P Architecture, the end systems directly communicate with each other known as peers. Much of the Peers are not owned by the Service provide but, infact owned by the users. These peers can be at houses, offices or universities. Since the users communicate without passing by a dedicated sever, this called as P2P sharing. Examples of such Applications is Bit Torrent, that relies on the peers. Another example is Skype.
Characteristics of P2P Architecture
It is self-scalable. As the users are directly communicating , so they don’t have to depend on the server for space scalability and bandwidth. This is the most promising feature of P2P Architecture.
Problems with P2P Architecture
Security is the major drawback of this architecture. As there is no dedicated server for communications.
******* There is also a 3rd type of Architecture that is a combination of both Client-Server Architecture and P2P Architecture. This is known as Hybrid Architecture. It is used in the cases, where you need the address of the two communicating hosts but after that, both the host will communicate each other. A very good example of this is Instant Messaging.********
What you do in Instant Messaging is that you register yourself with a server. Like you register yourself with a website named Facebook. But after registering, you directly chat with your your friends and relatives. And they can reply you back. In such applications, the use of Hybrid Architecture is essential.******
Interaction Between Processes and Computer Networks
There are always two processes that are communicating with each other. Every process that wants to send message to other process has to send through the underlying network and underlying networking layers. A process sends and receive a message from the network through a device or a software, called as socket.
Let me give you an example , so you clearly understand what a socket is.
Suppose you want to send a message to your friend ( say James). Here you are the process. Now what will you do. You will write a message and put into an envelope and will go and open the door, so that you should give this envelope to the postman who can deliver your envelope to your friend. Here your house door is the socket and the postman and the post-office are the underlying network and the networking layers. In the same way, the network will deliver the envelope to your friend , through his house door. There your friend is process and the door is socket.
Let us now try to explain it by drawing a figure.
As it is shown in the figure, the two processes communicating over the Internet. The Socket is the Interface between the Application Layer and the Underlying Transport layer, so it is also called as Application Programming Interface (API) . Since Socket is the API software with which the network applications are built. The Application developer has full control over the application side socket. But he doesn’t have control over the transport layer side socket. On Transport Layer side socket, he can only control 2 things , that are
1. He can chose the type of protocol to be used, if choice is available and 2. He can set the maximum size of buffer or queue. And after choosing the protocol by the Application Developer, the Application is developed using the services provided by transport layer protocols.
Ques : How to Determine the Address of the Processes ??
In Computer Networks, Inspite of having alphabetical addresses, hosts have IP address. I will tell you about IP address in detail in the coming posts. Till now, you should only remember that IP address is a 32-bit quantity that is a address of a host.Except the address of the host, the sending process should also know about the receiving process. Because in reality, there are many processes or applications running on a single host. For example, you could be running an email application , a Web application, a FTP application on your system. So to serve this purpose, PORT NUMBER is used. A particular port number is given to every application.
For a Web application , port number 80 is assigned, for an email application , port number 25 is there. So these are the two basic things that a sender process should know about the receiver process.
Thank you for reading this article.
This was from us on Application Layer. Do you have something to put spotlight on ?