1
CS 455/555
Intro to Networks and Communications
Client/Server Computing
and Socket Programming
Michele Weigle
Department of Computer Science
Old Dominion University
mweigle@cs.odu.edu
http://www.cs.odu.edu/~mweigle/courses/cs4 55-f06/
http://www.cs.odu.edu/~mweigle/courses/cs5 55-f06/
2
Application-Layer Protocols
Overview
! Application-layer protocols define:
» The types of messages exchanged
» The syntax and semantics of messages
» The rules for when and how messages are
sent
! Public protocols (defined in RFCs)
» HTTP, FTP, SMTP, POP, IMAP, DNS
! Proprietary protocols
» RealAudio, RealVideo
» IP telephony
» …
local ISP
company
network
regional ISP
application
transport
network
link
physical
application
3
Network Working Group R. Fielding UC Irvine
Request for Comments: 2616 J. Gettys Compaq/W3C
Obsoletes: 2068 J. Mogul Compaq
Category: Standards Track H. Frystyk W3C/MIT
L. Masinter Xerox
June 1999 P. Leach Microsoft
T. Berners-Lee W3C/MIT
Hypertext Transfer Protocol -- HTTP/1.1
Abstract
The Hypertext Transfer Protocol (HTTP) is an application-level
protocol for distributed, collaborative, hypermedia information
systems. It is a generic, stateless, protocol which can be used for
many tasks beyond its use for hypertext, such as name servers and
distributed object management systems, through extension of its
request methods, error codes and headers [47]. A feature of HTTP is
the typing and negotiation of data representation, allowing systems
to be built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information
initiative since 1990. This specification defines the protocol
referred to as "HTTP/1.1", and is an update to RFC 2068 [33].
4
Application-Layer Protocols
Outline
! The architecture of distributed systems
» Client/Server computing
» P2P computing
» Hybrid (Client/Server and P2P) systems
! The programming model used in
constructing distributed systems
» Socket programming
! Example client/server systems and
their application-level protocols
» The World-Wide Web (HTTP)
» Reliable file transfer (FTP)
» E-mail (SMTP & POP)
» Internet Domain Name System (DNS)
local ISP
company
network
regional ISP
application
transport
network
link
physical
application
5
Application-Layer Protocols
Outline
local ISP
company
network
regional ISP
! Protocol design issues:
» In-band v. out-of-band control signaling
» Push v. pull protocols
» Persistent v. non-persistent connections
! Client/server service architectures
» Contacted server responds versus forwards
request
! Example client/server systems and
their application-level protocols
» The World-Wide Web (HTTP)
» Reliable file transfer (FTP)
» E-mail (SMTP & POP)
» Internet Domain Name System (DNS)
application
transport
network
link
physical
application
6
local ISP
company
network
regional ISP
Application-Layer Protocols
Client-Server Architecture
Server:
» always-on host
» permanent IP address
» server farms for scaling
Clients:
» communicate with server
» may be intermittently
connected
» may have dynamic IP
addresses
» do not communicate
directly with each other
7
Application-Layer Protocols
Pure P2P Architecture
! No always-on server
! Arbitrary end systems
directly communicate
! Peers are intermittently
connected and change IP
addresses
! Example: Gnutella
Highly scalable
But difficult to manage
local ISP
company
network
regional ISP
8
Application-Layer Protocols
Hybrid of Client-Server and P2P
Napster
» File transfer P2P
» File search centralized:
" Peers register content at central server
" Peers query same central server to locate content
Instant messaging
» Chatting between two users is P2P
» Presence detection/location centralized:
" User registers its IP address with central server when it comes online
" User contacts central server to find IP addresses of buddies
9
Application-Layer Protocols
Transport Services
Data loss
! Some apps (e.g., audio) can
tolerate some loss
! Other apps (e.g., file transfer,
telnet) require 100% reliable
data transfer
Timing
! Some apps (e.g., Internet
telephony, interactive
games) require low delay
to be “effective”
Bandwidth
! Some apps (e.g.,
multimedia) require
minimum amount of
bandwidth to be
“effective”
! Other apps (“elastic
apps”) make use of
whatever bandwidth they
get
10
Internet Applications
Transport Service Requirements
Application
file transfer
e-mail
Web documents
real-time audio/video
stored audio/video
interactive games
instant messaging
Data loss
no loss
no loss
no loss
loss-tolerant
loss-tolerant
loss-tolerant
no loss
Bandwidth
elastic
elastic
elastic
audio: 5kbps-1Mbps
video:10kbps-5Mbps
same as above
few kbps up
elastic
Time Sensitive
no
no
no
yes, 100’s msec
yes, few secs
yes, 100’s msec
yes and no