chapter 2 outline
play

Chapter 2: outline 2.5 P2P applications 2.1 principles of network - PDF document

Chapter 2: outline 2.5 P2P applications 2.1 principles of network applications 2.6 video streaming and content distribution 2.2 Web and HTTP networks 2.3 electronic mail 2.7 socket programming SMTP, POP3, IMAP with UDP and TCP 2.4 DNS


  1. Chapter 2: outline 2.5 P2P applications 2.1 principles of network applications 2.6 video streaming and content distribution 2.2 Web and HTTP networks 2.3 electronic mail 2.7 socket programming • SMTP, POP3, IMAP with UDP and TCP 2.4 DNS Application Layer 2-2 Chapter 2: application layer our goals:  learn about protocols by examining popular  conceptual, application-level implementation aspects protocols of network application protocols • HTTP • FTP • transport-layer • SMTP / POP3 / IMAP service models • DNS • client-server  creating network paradigm applications • peer-to-peer • socket API paradigm • content distribution networks Application Layer 2-3 1

  2. Some network apps  e-mail  voice over IP (e.g., Skype)  web  real-time video  text messaging conferencing  remote login  social networking  P2P file sharing  search  multi-user network  … games  …  streaming stored video (YouTube, Hulu, Netflix) Application Layer 2-4 Creating a network app application transport network data link physical write programs that:  run on (different) end systems  communicate over network  e.g., web server software communicates with browser software no need to write software application transport network for network-core devices application data link transport physical network  network-core devices do not data link physical run user applications  applications on end systems allows for rapid app development, propagation Application Layer 2-5 2

  3. Application architectures possible structure of applications:  client-server  peer-to-peer (P2P) Application Layer 2-6 Client-server architecture server:  always-on host  permanent IP address  data centers for scaling clients:  communicate with server  may be intermittently client/server connected  may have dynamic IP addresses  do not communicate directly with each other Application Layer 2-7 3

  4. P2P architecture  no always-on server peer-peer  arbitrary end systems directly communicate  peers request service from other peers, provide service in return to other peers • self scalability – new peers bring new service capacity, as well as new service demands  peers are intermittently connected and change IP addresses • complex management Application Layer 2-8 Processes communicating process: program running clients, servers within a host client process: process that  within same host, two initiates communication processes communicate server process: process that using inter-process waits to be contacted communication (defined by OS)  processes in different hosts communicate by exchanging  aside: applications with P2P messages architectures have client processes & server processes Application Layer 2-9 4

  5. Sockets  process sends/receives messages to/from its socket  socket analogous to door • sending process shoves message out door • sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process application application socket controlled by process process app developer transport transport controlled network network by OS link link Internet physical physical Application Layer 2-10 Addressing processes  identifier includes both IP  to receive messages, process must have identifier address and port numbers associated with process on  host device has unique 32- host. bit IP address  example port numbers:  Q: does IP address of host • HTTP server: 80 on which process runs suffice for identifying the • mail server: 25 process?  to send HTTP message to  A: no, many processes gaia.cs.umass.edu web can be running on same server: host • IP address: 128.119.245.12 • port number: 80  more shortly… Application Layer 2-11 5

  6. App-layer protocol defines  types of messages open protocols: exchanged,  defined in RFCs • e.g., request, response  allows for interoperability  message syntax:  e.g., HTTP, SMTP • what fields in messages proprietary protocols: & how fields are  e.g., Skype delineated  message semantics • meaning of information in fields  rules for when and how processes send & respond to messages Application Layer 2-12 What transport service does an app need? data integrity throughput  some apps (e.g., file transfer,  some apps (e.g., web transactions) require multimedia) require minimum amount of 100% reliable data transfer throughput to be  other apps (e.g., audio) can “ effective ” tolerate some loss  other apps ( “ elastic apps ” ) timing make use of whatever  some apps (e.g., Internet throughput they get telephony, interactive security games) require low delay  encryption, data integrity, to be “ effective ” … Application Layer 2-13 6

  7. Transport service requirements: common apps application throughput data loss time sensitive file transfer elastic no loss no e-mail elastic no loss no Web documents elastic no loss no real-time audio/video audio: 5kbps-1Mbps loss-tolerant yes, 100 ’ s video:10kbps-5Mbps msec stored audio/video same as above loss-tolerant interactive games few kbps up loss-tolerant yes, few secs text messaging elastic no loss yes, 100 ’ s msec yes and no Application Layer 2-14 Internet transport protocols services TCP service: UDP service:  reliable transport between  unreliable data transfer sending and receiving between sending and process receiving process  flow control: sender won ’ t  does not provide: reliability, overwhelm receiver flow control, congestion  congestion control: throttle control, timing, sender when network throughput guarantee, overloaded security, or connection setup,  does not provide: timing, minimum throughput guarantee, security Q: why bother? Why is  connection-oriented: setup there a UDP? required between client and server processes Application Layer 2-15 7

  8. Internet apps: application, transport protocols application underlying application layer protocol transport protocol e-mail SMTP [RFC 2821] TCP remote terminal access Telnet [RFC 854] TCP Web HTTP [RFC 2616] TCP file transfer FTP [RFC 959] TCP streaming multimedia HTTP (e.g., YouTube), TCP or UDP RTP [RFC 1889] Internet telephony SIP, RTP, proprietary (e.g., Skype) TCP or UDP Application Layer 2-16 Securing TCP TCP & UDP SSL is at app layer  no encryption  apps use SSL libraries, that “ talk ” to TCP  cleartext passwds sent into SSL socket API socket traverse Internet in cleartext  cleartext passwords sent SSL into socket traverse Internet encrypted  provides encrypted TCP connection  see Chapter 8  data integrity  end-point authentication Application Layer 2-17 8

  9. Chapter 2: outline 2.5 P2P applications 2.1 principles of network applications 2.6 video streaming and content distribution 2.2 Web and HTTP networks 2.3 electronic mail 2.7 socket programming • SMTP, POP3, IMAP with UDP and TCP 2.4 DNS Application Layer 2-18 Web and HTTP First, a review…  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 objects  each object is addressable by a URL, e.g., www.someschool.edu/someDept/pic.gif path name host name Application Layer 2-19 9

  10. HTTP overview HTTP: hypertext transfer protocol  Web ’ s application layer protocol PC running Firefox browser  client/server model • client: browser that requests, receives, (using HTTP protocol) server and “ displays ” Web running objects Apache Web • server: Web server server sends (using HTTP protocol) objects in iPhone running response to requests Safari browser Application Layer 2-20 HTTP overview (continued) uses TCP: HTTP is “ stateless ”  server maintains no  client initiates TCP information about connection (creates socket) past client requests to server, port 80  server accepts TCP aside connection from client protocols that maintain  HTTP messages “ state ” are complex! (application-layer protocol messages) exchanged  past history (state) must be between browser (HTTP maintained client) and Web server  if server/client crashes, their (HTTP server) views of “ state ” may be inconsistent, must be  TCP connection closed reconciled Application Layer 2-21 10

  11. HTTP connections non-persistent HTTP persistent HTTP  at most one object  multiple objects can sent over TCP be sent over single connection TCP connection between client, server • connection then closed  downloading multiple objects required multiple connections Application Layer 2-22 Non-persistent HTTP suppose user enters URL: (contains text, references to 10 www.someSchool.edu/someDepartment/home.index jpeg images) 1a. HTTP client initiates TCP connection to HTTP server 1b. HTTP server at host (process) at www.someSchool.edu waiting www.someSchool.edu on port 80 for TCP connection at port 80. “ accepts ” connection, notifying client 2. HTTP client sends HTTP request message (containing URL) into 3. HTTP server receives request TCP connection socket. message, forms response Message indicates that client message containing requested wants object object, and sends message into someDepartment/home.index its socket time Application Layer 2-23 11

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend