【大学课件】A TopDown Approach Featuring the Internet.ppt
《【大学课件】A TopDown Approach Featuring the Internet.ppt》由会员分享,可在线阅读,更多相关《【大学课件】A TopDown Approach Featuring the Internet.ppt(127页珍藏版)》请在三一办公上搜索。
1、Computer Networking A Top-Down Approach Featuring the Internet计算机网络-自顶向下方法与Internet特色,Chapter 2 Application Layer,http:/,Chapter goals,principles of network applicationstransport-layer service modelsClient/server P2PProcesses Communicationapplication-level protocolsHTTP/FTP/SMTP/POP3/IMAP/DNSprogram
2、ming network applicationssocket APISocket Programming in Java,Chapter 2:roadmap,2.1 Principles of Network Applications2.2 The Web and HTTP2.3 File Transfer ProtocolFTP2.4 Electronic Mail in the Internet2.5 DNS-The Internet Directory Service2.6 P2P File sharing2.7 Socket Programming with TCP2.8 Socke
3、t Programming with UDP2.9 Building a Simple Web Server2.10 Summary,Creating a network application,Write programs thatrun on different end systems communicate over a network.e.g.,Web server/browserNo software written for devices in network core,2.1Principles of Network Applications,1.Application arch
4、itectures,Application architecture is distinctly different from the network architecturenetwork architecture:fixed App architecture:how application is organized over various end systemsTypical application architectureClient-Server(C/S)Peer-to-Peer(P2P)Hybrid of client-server and P2P,2.1Principles of
5、 Network Applications,Client-Server architecture,server:always-on hostpermanent,well-known IP addressserver farms for scalingclients:communicate with servermay be intermittently connectedmay have dynamic IP addresses,C/S apps:Web,FTP,Telnet,e-maileasy managementserver is bottleneck,2.1Principles of
6、Network Applications,Pure P2P architecture,no always on server at the center of appsarbitrary end systems directly communicatepeers intermittently connected and can change IP addresses example:GnutellaHighly scalableBut difficult to manage,2.1Principles of Network Applications,Hybrid of client-serve
7、r and P2P,NapsterFile transfer P2PFile search centralized:Instant messagingChatting between two users is P2PPresence detection/location centralized:,2.1Principles of Network Applications,2.Processes communicating,Process:program running within a host.within same host,two processes communicate using
8、inter-process communication(IPC,defined by OS).processes in different hosts communicate by exchanging messages through the network,2.1Principles of Network Applications,2.1 Client and Server Process,Client process:process that initiates communicationServer process:process that waits to be contacted,
9、Note:applications with P2P architectures have both client processes&server processes,2.1Principles of Network Applications,2.2 Sockets,Any message sent from one process to another must go through the underlying network.A process sends message into,and receives messages from,the network through its s
10、ocket,Developers can choice of transport protocol;ability to fix a few parameters,2.1Principles of Network Applications,2.3 Addressing processes,for a process to receive messages,it must have an identifier.,identifier must include both the IP address and port numbers.port numbers:HTTP server:80Mail
11、server:25,Q:does the IP address of the destination host suffice for identifying the destination process?,2.1Principles of Network Applications,A:No,many processes can be running on same host,3.App-layer protocol,An Application-layer protocol defines:Types of messages exchanged e.g.,request&response
12、messagesSyntax of message typeswhat fields in messages&how fields are delineatedSemantics of the fieldsie,meaning of information in fieldsRules for when and how processes send&respond to messages,2.1Principles of Network Applications,Public-domain protocols:defined in RFCs,allows for interoperabilit
13、ye.g.,HTTP,SMTPProprietary protocols:e.g.,KaZaAapplication vs.app-layer protocolprotocol is a piece of a app.,3.App-layer protocol,2.1Principles of Network Applications,4.What transport service does an app need?,reliable data transfersome apps(e.g.,audio)can tolerate some lossother apps(e.g.,file tr
14、ansfer,telnet)require 100%reliable data transfer,Timingsome apps(Internet telephony,interactive games)require low delay to be“effective”,bandwidthbandwidth sensitive app(e.g.,multimedia)elastic bandwidth apps(mail,FTP),2.1Principles of Network Applications,2.1.4 requirements of common apps,Applicati
15、onfile transfere-mailWeb documentsreal-time audio/videostored audio/videointeractive gamesinstant messaging,Data lossno lossno lossno lossloss-tolerantloss-tolerantloss-tolerantno loss,Bandwidthelasticelasticelasticaudio:5kbps-1Mbpsvideo:10kbps-5Mbpssame as above few kbps upelastic,Time Sensitivenon
16、onoyes,100s msecyes,few secsyes,100s msecyes and no,5.Internet services,TCP service:connection-oriented reliable transportflow control:congestion control:does not provide:timing,minimum bandwidth guarantees,UDP service:unreliable data transferdoes not provide:connection setupReliabilityflow controlc
17、ongestion controltiming,or bandwidth guarantee,Q:Why is there a UDP?congestion control is harmful to apps that have minimum bandwidth constraint;some apps are loss-tolerant,2.1Principles of Network Applications,Internet apps:application,transport protocols,Applicatione-mailremote terminal accessWeb
18、file transferstreaming multimediaInternet telephony,Applicationlayer protocolSMTP RFC 2821Telnet RFC 854HTTP RFC 2616FTP RFC 959proprietary(e.g.RealNetworks)proprietary(e.g.,Dialpad),Underlyingtransport protocolTCPTCPTCPTCPTCP or UDPtypically UDP,Chapter 2:roadmap,2.1 Principles of Network Applicati
19、ons2.2 The Web and HTTP2.3 File Transfer ProtocolFTP2.4 Electronic Mail in the Internet2.5 DNS-The Internet Directory Service2.6 P2P File sharing2.7 Socket Programming with TCP2.8 Socket Programming with UDP2.9 Building a Simple Web Server2.10 Summary,The Web and HTTP,some jargonWeb page consists of
20、 base HTML-file which includes several referenced objectsObject can be HTML file,image,Java applet,audio file,if a web page contains a HTML file and 5 jpeg images,then the web page has 6 objects:the base HTML file and 5 images.Each object is addressable by a URLUniform Resource Locator,2.2 The Web a
21、nd HTTP,Contents,1.Overview of HTTP 2.HTTP connectionsNon-persistent HTTP connectionPersistent HTTP connection3.HTTP message type and message formatRequest messageResponse message4.Cookies6.Web caching7.Conditional GET,2.2 The Web and HTTTP,1.Overview of HTTP,HTTP:hypertext transfer protocol,HTTP re
22、quest,HTTP request,HTTP response,HTTP response,2.2 The Web and HTTP,Webs application layer protocolclient/server modeldefinesHow client requests web pages(written in HTML/XML)from server&how server transfers web pages to clientVersions:HTTP 1.0(RFC 1945)HTTP 1.1(RFC 2616),1.Overview of HTTP,HTTP Use
23、s TCP as underlying transport protocol:client initiates TCP connection with the server at port 80HTTP messages exchanged between browser and Web server through their socketsHTTP is“stateless”server maintains no information about past client requestsProtocols that maintain“state”are complex!,2.2 The
24、Web and HTTP,2.HTTP connections,Nonpersistent Connectionat most one object is sent over a TCP connection.HTTP/1.0 uses nonpersistent HTTP as defaultPersistent ConnectionMultiple objects can be sent over single TCP connection between client and server.HTTP/1.1 uses persistent connections in default m
25、ode,2.2 The Web and HTTP,2.1 nonpersistent HTTP connection,Suppose user enters URL in the address of browser www.someSchool.edu/someDepartment/home.index,1a.client initiates TCP connection to HTTP server,2.client sends HTTP request message,1b.server“accepts”connection,notifying client,3.server recei
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 大学课件 【大学课件】A TopDown Approach Featuring the Internet 大学 课件
![提示](https://www.31ppt.com/images/bang_tan.gif)
链接地址:https://www.31ppt.com/p-6229898.html