Sunteți pe pagina 1din 14

CS3441

Lecture 5- App Layer

CS3441 - Computer Communications and Networks I 1


Layer 5: Application layer
 Principles of network  P2P applications
applications  Socket programming
 Web and HTTP with TCP
 FTP  Socket programming
 Electronic Mail with UDP
 SMTP, POP3, IMAP
 DNS

CS3441 - Computer Communications and Networks I 2


Layer 5: Application Layer
Our goals:  learn about protocols
 conceptual, by examining popular
implementation application-level
aspects of network protocols
application protocols  HTTP
 transport-layer  FTP
service models  SMTP / POP3 / IMAP
DNS
 client-server

paradigm  programming network


 peer-to-peer
applications
paradigm  socket API

CS3441 - Computer Communications and Networks I 3


Some network apps
 e-mail  voice over IP
 web  real-time video
 instant messaging conferencing
 remote login
 P2P file sharing
 multi-user network
games
 streaming stored video
clips

CS3441 - Computer Communications and Networks I 4


The Application Layer

Uses transport services to Application


build distributed
Transport
applications
Network

Link

Physical

CS3441 - Computer Communications and Networks I 5


Creating a network app application
transport

write programs that


network
data link
physical
 run on (different) end
systems
 communicate over network
 e.g., web server software
communicates with browser
software
No need to write software application
transport

for network-core devices network


data link
application
physical
 Network-core devices do transport
network

not run user applications data link


physical

 applications on end systems


allows for rapid app
development, propagation

CS3441 - Computer Communications and Networks I 6


Application architectures
 Client-server
 Peer-to-peer (P2P)
 Hybrid of client-server and P2P

CS3441 - Computer Communications and Networks I 7


Client-server architecture
server:
 always-on host
 permanent IP address
 server farms for
scaling
clients:
 communicate with server
client/server  may be intermittently
connected
 may have dynamic IP
addresses
 do not communicate
directly with each other
CS3441 - Computer Communications and Networks I 8
Pure P2P architecture
 no always-on server
 arbitrary end systems
directly communicate peer-peer
 peers are intermittently
connected and change IP
addresses

Highly scalable but


difficult to manage

CS3441 - Computer Communications and Networks I 9


Hybrid of client-server and P2P
Skype
 voice-over-IP P2P application
 centralized server: finding address of remote
party:
 client-client connection: direct (not through
server)
Instant messaging
 chatting between two users is P2P
 centralized service: client presence
detection/location
• user registers its IP address with central
server when it comes online
• user contacts central server to find IP
addresses of buddies
CS3441 - Computer Communications and Networks I 10
Processes communicating
Process: program running Client process: process
within a host. that initiates
 within same host, two
communication
processes communicate Server process: process
using inter-process that waits to be
communication (defined contacted
by OS).
 processes in different  Note: applications with
hosts communicate by P2P architectures have
exchanging messages client processes &
server processes

CS3441 - Computer Communications and Networks I 11


Sockets
 process sends/receives host or host or
messages to/from its server server

socket
controlled by
 socket analogous to door app developer
process process
 sending process shoves
message out door socket socket

sending process relies on TCP with TCP with


 Internet
buffers, buffers,
transport infrastructure variables variables
on other side of door which
brings message to socket
controlled
at receiving process by OS

CS3441 - Computer Communications and Networks I 12


Addressing processes
 to receive messages,
process must have
identifier
 host device has unique
32-bit IP address
 Q: does IP address of
host suffice for
identifying the process?

CS3441 - Computer Communications and Networks I 13


Addressing processes
 to receive messages,
 identifier includes both
process must have IP address and port
identifier numbers associated with
process on host.
 host device has unique
 Example port numbers:
32-bit IP address
 HTTP server: 80
 Q: does IP address of
 Mail server: 25
host on which process
 to send HTTP message
runs suffice for
identifying the to cs.nul.ls server:
IP address:
process? 
197.220.153.160
 A: No, many  Port number: 80
processes can be
running on same host
CS3441 - Computer Communications and Networks I 14

S-ar putea să vă placă și