Introduction To Application Layer
Introduction To Application Layer
Introduction To Application Layer
INTRODUCTION:
The application layer provides services to the user.
Communication is provided using a logical connection,
which means that the two application layers assume that
there is an imaginary direct connection through which
they can send and receive messages.
The protocols in this layer do not provide services to any
other protocol in the suite; they only receive services
from the protocols in the transport layer. This means
that protocols can be removed from this layer easily.
New protocols can be also added to this layer as long as
the new protocols can use the services provided by one
of the transport-layer protocols.
Standard and Nonstandard Protocols:
To provide smooth operation of the Internet, the protocols used in
the first four layers of the TCP/IP suite need to be standardized
and documented
• Standard Application-Layer Protocols:
There are several application-layer protocols that have been
standardized and documented by the Internet authority, and we
are using them in our daily interaction with the Internet.
Each standard protocol is a pair of computer programs that
interact with the user and the transport layer to provide a
specific service to the user.
. Nonstandard Application-Layer Protocols:
A programmer can create a nonstandard application-layer
program if she can write two programs that provide service to the
user by interacting with the transport layer.
Application-Layer Paradigms:
Using internet two application programs interact with
each other: one running on a computer somewhere in
the world, the other running on another computer
somewhere else in the world
And both application programs be able to request
services and provide services.
There are two Application layer paradigms have been
developed.
client-server paradigm and
peer-to-peer paradigm.
• Traditional Paradigm: Client-Server:
In this there are two processes
1. Server process
2. Client process
In this paradigm,
There are normally some server processes that can
provide a specific type of service, but there are many
clients that request service from any of these server
processes.
The server process must be running all the time; the
client process is started when the client needs to
receive service
New Paradigm: Peer-to-Peer:
• In this paradigm, there is no need for a server
process to be running all the time and waiting
for the client processes to connect. The
responsibility is shared between peers.
• A computer connected to the Internet can
provide service at one time and receive
service at another time. A computer can even
provide and receive services at the same time.
CLIENT-SERVER PROGRAMMING:
• In a client-server paradigm, communication at the application layer
is between two running application programs called processes: a
client and a server.
• A client is a running program that initializes the communication by
sending a request; a server is another application program that
waits for a request from a client.
• The server handles the request received from a client, prepares a
result, and sends the result back to the client. This definition of a
server implies that a server must be running when a request from a
client arrives, but the client needs to be run only when it is needed.
• This means that if we have two computers connected to each other
somewhere, we can run a client process on one of them and the
server on the other. However, we need to be careful that the server
program is started before we start running the client program.
Application Programming Interface:
If we need a process to be able to communicate
with another process, we need a new set of
instructions to tell the lowest four layers of the
TCP/IP suite to
• open the connection,
• send and receive data from the other end,
close the connection.
A set of instructions of this kind is normally
referred to as an application programming
interface (API).
Several APIs have been designed for communication. One of the
most common one is: socket interface.
The socket interface is a set of instructions that provide
communication between the application layer and the operating
system, as shown in Figure