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.1 Network Application Architectures

The application architecture is designed by the application developer and dictates how the application is organized over the various end systems.  In choosing the application architecture, an application developer will likely draw on one of the three predominant architectures used in modern network appliactions: the client-server architecture, the P2P architecture, and a hybrid of the client-server and P2P architectures.
 
In a client-server arcuitecture, there is an always-on host, called the server, which services requests from any other hosts, called clients. The client hosts can be either sometimes-on or always on.
 
With the slient-server architecture, clients do not directly communicate with each other. Another characteristic of the client server architecture is that the server has a fixed, well-known address, called an IP address.  Because the server has a fixed, well-known address, and because the server is always on , a client can always contact the server by sending a packet to the server's address.
 
Often in a client-server application, a single server host is incapable of keeping up  with all the requests from its clients.
 

kurose_320719_c02f01.gif

For this reason, clusters of hosts--sometimes referred to as a server farm--are often used to crreate a powerful virtual server in client-server architectures.
 
In a pure P2P architecture, there isn't an always-on server at the center of the application.  Instead, arbitrary jparis of hosts, called peers, communicate directly with each other.  Because the peers communicate without passing thorugh some special server, the architecture is called peer-to-peer.  One of the greatest strengths of the P2P architecture is it scalability.
 
While each peer will generate workload by requesting files, each peer also adds service capacity to the system by responding to the requests of other peers.  P2P file sharing is intrinsically scalable--each addtional peer not only increases demand but also increases service capacity.

kurose_320719_c02f02.gif

It remains an open question whether it is possible to build industrial-strength P2P solutions for enterprise applications.
 
Many applications are organized as hybrids of the client-server and P2P architectures.