计算机网络
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Highly scalable but difficult to manage
2: Application Layer
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
2: Application Layer
11
Processes communicating
Process: program running within a host. within same host, two processes communicate using inter-process communication (defined by OS). processes in different hosts communicate by exchanging messages Client process: process that initiates communication Server process: process that waits to be contacted
games streaming stored video clips
conferencing grid computing cloud computing remote desktop communication
2: Application Layer
5
Creating a network app
2: Application Layer
13
Addressing processes
to receive messages,
process must have
identifier
host device has unique
32-bit IP address Q: does IP address of host on which process runs suffice for identifying the process? A: No, many processes can be running on same host
2: Application Layer 10
App-layer protocol defines
Types of messages
exchanged,
e.g., request, response
Message syntax: what fields in messages & how fields are delineated Message semantics meaning of information in fields Rules for when and how
Pure P2P architecture
no always-on seystems
directly communicate peer-peer peers are intermittently connected and change IP addresses
Data loss some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing (delay and delay jitter) some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” Throughput some apps (e.g., multimedia) require minimum amount of throughput to be “effective” other apps (“elastic apps”) make use of whatever throughput they get Security Encryption, data integrity, authentification…
with TCP 2.8 Socket programming with UDP
SMTP, POP3, IMAP
2.5 DNS
2: Application Layer
4
Some network apps
e-mail web instant messaging remote login P2P file sharing multi-user network voice over IP real-time video
2: Application Layer
3
Chapter 2: Application layer
2.1 Principles of
network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail
2.6 P2P applications 2.7 Socket programming
No need to write software for network-core devices
application transport network data link physical
Network-core devices do not run user applications applications on end systems allows for rapid app development, propagation
Public-domain protocols: defined in RFCs allows for interoperability e.g., HTTP, SMTP Proprietary protocols: e.g., Skype
processes send & respond to messages
Internet
TCP with buffers, variables
controlled by OS
API: (1) choice of transport protocol; (2) ability to fix
a few parameters (lots more on this later)
communicate with server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other
2: Application Layer 8
EE284 Lecture Note Nick McKeown Professor of Electrical Engineering and Computer Science, Stanford University
2: Application Layer
2
Reading Assignment: Chapter 2
IP address and port numbers associated with process on host. Example port numbers:
identifier includes both
HTTP server: 80 Mail server: 25
to send HTTP message
host or server
host or server
process socket TCP with buffers, variables
controlled by app developer
process socket
sending process shoves message out door sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process
Note: applications with
P2P architectures have client processes & server processes
2: Application Layer 12
Sockets
process sends/receives
messages to/from its socket socket analogous to door
write programs that
application transport network data link physical
run on (different) end
systems
communicate over network e.g., web server software communicates with browser software
application transport network data link physical
2: Application Layer
6
Application architectures
Client-server Peer-to-peer (P2P) Hybrid of client-server and P2P
2: Application Layer 15
Transport service requirements of common apps
2: Application Layer
7
Client-server architecture
server: always-on host permanent IP address server farms for scaling clients:
client/server
计算机网络 Computer Networks
温武少
wwensysu@
Introduction
1-1
Chapter 2 Application Layer
Acknowledgement
Computer Networking: A Top Down Approach ,
4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
to web server:
IP address: 202.116.65.45 Port number: 80
2: Application Layer
more shortly…
14
What transport service does an app need?