cs 414 - spring 2012 cs 414 multimedia systems design lecture 37 introduction to p2p (part 1)...

21
CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 37 – Introduction to P2P (Part 1) Klara Nahrstedt

Upload: clement-dickerson

Post on 18-Jan-2018

227 views

Category:

Documents


0 download

DESCRIPTION

Administrative Competition of final four groups on Tuesday 5-7pm in 3401 SC/ 216 SC  ByteMobile Inc. company – judging competition (and TA/Instructor)  The top four groups should prepare 3-4 power-point slides to present Intro Slide – name of your system and your names (1 slide) Surveillance System Design – overall architecture (1 slide) Features of Your System - interface (1 slide) Features of Your System – other features (1 slide)

TRANSCRIPT

Page 1: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

CS 414 - Spring 2012

CS 414 – Multimedia Systems Design

Lecture 37 – Introduction to P2P (Part 1)

Klara Nahrstedt

Page 2: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Administrative MP3 deadline Saturday April 28, 5pm

Demonstrations of MP3, April 30, 5-7pm Groups should sign up as follows:

5-6pm – 3rd floor 3401 SC for groups that work with laptops and need wireless connectivity for MP3

6-7pm - 216 SC basement for groups who work with PCs and need wired connectivity for MP3

Top four groups will be decided Monday, April 30 at 7pm (via email, also posted on the newsgroup/classwebsite) - these groups will compete in front of the judges on Tuesday, May 1

CS 414 - Spring 2012

Page 3: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Administrative Competition of final four groups on

Tuesday 5-7pm in 3401 SC/ 216 SC ByteMobile Inc. company – judging competition (and

TA/Instructor) The top four groups should prepare 3-4 power-point

slides to present Intro Slide – name of your system and your names (1 slide) Surveillance System Design – overall architecture (1 slide) Features of Your System - interface (1 slide) Features of Your System – other features (1 slide)

Page 4: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Administrative Homework 2 is posted

Deadline May 2, Wednesday midnight 11:59pm Peer Evaluations – due Friday, May 4, midnight

Peer Evaluation Form and Explanation - available on the class website

Submit your Peer Evaluation to [email protected] Note: if you do not submit your peer evaluations, you get

0 for self-evaluation and 100% for your group mates. ¼ Unit projects – due Friday, May 4 midnight (if

you need more time, arrange deadline with instructor)

CS 414 - Spring 2012

Page 5: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Why P2P?

People like to get togetherShare thingsShare information

How can I find others to share? How can I find what they are sharing?

CS 414 - Spring 2012

Page 6: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Why P2P?

WWW to share?Not everyone can set up and maintain a

websiteMight not have a good enough search engine

rank Sharing on a social network?

Only possible if you created the contentPeople have to find you, instead of the

contentCS 414 - Spring 2012

Page 7: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Napster

Created in 1999 to share music

CS 414 - Spring 2012

Napster’s servers• Store file directory

(Filename/location)

Clients/peers• Store files

Centralized Peer Management: Each Peer registers withthe Napster server and Napster server(s) keep Peer List

Centralized File Management:Searching for other peer file is central, i.e., Peers go to Napster servers which keep file list of files and which peer keeps what files

Page 8: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Napster- Search Operation

CS 414 - Spring 2012

1. Query (keyword)

2. Servers search using ternary tree

3. Response

4. Ping candidates5. Download

Page 9: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Napster’s drawbacks

Asymmetric operation – servers vs. client peersCentralized Peer Management and File

ManagementScalability and congestion issuesSingle point of failure

Napster responsible for abetting users’ copyright violation

CS 414 - Spring 2012

Page 10: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Contemporary P2P systems Symmetric operation – all nodes (peers)

have the same functionalitySystem naturally scales with new peers

Distributed Peer Management Each peer when it comes online, advertises its own presence Each peer keeps a peer list to whom it is connected

Distributed File Management Each peer keeps file list of files it keeps. If a peer wants a file, it queries/searches for a file.

CS 414 - Spring 2012

Page 11: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Contemporary P2P systems

Basic operations Insert fileSearch fileDelete fileMaintain an overlay network

CS 414 - Spring 2012

physical network

Overlay P2P network

Page 12: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Contemporary P2P Systems (Classification) Usually classified depending on how peers

connect to each-other how the overlay network is created and maintained

Unstructured – no particular connection pattern (e.g., randomly connected) Gnutella Fast Track

Skype BitTorrent, etc.

CS 414 - Spring 2012

Page 13: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Contemporary P2P Systems (Classification) Structured – defines a distributed data

structure (e.g., distributed hash table)ChordPastryCANEtc.

CS 414 - Spring 2012

Page 14: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Gnutella – Example of Unstructured P2P

CS 414 - Spring 2012

Servents (peers)

Peer pointer

Peers store:• Their files• Peer pointers (peer management)

Page 15: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Gnutella, searching for files

CS 414 - Spring 2012

Query message: <id, QUERY, ttl, hops, payload length, min speed, keywords>Query hit message: <id, QUERY HIT, ttl, hops, payload length, num hits, port, ip, speed, (fileindex, filename, filesize), servent id>

“jazz”??

1. Flood query ( )2. Ignore repeated

messages3. Answer if local

match 4. Query hit sent

using reverse path ( )

5. Establish connection and fetch file ( )

“jazz”

Page 16: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Gnutella, maintaining overlay (peer management)

CS 414 - Spring 2012

VX

A

Ping: <id, PING, ttl, hops, payload length (zero)>Pong: <id, PONG, ttl, hops, payload length, port, ip, num. files, num. KBs>

Neighbor list:•“A”

“V”

“X”

1. Periodically flood ping ( )

2. Pong sent using reverse path( )

3. Update neighbor list with received pongs

• Why periodically?

Page 17: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Gnutella, maintaining the overlay (peer management)

CS 414 - Spring 2012

VX

Peers can leave or fail at any time – P2P systems can have high churn rate!.

Neighbor list:•“A”•“V”•“X”

Page 18: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Gnutella: some issues

Ping/Pong constitutes 50% of traffic Flooding causes excessive traffic Repeated searches with same keywords Large number of freeloaders (70% of

users in 2000)

CS 414 - Spring 2012

Page 19: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

DHTs (Distributed Hash Tables) – Example of Structured P2P Hash table allows these operations on

object identified by key: InsertLookup Delete

Distributed Hash Table – same but in a distributed setting (object could be files)

CS 414 - Spring 2012

Page 20: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

DHT performance comparisonMemory Lookup latency lookup overhead

Napster O(1) at client; O(N) at server

O(1) O(1)

Gnutella O(N) O(N) O(N)Chord (DHT) O(log(N)) O(log(N)) O(log(N))

CS 414 - Spring 2012

Page 21: CS 414 - Spring 2012 CS 414  Multimedia Systems Design Lecture 37  Introduction to P2P (Part 1) Klara Nahrstedt

Conclusion

P2P technology – very viable technology for multimedia distribution

CS 414 - Spring 2012