Application Layer

2.1 Principles of Network Applications

Home
Introduction
2.1 Principles of Network Applications
2.1.1 Network Application Architectures
2.1.2 Processes Communcating
2.1.3 Application-Layer Protocols
2.1.4 What Services Does an Application Need?
2.1.5 Services Provided by the Internet Transport Protocols
2.2 The Web and HTTP
2.2.1Overview of HTTP
2.2.2 Nonpersistent and Persistent Connections
2.2.3 HTTP Message Format
2.2.4 User-Server Ineraction: Cookies
2.2.5 HTTP Content
2.2.6 Web Caching
2.2.7 The Conditional GET
2.3 File Transfer: FTP
2.3.1 FTP Commands and Replies
2.4 Electronic Mail in the Internet
2.4.1 STMP
2.4.2 Comparison with HTTP
2.4.3 Mail Message Formats and MIME
2.4.4 Mail Access Protocols
2.5 DNS--The Internet's Directory Service
2.5.1 Services Provided by DNS
2.5.2 Overview of How DNS Works
2.5.3 DNS Records and Messages
2.6 P2P File Sharing
2.7 Socket Programming with TCP
2.7.1 Socket Programming with TCP
2.7.2 An Example Client/Server Application in Java
2.8 Socket Programming with UDP

2.1.2 Processes Communicating
 

In the jargon of operating systems, it is not actually programs but processes that are communicating.  A process can be thought of as a program that is running within an end system.
 
Processes on two different end systems 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 possibly responds by sending messages back.
 
Client and Server Processes
A network application consists of pairs of prcesses that send messages to each other over a network.  In a P2P file-sharing system, a file is transferred from a prcess in one peer to a process in another peer.  For each pair of communicating process, the two processes were labeled one as the client and the other as the server.  With the Web, a browser is a client process and a Web server is a server process.  With P2P file sharing, the peer that is downloading the file is labeled as the client, and the peer that is uploading the file is labeled as the server.
 
Sockets
Any message sent from one process to another must go thorugh the underlying network.  A process sends messages into, and receives messages from, the network through its socket.
 
When a prcess wants to send a message to another process on another host, it shoves the message out its door (socket) and into the network.  This sending process assumes that there is a transportation infrastructure on the other side of its door that will transport the message across the network to the door of the destination process.  Once the message arrives at the destination host, the message passes, through the receiving process's door (socket), and the receiving process than acts on the message.
 
A socket is the interface between the application layer and the transport layer within a host.  It is also referred to as the application programming interface (API) between the application and the network, since the socket is the programming interface with which network applications are built in the Internet.
 
Addressing Processes
In order for a prcess on one host to send a message to a process on another host, the sending process must identify the receiving process.  Tho identify the receiving process, two pieces of information need to be specified: (1) the name or address of the host and (2) an identifier that specifies the receiving process in the destination host.
 
In internet applications, the destination host is identified by it IP address Since the IP address of any host connected to the public Internet must be globally unique, the assignment of IP addresses must be carefully managed.
 
In addition to knowing the address of the host to which a message is destined, the sending host must also identify the receiving process running in the host. This information is needed because in general a host could be runing many network applllications.  A destination port number serves this purpose.  Popular applications have been assigned specific port numbers.
 

kurose_320719_c02f03.gif