Presentation is loading. Please wait.

Presentation is loading. Please wait.

Professor Yashar Ganjali Department of Computer Science University of Toronto

Similar presentations


Presentation on theme: "Professor Yashar Ganjali Department of Computer Science University of Toronto"— Presentation transcript:

1 Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu http://www.cs.toronto.edu/~yganjali

2 Announcements Final project Intermediate report Due: Fri. Nov. 13 th Assignment 2 is posted Due: 5PM on Fri. Oct. 30 th No office hours next week Volunteer for lecture notes? SII 199 - Computer Networks and Society2University of Toronto – Fall 2015

3 SII 199 - Computer Networks and SocietyUniversity of Toronto – Fall 2015 The Story … Introduction to computer networks The science of networks Computer networks and healthcare Last week: computer networks and business This week: computer networks and entertainment 3

4 Outline Books, magazines, and newspapers TV Traditional cable TV New forms of video-on-demand Multimedia Music, video streaming Quality of Service (QoS) Bandwidth, delay, jitter, and loss Peer-to-peer networks SII 199 - Computer Networks and Society4University of Toronto – Fall 2015

5 Books, Magazines, and Newspapers Internet has changed them all Less and less reliance on paper media Less trees are cut But not necessarily better for the environment Other forms of impact eBooks, online magazines and newspapers Faster delivery Up to the minute Less expensive Various devices and formats Web: accessible through all Internet-enabled devices Specialized book readers: Kindle, iPad, Kobo SII 199 - Computer Networks and Society5University of Toronto – Fall 2015

6 Electronic Book Readers Easy to carry, and can hold hundreds to thousands of books Usually consume very little power Days to months before need a recharge Easy to annotate Highlight, underline, add notes, etc. Download data using WiFi, 3G, … Ideally we want to access books anywhere But we don’t have strict bandwidth, delay, loss requirements SII 199 - Computer Networks and Society6University of Toronto – Fall 2015

7 Outline Books, magazines, and newspapers TV Traditional cable TV New forms of video-on-demand Multimedia Music, video streaming Quality of Service (QoS) Bandwidth, delay, jitter, and loss Peer-to-peer networks SII 199 - Computer Networks and Society7University of Toronto – Fall 2015

8 TV As We Knew Limited selection Tens to hundreds of channels, but still limited Limited content Mostly generated by large entertainment companies What if I want something else? Timing You can watch a show at a specific time Or with some time shift at best Advertisement And lots of it! SII 199 - Computer Networks and Society8University of Toronto – Fall 2015

9 Ideal TV Experience Ideally we want to … Watch whatever we want Whenever we want Wherever we choose For this we need to be able to … Receive content from arbitrary sources Not just limited TV channels Receive content on demand Not just at specific times Have a network that can deliver content everywhere Not at specific locations SII 199 - Computer Networks and Society9University of Toronto – Fall 2015

10 Solution: Video On Demand Cable TV is a broadcast network Streams the same content to all We need multicast or unicast streaming With cable TV, the only way to watch a show at an arbitrary time is to record it Still limited to what is on TV now Storage is not easy Today, broadband networks have enough capacity to support Video- On-Demand (VOD) SII 199 - Computer Networks and Society10University of Toronto – Fall 2015

11 First Step: DVR Most cable TV companies have their own DVR TiVo works with most cable TV providers Receive program schedule via the Internet Record favorite shows Season passes and Suggested programs Play anytime SII 199 - Computer Networks and Society11University of Toronto – Fall 2015

12 The Old Apple TV Download TV shows from iTunes library Pay as you go Play anytime Problems: Huge storage required Synchronization among different devices not easy Even for geeks! Backup is a challenge SII 199 - Computer Networks and Society12University of Toronto – Fall 2015

13 A Different Look At an Old Problem Storing movies and TV shows requires Large hard disks Each movie about 3-4 GB Today’s hard disks roughly 1 TB (1000 GB) Backup, and synchronization between devices Not simple Even for techies But, why do we need to store? We don’t! Traditionally, we did since downloading took a long time SII 199 - Computer Networks and Society13University of Toronto – Fall 2015

14 A Different Look – Cont’d Streaming is fast enough today Usually you can watch within seconds No need to store And sync, and backup your data Cheaper since you are not buying You can watch for 24-48 hours after renting Even if you watch multiple times still cheaper than buying SII 199 - Computer Networks and Society14University of Toronto – Fall 2015

15 The New Apple TV Instant movie and TV show rentals At lower cost Most movies $3-$5 For some might be cheaper than cable Watch anywhere, anytime No advertisement HD quality No monthly subscription Box costs about $100 Other similar products Google TV on its way, Boxee, … SII 199 - Computer Networks and Society15University of Toronto – Fall 2015

16 Outline Books, magazines, and newspapers TV Traditional cable TV New forms of video-on-demand Multimedia Music, video streaming Quality of Service (QoS) Bandwidth, delay, jitter, and loss Peer-to-peer networks SII 199 - Computer Networks and Society16University of Toronto – Fall 2015

17 Multimedia The Internet can also be used to download Music, video clips, … Two different approaches Download the entire file (like any other data file) Stream (send data as it is being played by the client) Question. What are the pros and cons? SII 199 - Computer Networks and Society17University of Toronto – Fall 2015

18 Download vs. Stream Streaming multimedia means you can start without the need to download the entire file. No need to store locally (can be streamed again later) Content might not be available for offline use Unless you make sure it is kept locally Ideally, we want a combination Stream and start playing immediately And keep the content for offline use SII 199 - Computer Networks and Society18University of Toronto – Fall 2015

19 Internet Has Matured for Multimedia Lightweight, portable, and cheap devices Kindle, iPad, Netbooks, small mp3 players, … Wireless networks WiFi: short distance, mostly used at homes, offices, … WiMax: portable broadband, up to 40 Mb/s 3G: simultaneous use of voice and data Acceptable quality of service for most multimedia applications 10-100 Mb/s these days Lower delay and loss SII 199 - Computer Networks and Society19University of Toronto – Fall 2015

20 Transferring Audio and Video Data Simplest case: just like any other file Audio and video data stored in a file File downloaded using conventional protocol Playback does not overlap with data transfer A variety of more interesting scenarios Live vs. pre-recorded content Interactive vs. non-interactive Single receiver vs. multiple receivers Examples Streaming audio and video data from a server Interactive audio in a phone call SII 199 - Computer Networks and Society20University of Toronto – Fall 2015

21 Streaming Stored Audio and Video Client-server system Server stores the audio and video files Clients request files, play them as they download, and perform VCR-like functions (e.g., rewind and pause) Playing data at the right time Server divides the data into segments … and labels each segment with timestamp or frame id … so the client knows when to play the data Avoiding starvation at the client The data must arrive quickly enough … otherwise the client cannot keep playing SII 199 - Computer Networks and Society21University of Toronto – Fall 2015

22 Playout Buffer Client buffer Store the data as it arrives from the server Play data for the user in a continuous fashion Playout delay Client typically waits a few seconds to start playing … to allow some data to build up in the buffer … to help tolerate some delays down the road SII 199 - Computer Networks and Society22University of Toronto – Fall 2015

23 Playout Buffer Client buffer Store the data as it arrives from the server Play data for the user in a continuous fashion Playout delay Client typically waits a few seconds to start playing … to allow some data to build up in the buffer … to help tolerate some delays down the road SII 199 - Computer Networks and Society23University of Toronto – Fall 2015

24 Outline Books, magazines, and newspapers TV Traditional cable TV New forms of video-on-demand Multimedia Music, video streaming Quality of Service (QoS) Bandwidth, delay, jitter, and loss Peer-to-peer networks SII 199 - Computer Networks and Society24University of Toronto – Fall 2015

25 Quality of Service in the Internet Different applications have different requirements Some are delay sensitive Some are loss sensitive Some require huge bandwidth but can tolerate delay and loss What if we can differentiate and serve different types of traffic based on their requirement This is called providing Quality of Service or QoS Tons of interesting research work on this Mostly used in core networks Sometimes in the edge SII 199 - Computer Networks and Society25University of Toronto – Fall 2015 Internet backbone Home, office, … networks

26 Quality of Service (QoS) We usually measure Quality of Service in terms of bandwidth, delay, jitter, and loss Bandwidth: number of bits or bytes we can send/receive per second on a given link Usually measured in mega bits per second (Mbps) E.g. 10Mb/s download and 1Mb/s upload Higher bandwidth means more data can be injected to the network Not enough to ensure high quality of service We need to consider delay, jitter, and loss as well. SII 199 - Computer Networks and Society26University of Toronto – Fall 2015

27 Delay Delay: the time it takes for data to reach from your machine to the other party’s machine Usually measured in milliseconds (ms) Round-trip time (RTT) is the time it takes for one bit to go from machine A to B and come back. Question. What are typical values for RTTs in the Internet? Jitter: variations in delay Ideally, we want small jitter SII 199 - Computer Networks and Society27University of Toronto – Fall 2015

28 Jitter Jitter: variations in delay Ideally, we want small jitter Fixed inter-arrival of packets No jitter Bursty traffic High jitter SII 199 - Computer Networks and Society28University of Toronto – Fall 2015

29 Packet Loss Loss: fraction of packets which are lost in the network Usually measured as a percentage E.g. 1% packet loss Internet provides best effort service So packets might be lost Why? Loss can have severe impact on some applications Which ones? SII 199 - Computer Networks and Society29University of Toronto – Fall 2015

30 SII 199 - Computer Networks and Society30University of Toronto – Fall 2015 Requirements for Multimedia Transport Bandwidth Depending on content type (voice vs. video) and quality (e.g. HD video) Delay Some small delay at the beginning is acceptable E.g., start-up delays of a few seconds are okay Jitter Variability of packet delay within the same packet stream Client cannot tolerate high variation if the buffer starves Loss Small amount of missing data does not disrupt playback Retransmitting a lost packet might take too long anyway

31 Detour: Gaming Traditionally computer games are played by one or two people Now, groups of people from all over the world can participate in a game Much more fun! Ideally, the players should feel like they are on the same physical location Requires Guaranteed bandwidth Small delay and jitter Small loss SII 199 - Computer Networks and Society31University of Toronto – Fall 2015

32 Outline Books, magazines, and newspapers TV Traditional cable TV New forms of video-on-demand Multimedia Music, video streaming Quality of Service (QoS) Bandwidth, delay, jitter, and loss Peer-to-peer networks SII 199 - Computer Networks and Society32University of Toronto – Fall 2015

33 Peer-to-Peer Networks: Napster Napster history: the rise January 1999: Napster version 1.0 May 1999: company founded September 1999: first lawsuits 2000: 80 million users Napster history: the fall Mid 2001: out of business due to lawsuits Mid 2001: dozens of P2P alternatives that were harder to touch, though these have gradually been constrained 2003: growth of pay services like iTunes Napster history: the resurrection 2003: Napster reconstituted as a pay service 2006: still lots of file sharing going on SII 199 - Computer Networks and Society33University of Toronto – Fall 2015 Shawn Fanning, Northeastern freshman

34 Napster Technology: Directory Service User installing the software Download the client program Register name, password, local directory, etc. Client contacts Napster (via TCP) Provides a list of music files it will share … and Napster’s central server updates the directory Client searches on a title or performer Napster identifies online clients with the file … and provides IP addresses Client requests the file from the chosen supplier Supplier transmits the file to the client Both client and supplier report status to Napster SII 199 - Computer Networks and Society34University of Toronto – Fall 2015

35 Napster Technology: Properties Server’s directory continually updated Always know what music is currently available Point of vulnerability for legal action Peer-to-peer file transfer No load on the server Plausible deniability for legal action (but not enough) Proprietary protocol Login, search, upload, download, and status operations No security: clear-text passwords and other vulnerabilities Bandwidth issues Suppliers ranked by apparent bandwidth & response time SII 199 - Computer Networks and Society35University of Toronto – Fall 2015

36 Napster: Limitations of Central Directory Single point of failure Performance bottleneck Copyright infringement So, later P2P systems were more distributed SII 199 - Computer Networks and Society36University of Toronto – Fall 2015 File transfer is decentralized, but locating content is highly centralized

37 Gnutella history 2000: J. Frankel & T. Pepper released Gnutella Soon after: many other clients (e.g., Morpheus, Limewire, Bearshare) 2001: protocol enhancements, e.g., “ultrapeers” Query flooding Join: contact a few nodes to become neighbors Publish: no need! Search: ask neighbors, who ask their neighbors Fetch: get file directly from another node Peer-to-Peer Networks: Gnutella SII 199 - Computer Networks and Society37University of Toronto – Fall 2015

38 Gnutella: Query Flooding Fully distributed No central server No single point of failure And no lawsuites Public domain protocol Many Gnutella clients implementing protocol SII 199 - Computer Networks and Society38University of Toronto – Fall 2015

39 SII 199 - Computer Networks and Society39University of Toronto – Fall 2015 Gnutella: Protocol Query message sent over existing TCP connections Peers forward Query message QueryHit sent over reverse path Query QueryHit Query QueryHit Query QueryHit File transfer: HTTP Scalability: limited scope flooding

40 SII 199 - Computer Networks and Society40University of Toronto – Fall 2015 Gnutella: Pros and Cons Advantages Fully decentralized Search cost distributed Processing per node permits powerful search semantics Disadvantages Search scope may be quite large Search time may be quite long High overhead and nodes come and go often

41 Peer-to-Peer Networks: BitTorrent BitTorrent history and motivation 2002: B. Cohen debuted BitTorrent Key motivation: popular content Popularity exhibits temporal locality (Flash Crowds) E.g., Slashdot effect, CNN Web site on 9/11, release of a new movie or game Focused on efficient fetching, not searching Distribute same file to many peers Single publisher, many downloaders Preventing free-loading SII 199 - Computer Networks and Society41University of Toronto – Fall 2015

42 BitTorrent: Simultaneous Downloading Divide large file into many pieces Replicate different pieces on different peers A peer with a complete piece can trade with other peers Peer can (hopefully) assemble the entire file Allows simultaneous downloading Retrieving different parts of the file from different peers at the same time SII 199 - Computer Networks and Society42University of Toronto – Fall 2015

43 Free-Riding Problem in P2P Networks Vast majority of users are free-riders Most share no files and answer no queries Others limit # of connections or upload speed A few “peers” essentially act as servers A few individuals contributing to the public good Making them hubs that basically act as a server BitTorrent prevent free riding Allow the fastest peers to download from you Occasionally let some free loaders download SII 199 - Computer Networks and Society43University of Toronto – Fall 2015

44 Summary and Discussion Computer networks have already changed the entertainment industry From eBooks, and magazines, to music, movies and TV shows Internet has matured enough that it makes sense to use it as a medium to deliver multimedia Be careful about bandwidth cap! How is TV going to change? What are the technologies we need to work on today? SII 199 - Computer Networks and Society44University of Toronto – Fall 2015

45 SII 199 - Computer Networks and Society45University of Toronto – Fall 2015 Extra Slides

46 BitTorrent Components Seed Peer with entire file Fragmented in pieces Leacher Peer with an incomplete copy of the file Torrent file Passive component Stores summaries of the pieces to allow peers to verify their integrity Tracker Allows peers to find each other Returns a list of random peers SII 199 - Computer Networks and Society46University of Toronto – Fall 2015

47 SII 199 - Computer Networks and Society47University of Toronto – Fall 2015 BitTorrent: Overall Architecture Web page with link to.torrent A B C Peer [Leech] Downloader “US” Peer [Seed] Peer [Leech] Tracker Web Server.torrent

48 SII 199 - Computer Networks and Society48University of Toronto – Fall 2015 BitTorrent: Overall Architecture Web page with link to.torrent A B C Peer [Leech] Downloader “US” Peer [Seed] Peer [Leech] Tracker Get-announce Web Server

49 SII 199 - Computer Networks and Society49University of Toronto – Fall 2015 BitTorrent: Overall Architecture Web page with link to.torrent A B C Peer [Leech] Downloader “US” Peer [Seed] Peer [Leech] Tracker Response-peer list Web Server

50 SII 199 - Computer Networks and Society50University of Toronto – Fall 2015 BitTorrent: Overall Architecture Web page with link to.torrent A B C Peer [Leech] Downloader “US” Peer [Seed] Peer [Leech] Tracker Shake-hand Web Server Shake-hand

51 SII 199 - Computer Networks and Society51University of Toronto – Fall 2015 BitTorrent: Overall Architecture Web page with link to.torrent A B C Peer [Leech] Downloader “US” Peer [Seed] Peer [Leech] Tracker pieces Web Server

52 SII 199 - Computer Networks and Society52University of Toronto – Fall 2015 BitTorrent: Overall Architecture Web page with link to.torrent A B C Peer [Leech] Downloader “US” Peer [Seed] Peer [Leech] Tracker pieces Web Server

53 SII 199 - Computer Networks and Society53University of Toronto – Fall 2015 BitTorrent: Overall Architecture Web page with link to.torrent A B C Peer [Leech] Downloader “US” Peer [Seed] Peer [Leech] Tracker Get-announce Response-peer list pieces Web Server


Download ppt "Professor Yashar Ganjali Department of Computer Science University of Toronto"

Similar presentations


Ads by Google