Please enable JavaScript.
Coggle requires JavaScript to display documents.
NWC201 - 2 - APPLICATION LAYER (The Web and HTTP (Overview of HTTP…
NWC201 - 2 - APPLICATION LAYER
Principles of Networking Applications
Network Application Architectures
Client-Server
Server
Permanent IP address
Data center for scaling
Always on host
Client
Communicate with server
May be intermittenly connected
May have dynamic IP addresses
Do not communicate directly with each other
Peer-to-Peer
Abitrary end systems directly communicate
Service provide and demand
peers request service from other peers, provide service in return to other peers
Seft-scability
New peers bring new service capacity, as well as service demands
No always-on server
peers are intermittently connected and change IP addresses - Complex management
Processes Communicating
Process
What is a process
Processes in different hosts, communicate by exchanging messages
Program running within a host
Within same host, two processes communicate using Inter-process communication which is define by OS
Client process
Processes that initiate communication
Server process
Processes that wait for request from client
P2P application
Have client process and server process
Socket
Process sends/receives messages to/from its socket
Sending process shoves message out door
Sending process relies on transport infrastructure to deliver message to socket at receiving process
Addressing Process
IP address of host
Port numbers of process
Transport Services used by Application Layer
Characteristics
Timing
Some apps (chat, call, game online) need low delay to be effective
Throughput
Some apps require minimum amount throughput to be effective
Other apps(elastic app) can run with whatever throughput thay got
Data integrity
Some apps require 100% reliable data transfer
Other apps can tolerate some loss
Security
Encryption
Data integrity
Services
TCP service
Congestion Control
Connection-Oriented
Flow Control
Does not provide
Timing
Minimum throughput guarantee
Security
Reliable transport
UDP service
Unreliable transport
Does not provide
Congestion Control
Timing
Flow control
Minimum thoughput
Security
Connection setup
Reliability
Security
TCP and UDP
No encryption
SSL
Provide encrypted TCP connection
Data integrity
End-point authentication
Application-Layer Protocols
Defines
Message semantics
Meaning of infomation in each fields
Rules
When and How process send and response to messages
Message syntax
What fields in messages?
How fields are delineated?
Open protocols
Defined in RFCs
Allows for interoperability
HTTP, SMTP, FTP...
Type of messages exchanged
Request
Response
Proprietary protocols
Skype protocol
Venturi transport protocol
Microsoft exchange server protocol
Application need service from transport-layer to exchange data
The Web and HTTP
Overview of HTTP
Use TCP protocal to transfer data
Stateless
Server don't maintain any infomation about past client
Connections
Persistent
Close connection after receive a packet
One packet is sent over TCP connection
Non-persistent
Multiple packet can be sent over single TCP connection
RTT
Time from client send request to client receive a response
HTTP Message Format
HTTP Request Message
Header lines
Body
Request line
HTTP Response Message
Header lines
Data requested
Status line
Cookies
Web Caching - Proxy server
The Conditional GET
Goal: don’t send object if cache has up-to-date cached version
File transfer: FTP
Transfer file to/from host
Client - server model
Client
Side that initiates transfer
Server
Remote host
Port 21
Electronic Mail in the internet
Three major components:
Mail servers
Message queue
outgoing messages
SMTP protocol
Protocal between two mail server to send email message
Mailbox
Contains incoming messages
Simple Mail Transfer Protocol
User agents
mail reader
composing, editing, reading mail message
Incomming and outgoing messages are stored in mail server
Outlook, Thunderbird
Mail message format
Header line
Message body
Mail access protocols
IMAP
Internet Mail Access Protocol [RFC 1730]: more features, including manipulation of stored msgs on server
HTTP
gmail, Hotmail, Yahoo! Mail, etc.
POP
Post Office Protocol [RFC 1939]: authorization, download
DNS - Domain Name System
Peer-to-peer application
Describe
arbitrary end systems directly communicate
peers are intermittently connected and change IP addresses
no always-on server
Example
bitTorrent
Skype
Streaming
Socket programming