Chapter 2: Application Layer
Chapter 2: Application Layer
pg. 1
Performance
Administration
Dis-Advantages
Cost
Complexity
All devices acts as both Client and Server. I.e., everyone talks to everyone
There isnt an always-on server at the center of the application (No Server &
Server OS needed)
Instead, arbitrary pairs of hosts, called Peers, communicate directly with each
other client hosts.
Peers are intermediately connected and the hosts may change IP address each
time it comes on.
One of the greatest strength is the Scalability- millions of peers may participate
in the file sharing community with each one functioning as a server and
contributing resource to the community
pg. 2
Easy to deploy
Low cost
Dis-advantage:
Instant Message:
The chatting between two users is typically P2P; that is the text sent between the
two users does not pass through an always-on, intermediate server.
However, when User1 launches the instant messaging application, he/she
registers themselves at a central server; and when User2 wants to chat with
someone on host buddy list, User2 instant messaging client contacts the central
server to find out which buddies are currently online and available
Process Communicating:
SOCKETS:
When a process sends messages into, and receives from, the network through
its Sockets
Example on how sockets works: (Just like how we send a letter to another
person)
When a process wants to send a message to another process on another host, it
pulls the message out its door(Socket) and into the network.
The sending process assumes that there is a transportation infrastructure on the
other side of its door that will transport the message across the door the network
to the door of the destination process.
pg. 3
Once the message arrives at the destination host, the message through the
receiving processs door (Socket) and the receiving process acts on the message
API
(Application
Interface):
Programming
the
Transportation
pg. 4
In this case the identifier includes both IP address and port numbers
associated with process on host.
Each of the Port numbers are assigned by the Network application developer
while creating a new network application
Application-Layer Protocols:
Message Syntax: determines the various message types, such as the fields in
the message and how the fields are allocated.
Message Semantics: has the meaning of the information in the fields
Rules for determining when and how a process sends messages and responds
to messages
pg. 5
Object can be HTML file, JPEG image, Java applet, audio file,
Web page consists of base HTML-file which includes several referenced objects
client/server model
It uses TCP:
HTTP connections:
Non-persistent HTTP:
enters
URL
pg. 6
pg. 7
total = 2RTT+transmit time (2RTT 1st RTT is from Initiate TCP till 1st request file
and 2nd RTT if from file request till file received)
Persistent HTTP
Multiple objects can be sent over single TCP connection between client and
server.
Allow sites to keep track of users. Although not all sites use cookies, most major
portal (like YAHOO), e-commerce (AMAZON) sites makes extensive use of
Cookies
Four Cookie Technology:
1) cookie header line of HTTP response message
2) cookie header line in HTTP request message
3) cookie file kept on users host, managed by users browser
4) back-end database at Web site
Example:
Susan who always access the Web using Internet Explorer from her home PC
Visits specific e-commerce site for first time and this sites uses cookies
When the request comes into the Web server, the Web site creates a unique
identification number and creates an entry in its back-end database, that is
pg. 8
unique ID
entry in backend database for ID )
The server then responds to Susans browser, including in the HTTP response a
Set-cookie: header, which contains the identification number. For example
Set-Cookie: 1678453
When Susans browser receives the HTTP response message, it sees the SetCookie: header each time.
Authorization
Shopping carts
Recommendations
pg. 9
Internet dense with caches: enables poor content providers to effectively deliver
content (but so does P2P file sharing)
pg. 10
Consequences
utilization on access link (for each request on LAN) = 100 Kbits / request
Traffic intensity of the access link delay = (15 req/sec) * (100 Kbits/sec) / (1.5
Mbps)
= (15 req/sec) * (100 Kbits/sec) / (1500 Kbps)
= 1sec
Possible solution:
Consequences:
utilization on access link (for each request on LAN) = 100 Kbits / request
Traffic intensity of the access link delay = (15 req/sec) * (100 Kbits/sec) / (10
Mbps)
= (15 req/sec) * (100 Kbits/sec) / (15000 Kbps)
= 0.1sec
pg. 11
the user copies one or more files stored in the file system in to the remote file
system
Here, HTTP and FTP are both files transfer protocols and have many common
characteristics; for example, they both run on top of TCP. However, the two
application layers have some important differences.
The most important differences, FTP uses two parallel TCP connections to
transfer a file, control connection and a data connection.
The control connection is used for sending control information between the
two hosts. i.e., the information such as identification, password, commands to
change remote directory and commands to Put and get files.
The data connection is used actually to send a File
pg. 12
SMTP transfers message from senders mail server to the recipient mail server.
Uses TCP to reliably transfer email message from client to server, port 25
direct transfer: sending server to receiving server
pg. 13
pg. 14
pg. 15
human beings can ne identified by the names and social society numbers
internet can identify the hosts by its host name, such as www.cnn.com and
www.cis.poly.edu
hosts names can consist of variable length alphanumeric characters, they would
be difficult to process by routers, for those reasons, hosts are also identified by
so-called IP address (32 bit)
pg. 16
Maintenance is high
A list of current root DNS servers is available via root servers. These servers is actually
a cluster of replicated servers, for both security and reliability purposes.
pg. 17
Iterated query:
pg. 18
pg. 19