Chapter 2- Application layer.ppt
《Chapter 2- Application layer.ppt》由会员分享,可在线阅读,更多相关《Chapter 2- Application layer.ppt(96页珍藏版)》请在麦多课文档分享上搜索。
1、2: Application Layer,1,Chapter 2: Application layer,2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS,2.6 P2P file sharing 2.7 Socket programming with TCP 2.8 Socket programming with UDP 2.9 Building a Web server,2: Application Layer,2,Chapt
2、er 2: Application Layer,Our goals: conceptual, implementation aspects of network application protocols transport-layer service models client-server paradigm peer-to-peer paradigm,learn about protocols by examining popular application-level protocols HTTP FTP SMTP / POP3 / IMAP DNS programming networ
3、k applications socket API,2: Application Layer,3,Some network apps,E-mail Web Instant messaging Remote login P2P file sharing Multi-user network games Streaming stored video clips,Internet telephone Real-time video conference Massive parallel computing,2: Application Layer,4,Creating a network app,W
4、rite programs that run on different end systems and communicate over a network. e.g., Web: Web server software communicates with browser software little software written for devices in network core network core devices do not run user application code application on end systems allows for rapid app
5、development, propagation,2: Application Layer,5,Chapter 2: Application layer,2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS,2.6 P2P file sharing 2.7 Socket programming with TCP 2.8 Socket programming with UDP 2.9 Building a Web server,2:
6、Application Layer,6,Application principles,architectures sockets protocols,2: Application Layer,7,Client-server architecture,server: always-on host permanent IP address server farms for scaling clients: communicate with server may be intermittently connected may have dynamic IP addresses do not comm
7、unicate directly with each other,2: Application Layer,8,Pure P2P architecture,no always-on server arbitrary end systems directly communicate peers are intermittently connected and change IP addresses example: GnutellaHighly scalable but difficult to manage,2: Application Layer,9,Hybrid of client-ser
8、ver and P2P,Skype Internet telephony app Finding address of remote party: centralized server(s) Client-client connection is direct (not through server) Instant messaging Chatting between two users is P2P Presence detection/location centralized: User registers its IP address with central server when
9、it comes online User contacts central server to find IP addresses of buddies,2: Application Layer,10,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
10、 by exchanging messages,Client process: process that initiates communication Server process: process that waits to be contacted,Note: applications with P2P architectures have client processes & server processes,2: Application Layer,11,Sockets,process sends/receives messages to/from its socket socket
11、 analogous to door 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,Internet,controlled by OS,controlled by app developer,API: (1) choice of transport protocol; (2) ability to fix a fe
12、w parameters (lots more on this later),2: Application Layer,12,Addressing processes,to receive messages, process must have identifier host device has unique32-bit IP address Q: does IP address of host on which process runs suffice for identifying the process?,2: Application Layer,13,Addressing proce
13、sses,to receive messages, process must have identifier host device has unique32-bit IP address Q: does IP address of host on which process runs suffice for identifying the process? Answer: NO, many processes can be running on same host,identifier includes both IP address and port numbers associated
14、with process on host. Example port numbers: HTTP server: 80 Mail server: 25 to send HTTP message to www.cs.virginia.edu web server: IP address: 128.119.245.12 Port number: 80 more shortly,2: Application Layer,14,App-layer protocol defines,Types of messages exchanged, e.g., request, response Message
15、syntax: what fields in messages & how fields are delineated Message semantics meaning of information in fields Rules for when and how processes send & respond to messages,Public-domain protocols: defined in RFCs allows for interoperability e.g., HTTP, SMTP Proprietary protocols: e.g., KaZaA,2: Appli
16、cation Layer,15,What transport service does an app need?,Data loss some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer,Timing some apps (e.g., Internet telephony, interactive games) require low delay to be “effective”,Bandwidth
17、some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective” other apps (“elastic apps”) make use of whatever bandwidth they get,2: Application Layer,16,Transport service requirements of common apps,Applicationfile transfer e-mail Web documents real-time audio/videostored audio
18、/video interactive games instant messaging,Data lossno loss no loss no loss loss-tolerantloss-tolerant loss-tolerant no loss,Bandwidthelastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps up elastic,Time Sensitiveno no no yes, 100s msecyes, few secs yes, 100s msec yes
19、and no,2: Application Layer,17,Internet transport protocols services,TCP service: connection-oriented: setup required between client and server processes reliable transport between sending and receiving process flow control: sender wont overwhelm receiver congestion control: throttle sender when net
20、work overloaded does not provide: timing, minimum bandwidth guarantees,UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee Q: why bother? Why is there a UDP?,2: A
21、pplication Layer,18,Internet apps: application, transport protocols,Applicatione-mail remote terminal access Web file transfer streaming multimediaInternet telephony,Application layer protocolSMTP RFC 2821 Telnet RFC 854 HTTP RFC 2616 FTP RFC 959 proprietary (e.g. RealNetworks) proprietary (e.g., Vo
22、nage,Dialpad),Underlying transport protocolTCP TCP TCP TCP TCP or UDPtypically UDP,2: Application Layer,19,Chapter 2: Application layer,2.1 Principles of network applications app architectures app requirements 2.2 Web and HTTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS,2.6 P2P file sharing 2.7 Soc
23、ket programming with TCP 2.8 Socket programming with UDP 2.9 Building a Web server,2: Application Layer,20,Web and HTTP,First some jargon Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file, Web page consists of base HTML-file which includes several referenced o
24、bjects Each object is addressable by a URL Example URL:,2: Application Layer,21,HTTP overview,HTTP: hypertext transfer protocol Webs application layer protocol client/server model client: browser that requests, receives, “displays” Web objects server: Web server sends objects in response to requests
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CHAPTER2APPLICATIONLAYERPPT
