Module 5 PPT - Updated
Module 5 PPT - Updated
• Application Layer
Principles of Network Applications
Listing examples of popular network applications:
• Electronic mail
• The web
• P2P file sharing
• Multi-user networked games
• Streaming stored video clips
• Internet phone
• Real-time video conferencing
Principles of Network Applications
• Writing programs - run on different end systems and
communicate with each other over the network.
• For example, there are two distinct programs that communicate
with each other:
-The Browser program running in the user’s host (desktop,
laptop, tablet, smartphone, and so on).
-The Web server program running in the Web server host.
• As another example, in a P2P file-sharing system there is a
program in each host that participates in the file-sharing
community.
• Write software that will run on multiple end systems.
• This software could be written, for example, in C, Java, or
Python.
• Do not need to write software that runs on network core devices,
such as routers or link-layer switches.
Network Application Architectures
• The network architecture is fixed and provides
a specific set of services to applications.
• The application architecture, is designed by
the application developer.
In choosing the application architecture, an
application developer will likely draw on one of
the predominant architectural paradigms used in
modern network applications:
• The client-server architecture
• The peer-to-peer (P2P) architecture
Client-Server Architecture
• In a client-server architecture, there is an
always-on host, called the server, which
services requests from many other hosts,
called clients.
• The client hosts can be either sometimes-on or
always-on.
• A classic example is the Web application for
which an always-on Web server services
requests from browsers running on client
hosts.
• Clients do not directly communicate with each
other. For example, in the Web application, two
browsers do not directly communicate.
• 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 IP address.
• Some of the better-known applications with a
client-server architecture include the Web, FTP,
Telnet, remote login and e-mail.
• In a client-server application, a single-server
host is incapable of keeping up with all the
requests from clients. For this reason, a data
center, housing a large number of hosts, is
often used to create a powerful virtual server.
• The most popular Internet services—such as
search engines (e.g., Google and Bing),
Internet commerce (e.g., Amazon and e-Bay),
Web-based email (e.g., Gmail and Yahoo
Mail), social networking (e.g., Facebook and
Twitter)— employ one or more data centers.
Peer-to-Peer Architecture
• The application exploits direct communication
between pairs of intermittently connected hosts,
called peers.
• The peers are not owned by the service
provider, but are instead desktops and laptops
controlled by users, with most of the peers
residing in homes, universities, and offices.
• Because the peers communicate without
passing through a dedicated server, the
architecture is called peer-to-peer.
• None of the participating hosts is required to be
always on, in addition, a participating host may
change its IP address each time it comes on.
• Example for pure P2P architecture is Gnutella- an
open-source P2P file-sharing application.
• In Gnutella- any host can request files, send files,
query to find where a file is located, respond to
queries and forward queries.
• Many of today’s most popular and traffic-
intensive applications are based on P2P
architectures. These applications include file
sharing (e.g., BitTorrent), Internet Telephony
(e.g., Skype).
• Features:
• Self-scalability:
• For example, in a P2P file-sharing application,
although each peer generates workload by
requesting files, each peer also adds service
capacity to the system by distributing files to
other peers.
• Cost effective:
• P2P architectures are also cost effective, since
they normally don’t require significant server
infrastructure and server bandwidth
• Future P2P applications face three major challenges:
1. ISP Friendly. Most residential ISPs have been dimensioned for
“asymmetrical” bandwidth usage, that is, for much more
downstream than upstream traffic. But P2P video streaming and
file distribution applications shift upstream traffic from servers
to residential ISPs, thereby putting significant stress on the
ISPs. Future P2P applications need to be designed so that they
are friendly to ISPs .
• Each URL has two components: the hostname of the server that
houses the object and the object’s path name.
HTTP/1.1 200 OK
Connection: close
Date: Tue, 09 Aug 2011 15:44:04 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Tue, 09 Aug 2011 15:11:03 GMT
Content-Length: 6821
Content-Type: text/html
HTTP/1.1 200 OK
Date: Sat, 8 Oct 2011 15:39:29
Server: Apache/1.3.0 (Unix)
Last-Modified: Wed, 7 Sep 2011 09:23:24
Content-Type: image/gif
• Once the server has authorized the user, the user copies one
or more files stored in the local file system into the remote
file system (or vice versa).
• HTTP and FTP are both file transfer protocol and have
many common characteristics . Ex Both runs on top of
TCP.
• The two application-layer protocols have some important
differences.
• The most striking difference is that FTP uses two parallel
TCP connections to transfer a file, a control connection
and a data connection.
• The control connection is used for sending control
information between the two hosts—information such as
user identification, password, commands to change
remote directory, and commands to “put” and “get” files.
• The data connection is used to actually send a file.
Control and data connections
FTP Commands and Replies
From: [email protected]
To: [email protected]
Subject: Searching for the meaning of life.
Mail Access Protocols
• Introducing a special mail access protocol that
transfers messages from recipient’s mail server
to his local PC.
• There are currently a number of popular mail
access protocols, including
-Post Office Protocol—Version 3 (POP3).
-Internet Mail Access Protocol (IMAP).
-HTTP.
E-mail protocols and their communicating entities
POP3
• POP3 is short and quite readable.