multimedia communications
play

Multimedia Communications @CS.NCTU Lecture 2: Networking - PowerPoint PPT Presentation

Multimedia Communications @CS.NCTU Lecture 2: Networking Application Layer [Computer Networking, Ch2] Instructor: Kate Ching-Ju Lin ( ) Slides modified from Computer Networking: A Top-Down Approach 6th Edition Outline


  1. Multimedia Communications @CS.NCTU Lecture 2: Networking – Application Layer [Computer Networking, Ch2] Instructor: Kate Ching-Ju Lin ( 林靖茹 ) Slides modified from “Computer Networking: A Top-Down Approach” 6th Edition

  2. Outline • Principles of network applications • Web and HTTP • P2P Applications (later lecture) • Video Streaming and CDN (later lecture) • Socket programing with UDP and TCP

  3. Some Network Applications • 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)

  4. Creating a Network App write programs that: application transport network • run on (different) end systems data link physical • communicate over network • e.g., web server software communicates with browser software no need to write software for network-core devices application transport network • network-core devices do not application data link transport physical run user applications network data link physical • applications on end systems allows for rapid app development, propagation

  5. Application Architectures • Application architecture is different from the network architecture (five layer) • Possible structure of applications: • client-server • Web, gmail, Facebook, etc • peer-to-peer (P2P) • BitTorrent, Skype, PPStream, etc

  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

  7. Peer-to-Peer (P2P) Architecture • No always-on server peer-peer • Intermittently connected hosts, called peers (equally important) • Arbitrary end systems directly communicate • Peers request service from other peers, and provide service in return to other peers • J self scalability – new peers bring new service capacity, as well as new service demands • Peers might change IP addresses • complex management

  8. Challenges of P2P Architecture Why P2P is less common? • ISP Friendly • Most residential ISPs usually support asymmetrical bandwidth, but P2P has high upstream demands, which is not friendly to ISPs • Security • Hard to achieve due to the distributed nature of P2P • Incentives • Need to convince peers to contribute their bandwidth, storage and computation resource à Human are selfish!

  9. Processes Communicating process: program running within a host • within the same host, two processes communicate using inter-process communication (defined by OS) • processes in different hosts communicate by exchanging messages clients, servers applications with P2P • client process: process that architectures have initiates communication both client processes & server process: process that server processes waits to be contacted

  10. Sockets • Process sends/receives messages to/from its socket , an interface between the app and transport layers • Controls: 1) choice of the transport protocol; 2) setup transmit-layer parameters, e.g., buffer size • Socket analogous to door • sending process pushes message out door, to the door (socket) at receiving process application application socket controlled by process process app developer transport transport Controlled by OS network network link Internet link physical physical

  11. Addressing Processes • to receive messages, • identifier includes both IP process must have address and port identifier numbers associated with process on host. • host device has unique 32-bit IP address • example port numbers: • HTTP server: 80 • Q: does IP address of • mail server: 25 host on which process • to send HTTP message to runs suffice for gaia.cs.umass.edu web identifying the server: process? • IP address: 128.119.245.12 • A: no, many • port number: 80 processes can be running on same host

  12. App-layer Protocol Defines Open protocols: • Types of messages exchanged, • defined in RFCs • e.g., request, response • allows for interoperability • Message syntax • what fields in messages • e.g., HTTP, SMTP & how fields are delineated Proprietary protocols: • Message semantics • e.g., Skype • meaning of information in fields • Rules for when and how processes send & respond to messages

  13. What transport service does an app need? Reliability Throughput • some apps (e.g., file • some apps (e.g., transfer, web multimedia) require transactions) require minimum amount of 100% reliable data throughput to be transfer “ effective ” • some apps (e.g., audio) • other apps ( “ elastic can tolerate some loss apps ” ) make use of whatever throughput timing they get • some apps (e.g., Internet telephony, interactive security games) require low • encryption, data delay to be “ effective ” integrity, …

  14. Transport Service Requirements application data loss throughput time sensitive file transfer no loss elastic no e-mail no loss elastic no Web documents no loss elastic no real-time loss-tolerant audio: 5kbps-1Mbps yes, 100 ’ s audio/video video:10kbps -5Mbps msec stored audio/video loss-tolerant same as above yes, few secs interactive games loss-tolerant few kbps up yes, 100 ’ s msec text messaging no loss elastic yes and no

  15. Transport Services for Apps 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: overwhelm receiver reliability, flow control, congestion control, timing, • congestion control: throttle throughput guarantee, sender when network security, or connection overloaded setup, • does not provide timing, minimum throughput guarantee, security Q: why bother? Why is there a UDP? • connection-oriented: setup required between client and server processes

  16. Application and Transport Protocols application underlying layer protocol application transport protocol e-mail SMTP [RFC 2821] TCP Telnet [RFC 854] remote terminal access TCP HTTP [RFC 2616] Web TCP file transfer FTP [RFC 959] TCP HTTP (e.g., YouTube), streaming multimedia TCP or UDP RTP [RFC 1889] Internet telephony SIP, RTP, proprietary (e.g., Skype) TCP or UDP Q: Something better than TCP and UDP or in-between TCP and UDP ?

  17. Outline • Principles of network applications • Web and HTTP • P2P Applications (later lecture) • Video Streaming and CDN (later lecture) • Socket programing with UDP and TCP

  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

  19. HTTP overview HTTP: HyperText Transfer Protocol • Web’s application layer protocol • Client/server model • client: browser that requests, receives, PC running Firefox browser (using HTTP protocol) and “ displays ” Web objects • server: Web server sends server (using HTTP protocol) objects running in response to requests Apache Web server iPhone running Safari browser

  20. HTTP Overview (cont.) • Uses TCP • Client initiates TCP connection (creates socket) to server, default port 80 • Server accepts TCP connection from client • HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) aside • Reliable transmissions protocols that maintain • HTTP is “stateless” “state” are complex! • Server maintains no past history (state) must § be maintained information about past if server/client crashes, § client requests their views of “state” may be inconsistent, must be reconciled

  21. HTTP Connections non-persistent HTTP persistent HTTP • at most one object sent • multiple objects can be over TCP connection sent over single TCP connection between • connection then closed client and server • downloading multiple • the server closes a objects required multiple connection when it isn’t TCP connections used for a certain time • Default mode

  22. User-Server Interaction: Cookies • HTTP is stateless, but what if the server wants to keep information, e.g., user ID? • Use cookies ! • Track user activity (e.g., interests of pro • Four components 1. a header in the HTTP response message 2. a header in the HTTP request message 3. a cookie file kept on the users’ browser 4. a back-end database at the Web site

  23. User-Server Interaction: Cookies Client host Server host usual http request msg ebay: 8734 e s Server creates n o p s e r p t t ID 1678 for user h 8 7 l 6 a 1 u s : u e i k entry in backend o o c - t e S database usual http request msg cookie: 1678 amazon: 1678 ebay: 8734 access Cookie-specific g s m e s n action o p s e r p t t h l a u s u One week later usual http request msg access cookie: 1678 amazon: 1678 Cookie-specific ebay: 8734 g s m e s n o action p s e r p t t h l a u s u Time Time

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