Transcription
Introductionto theApplicationLayerComputer NetworksTerm B10
Intro to Application Layer Outline Current Application Layer ProtocolsCreating an ApplicationApplication Architectures– Client-Server– P2P– Hybrid Processes, Addressing and SocketsTransport Layer ServicesComputer NetworksApplication Layer2
Goals Conceptual and implementation aspectsof application protocolsExamine popular application layerprotocols:––––HTTPFTPSMTP / POP3 / IMAPDNSComputer NetworksApplication Layer3
Popular Network Applications e-mailwebinstantmessagingremote loginP2P file sharingmulti-usernetwork games Computer Networksstreaming storedvideo clipssocial networksvoice over IPreal-time videoconferencinggrid computingApplication Layer4
Creating a Network AppWrite programs to– run on (different) end systems– communicate over network– e.g., web server softwarecommunicates with browsersoftwareNo need to write software for corenetwork devices– Network-core devices do not runuser applications– apps on end systems enablesrapid app development,propagationComputer Networksapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalApplication Layerapplicationtransportnetworkdata linkphysical5
Application Architectures Client-server (CS)– Including data centers and cloudcomputingPeer-to-peer (P2P)Hybrid of client-server and P2PComputer NetworksApplication Layer6
Client-Server ArchitectureServer:– always-on host– permanent IP address– server farms for scalingClients:– communicate with server– may be intermittentlyconnected– may have dynamic IPaddresses– do not communicatedirectly with each otherclient/serverComputer NetworksApplication Layer7
Server Example: Google Data Centers Estimated cost: 600MGoogle spent 2.4B in 2007 on new data centersEach data center uses 50-100 megawatts ofpower.Computer NetworksApplication Layer8
Pure P2P Architecture no always-on serverarbitrary end systemsdirectly communicatepeers are intermittently peer-peerconnected and changeIP addressesHighly scalable butdifficult to manageComputer NetworksApplication Layer9
Hybrid: Client-Server and P2P Skype Instant Messaging– voice-over-IP P2P application– centralized server: finding address ofremote party– client-client connection: often direct(not through server)– chatting between two users is P2P– centralized service: client presencedetection/location user registers its IP address with centralserver when it comes online. user contacts central server to find IPaddresses of buddies.Computer NetworksApplication Layer10
Processes CommunicatingProcess: program runningwithin a host. Within same host, twoprocesses communicateusing inter-processcommunication (definedby OS). Processes in differenthosts communicate byexchanging messagesComputer NetworksClient process: processthat initiatescommunicationServer process: processthat waits to becontacted Note: applications withP2P architectures haveclient processes &server processesApplication Layer11
Sockets Process sends/receivesmessages to/from itssocketSocket analogous to door– sending process shovesmessage out door– sending process relies ontransport infrastructure onother side of door whichbrings message to socketat receiving processhost orserverhost orservercontrolled byapp developerprocessprocesssocketsocketTCP withbuffers,variablesInternetTCP withbuffers,variablescontrolledby OS API: (1) choice of transport protocol; (2) ability tofix a few parameters (see Sockets lecture)Computer NetworksApplication Layer12
Addressing Processes To receive messages,process must have identifier Host device has unique32-bit IP addressExercise: use ipconfigfrom command prompt toget your IP address(Windows) Q: does IP address ofhost on which processruns suffice foridentifying the process?– A: No, manyprocesses can berunning on sameIdentifier includes bothIP address and portnumbers associated withprocess on host.Example port numbers:– HTTP server: 80– Mail server: 25Computer NetworksApplication Layer13
App-Layer Protocol Defines Types of messagesexchanged,– e.g., request, response Message syntax:– what fields in messages& how fields aredelineated Message semantics– meaning of informationin fields Public-domain protocols: Defined in RFCs allows forinteroperability e.g., HTTP, SMTP,BitTorrentProprietary protocols: e.g., Skype, ppstreamRules for when and howprocesses send &respond to messagesComputer NetworksApplication Layer14
What Transport Service Does an AppNeed?Data loss some apps (e.g., audio)can tolerate some loss other apps (e.g., filetransfer, telnet) require100% reliable datatransferTiming some apps (e.g.,Internet telephony,interactive games)require low delay tobe “effective”Computer NetworksThroughput some apps (e.g.,multimedia) requireminimum amount ofthroughput to be“effective” other apps (“elasticapps”) make use ofwhatever throughputthey getSecurity encryption, dataintegrity, Application Layer15
CommonTransport Service App RequirementsApplicationThroughputData lossfile transfere-mailWeb documentsreal-time audio/videono lossno lossno lossloss-tolerantstored audio/videointeractive gamesinstant messagingloss-tolerantloss-tolerantno lossTime Sensitivenoelasticnoelasticnoelasticaudio: 5kbps-1Mbps yes, 100’s msecvideo:10kbps-5Mbpsyes, few secssame as aboveyes, 100’s msecfew kbps upyes and noelasticComputer NetworksApplication Layer16
Internet Transport Protocols ServicesTCP service:UDP service: connection-oriented: setuprequired between client andserver processesreliable transport betweensending and receiving processflow control: sender won’toverwhelm receivercongestion control: throttlesender when networkoverloadeddoes not provide: timing,minimum throughputguarantees, securityComputer Networks unreliable data transferbetween sending andreceiving processdoes not provide:connection setup,reliability, flow control,congestion control,timing, throughputguarantee, or securityQ: why bother? Why isthere a UDP?Application Layer17
Internet Apps: Application, Transport ProtocolsApplicatione-mailremote terminal accessWebfile transferstreaming multimediaInternet telephonyApplicationlayer protocolUnderlyingtransport protocolSMTP [RFC 2821]Telnet [RFC 854]HTTP [RFC 2616]FTP [RFC 959]HTTP (eg Youtube),RTP [RFC 1889]SIP, RTP, proprietary(e.g., Skype)TCPTCPTCPTCPTCP or UDPComputer NetworksApplication Layertypically UDP18
Intro to Application Layer Summary Current Application Layer ProtocolsCreating an ApplicationApplication Architectures– Client-Server– P2P– Hybrid Processes, Addressing and SocketsTransport Layer ServicesComputer NetworksIntroduction19
Hybrid: Client-Server and P2P Skype -voice-over-IP P2P application -centralized server: finding address of remote party -client-client connection: often 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