Escolar Documentos
Profissional Documentos
Cultura Documentos
Reliable data Transfer: We want to provide reliable data transfer. When this isn
't provided we
classify these as loss-tolerant applications such as multimedia photos/video/aud
io.
Throughput:
We define throughput in Chapter 1 as the minimum rate in which the data is deliv
ered.
When bandwidth is factor, we call these applications bandwidth-sensitive applica
tions.
Security: Transport protocol can sometimes encrypt the data for security service
s.
TCP Services:
The TCP service model is to include a connection oriented service an a reliable
data transfer service. When an application
invokes TCP as its transport protocol, the application receives both from TCP:
Connection oriented service. The TCP client and server exchange transport layer
control information with each other before the application
level messages begin to flow. This is called handshaking. After handshaking, a T
CP connection exists between the sockets
of the two processes. The connection is full duplex in which two processes can s
end messages to each other at the exact same time.
After sending messages, it must destroy the connection.
Reliable data transfer service: The communicating processes can rely on TCP to d
eliver all data sent without error
and in order. When one side of the application passes a stream of bytes into a s
ocket, it can count on TCP to deliver
the same stream of bytes to the receiving socket. No missing or duplicate bytes.
UDP services:
UDP is a no frills lightweight transport protocol. Minimal services. No handshak
ing exits here
Services that are not provided by Transport Protocols:
TCP provides reliable end-end datatransfer. Can be enhanced at the application l
ayer with SSL for security
Application Layer Protocols:
The types of messages exchanged.
The syntax of various message types
Semantics of the field, i.e. the meaning of the information
Rules for determining when and how a process sends messages and responds.
Section 2: HTTP
Heart of the internet. Client and Server program on different end systems
They communicate using HTTP protocol.
Web page: Consists of objects, usually a HTML file as the base object, and other
files.
References the URLs. URL: http://www.aaa.edu/something/picture1.jpg
Web browsers: Safari, Internet Explorer, Firefox implement the client side. Thus
we use browser and client interchangeably
Web servers: Implement the server side of HTTP
HTTP uses TCP as the underlying transport layer. Client first intitates a TCP co
nnection request
with the server.
Client sends HTTP messages into the socket interface and receivesHTTP response m
essages from its socket interface.
HTTP server receives request messages from the socket interface and sends respon
se messages into its socket interface. Once the client sneds a message into the
interface, in
the hands of TCP. TCP does provide a reliable data transfer service to HTTP. Imp
lies that each HTTP request message
will eventually arrive at the server.
HTTP will not lose data in transfer.
2.2.1: Non persistent and Persistant Connections
In many applications, the client and server communicate for a long time, with th
e client
requesting a lot of stuff and the server responding to every request.
When client-server interaction is taking place over TCP, should the developer se
nd
each request/response over TCP one connection or several?
If we use non persistant connections, this means its done in one TCP connection.
If we use persistant connections, then that means we have a seperate TCP connect
ion
for each request/response.
Non persistant connections
Lets suppose we want to load up a website. www.somename.com
This contains a base HTML file and 10 JPEG objects.
This is what happens:
1. HTTP client initiates a connection to the server on port 80, which is the def
ault port number for HTTP.
Of course, there will be a TCP socket for the client and server.
2. The client sends a HTTP request message via the socket.
3. HTTP server processes the request message, retrieves the object, encapsulates
the object in
HTTP response message and sends the message to the client (via the socket).
4. HTTP server process tells TCP to close the TCP connection. TCP will not termi
nate until it
knows the client receives the message.
5. HTTP client receives the response message. TCP connection terminates. The obj
ects are loaded.
6. Repeat 1-4 for all objects.
This is non-persistant connections. The connection does not persist for each obj
ect
When a user wants to request a web page, 11 TCP connections are generated, assum
ing that the
web page has 10 objects.
Definition:
Round trip time (RTT) the time it takes for a small packet to travel from client
to server, and hten
back to the client. RTT includes packet-propogation delays, packet queing delays
. See the following
space time diagram
| \
|
| \
|
| \ |
|
\ |
|
\ |
|
\|
|
/ |
|
/ |
| / |
| /
|
| /
|
urs
| \
|
| \
|
| \ |
|
\ |
|
\ |
|
|
|
|
|
|
|
/|
|
/ |
|
/ |
| / |
| /
|
| /
|
RTT.
Total time = Round Trip Time. At this point the Request for a file occ
Entire file received. From the Request for file and this point is the
each of these connections, TCP buffers must be allocated and TCP variables m
be kept in both
client and server. Can place a significatn burden on the web server, which
be serving requests from thousands of different clietns simultaneosuly.
Subsequent requests between the same client and server can be sent over a single
TCP connection.
Multiple web pages residing on the same server can be sent from the server to th
e same client over a single persistent TCP connection.
These requests can be made back to back without waiting for replies to pending r
equests.
HTTP server closs a connection when it isn[t used for a certain time (timeout in
terval).
Remarks: The HTTP response time: one RTT to inittate TCP connection
one RTT for HTTP request and first few bytes of HTTP response to return
non persistant HTTP response time = 2RTT + file transmission time
2.2.3 HTTP Message Format
The HTTP request Message
GET /somedir/page.html HTTP/1.1
First line of HTTP request message is called the requst line. The subsequent lin
es are called the header lines.
The request line has three files, the method field, the URL and the HTTP version
field.
The entire body is empty with the GET method, but is used with the POST method.
HTTP response Message
200 OK: Wish granted
301: Moved Permanantly
400: Bad Request
404: Not found
505: HTTP version not supported
2.2.4: User-Server Interaction: Cookies
Consists of: name of server, Identification sumer
Web Caching
Web cache: A proxy server entity that satisfies HTTP requests on the bealh of an
origin Web server.
It has its own disk storage and keeps coopies of recently requested objects in t
his storage.
As shown, a user's browser can be configured so that all of the user's HTTP requ
ests are first directed to the cache.
Once a browser is configured, each browser's request for an object is first dire
cted to the web cache.
Intensity = Request Rate * Speed
2.3 FTP (File Transfer Protocol)
In an FTP session, user is sitting in from of the local host, and wants to perfo
rm a
transaction of files to a remote host.
First provides username and password,. The user then requests to get or transfer
fils.
Differences between HTTP and FTP:
FTP uses two parallel connections to transfer a file, a control connection and a
data connection.
The control connection is used to send
control information between the two hosts.
Information such as user id, password and commands to "put and "get files
Data connection is used to send a file.
2.4 Email
One of the most important applications on the net.
Three major components: User angents, Mail servers and SMTP (Simple Mail Transfe
r Protocol)
Suppose Alice wants to send a message to Bob.
Bob's mailbos manages and maintains the messages that have been sent to him. .
When Bob wants to access the messages in his mailbox, the mail server containing
his mailabox authenticates BOB. Alice's mail server must
deal with the failures in Bob's mail server.
If Alice's server cannot deliver the Mail to Bob's mailbox, then the message is
held
in a message queue.
SMTP is a common protocol for email.
Relies on TCP. to transfer the mail from the sender to the recipients mail serv
er.
SMTP has a client side and a server side. Both client and server of SMTP run on
every server.
When SMTP sends a message, it is a clientn, when it receives messages it acts a
SMTP server.
SMTP uses persistent connection.
Three phases: Authorization (user name and password),
Transaction (receives email)
Quit command, user quits (mail service deletes all messages that were marked for
deletion).
Local Distribution:
There exist replicated DNS servers. Its up to the DNS server to balance the load
amoung many
Table of IP addresses and the DNS server tells the client which one to go to.
2.5.2: How does DNS work?
Typically one DNS server that contains all the mappings. However, this centraliz
ed design
approach is bad because of maintenance, single point of failure, traffic volume
and
Distant centralized database.
Hierarachal approach
DNS uses a hierarchy that are distributed amoung the planet.
No DNS server has all mappings for the hosts in the internet.
Many classes of DNS servers (root) (top level) DNS servers and authority DNS ser
ver.
The client forst contacts one of the root servers which returns the IP addresses
for the TLD server fr the top level domain.
TLD authoritative servers
Top level domain (TLD servers)
responsible for com, org, net edu aero jobs, museums and all top level country d
omains
.edu .fra .au etc etc.
Important type of DNS server called the local DNS server.Does not belong to the
hierarchy of servers, but is central to the
DNS architecture.
DNS name resolution:
Iterated query. Passing the buck to the next server.
Server A: I don't know ask server B
Server B: I don't know... ask server N
DNS caching: Very important for DNS systems.
In a query chain when a DNS server receives a DNS reply (a mapping for instance)
it can
cache the mapping in its local memory.
Each time the local DNS server dns.umanitoba.edu
receives a reply from some DNS server, it can cache any of the information in th
e reply.
DNS Records and messages 2.5.3