Top Banner
Network Technologies essentials Week 9: Distributed file sharing & multimedia n made by Tim Moors, UNSW Australia lides by David Wetherall, University of Washington 133766624 © 2014 ok A. Tanenbaum and D. Wetherall : Computer Networks, 5 th ed , Prentic Videos 8-6, 8-7, 8-9 and 9-1 to 9-3
17

Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Dec 30, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 2: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 2

Web Caching• Users often revisit web pages– Big win from reusing local copy!– This is caching

• Key question:– When is it OK to reuse local copy?

NetworkCache

Local copies

Server

8-6.3

Page 3: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 3

Web Caching (4)• Putting the pieces together:

8-6.6

Page 4: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 4

After CDNs (2)• Benefits assuming popular content:– Reduces server, network load– Improves user experience (PLT)

Source

User

User

. . .Replica

8-7.6

Page 5: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Content Delivery Network

Computer Networks 58-7.9

Page 6: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Content Delivery Network (2)• DNS resolution of site gives different answers to clients– Tell each client the site is the nearest replica (map client IP)

Computer Networks 68-7.10

Page 7: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 7

P2P Challenges• No servers on which to rely– Communication must be peer-to-peer

and self-organizing, not client-server– Leads to several issues at scale …

Peer

Peer

Peer

PeerPeer

8-9.5

Page 8: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 8

P2P Challenges (2)1. Limited capabilities– How can one peer deliver content

to all other peers?

2. Participation incentives– Why will peers help each other?

3. Decentralization– How will peers find content?

8-9.6

Page 9: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 9

BitTorrent Protocol• Steps to download a torrent:

1. Start with torrent description2. Contact tracker to join and get list of

peers (with at least seed peer)2. Or, use DHT index for peers3. Trade pieces with different peers4. Favor peers that upload to you rapidly;

“choke” peers that don’t by slowing your upload to them

8-9.13

Page 10: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

BitTorrent Protocol (2)• All peers (except seed) retrieve torrent at the same time

Computer Networks 108-9.14

Page 11: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 11

Network Delay (2)• Network delay is variable– Message latency plus queuing delay– Variability in delay is called jitter

Delay (msec)

Frac

tion

(PD

F)

Latency Queuing

9-2.4

Page 12: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 12

Playout Buffer (2)• Media arrival curve determines

time in playout buffer and deadline

Time

Med

ia ti

mes

tam

p

PlayoutBuffering

Too late!

9-2.9

Page 13: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

RTP (Real-time Transport Protocol)• Used to carry media on top of best effort UDP (§6.4.3)– Header has media format, timestamp, sequence number, etc.– Media follows in standard formats, e.g., G.711, MP4

Computer Networks 139-2.13

Page 14: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 14

SIP Signaling (2)• Signaling for call control– Like HTTP, uses simple

method/response codes– Runs on UDP or TCP– SIP proxy servers and

registrars provide mobility (not shown)

INVITE180 RINGING

200 OK

Acceptcall

BYE

RTP media

200 OKACK

Hangup

9-2.16

Page 15: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Handling Bandwidth• Send file in one of multiple encodings– Higher quality encodings require more bandwidth– Select best encoding given available bandwidth

Computer Networks 15

By Toytoy, CC-BY-SA-3.0, from Wikimedia Commons

23:1 46:1 144:115:1

Higher qualityMore bandwidth

Lower qualityLess bandwidth

(JPEG example)

9-3.6

Page 16: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 16

Streaming with HTTP• Fetch media description data

– Gives index of clips, rates• Fetch small segments

– Put in playout buffer• Adapt selection of encoding

– Based on buffer occupancy

• Evolving standards, e.g., DASH – Leverages HTTP and HTML5– Server is otherwise stateless

GET INDEX

GET MEDIA

GET MEDIA

GET MEDIA

GET MEDIA

9-3.10

Page 17: Network Technologies essentials Week 9: Distributed file sharing & multimedia Compilation made by Tim Moors, UNSW Australia Original slides by David Wetherall,

Computer Networks 17

END

© 2013 D. Wetherall

Slide material from: TANENBAUM, ANDREW S.; WETHERALL, DAVID J., COMPUTER NETWORKS, 5th Edition, © 2011. Electronically reproduced by permission of Pearson Education, Inc., Upper Saddle River, New Jersey