P2P Content Distribution BitTorrent and Spotify

Similar documents
Distributed Hash Tables

Probabilistic Quorum-Based Accounting for Peer-to-Peer Systems

Quorums. Christian Plattner, Gustavo Alonso Exercises for Verteilte Systeme WS05/06 Swiss Federal Institute of Technology (ETH), Zürich

AUTOMATION. Presents DALI

Distributed Systems. 11. Consensus: Paxos. Paul Krzyzanowski. Rutgers University. Fall 2015

This report is organized in four sections. The first section discusses the sample design. The next

Data Sharing and Synchronization using Dropbox

Agency Info The Administrator is asked to complete and keep current the agency information including web site and agency contact address.

Circle of Influence Strategy (For YFC Staff)

DPaxos: Managing Data Closer to Users for Low-Latency and Mobile Applications

The Stellar Consensus Protocol (SCP)

HOW TO USE OUR APP. A brief guide to using the urbi app on any smartphone. How to use our app on any smartphone

Grids: Why, How, and What Next

What can happen if two quorums try to lock their nodes at the same time?

Sharia Economic and Finance Development Strategies

Use of Gaia DR1 data from TOPCAT

Load balanced Scalable Byzantine Agreement through Quorum Building, with Full Information

Chapter 2: Commitment

TOPCAT and how to use it for Gaia

Allegheny East Conference Seventh-day Adventist Church. An information base for strategic planning

Instructions for Ward Clerks Provo Utah YSA 9 th Stake

NEOPOST POSTAL INSPECTION CALL E-BOOK

Podcasting Church By Paul Alan Clifford READ ONLINE

Project 1: Grameen Foundation USA, Philippine Microfinance Initiative

October 27, 2017 / 7 Cheshvan 5778

IN a distributed database system, data is

BFF 2010 MINISTRY & FINANCIAL REPORT

UCB CS61C : Machine Structures

Introduction to Statistical Hypothesis Testing Prof. Arun K Tangirala Department of Chemical Engineering Indian Institute of Technology, Madras

Performance Analysis with Vampir

How to secure the keyboard chain

New York Conference Church Dashboard User Guide

Practicing The Power Of Now By Eckhart Tolle READ ONLINE

Index. in this web service Cambridge University Press

Use of Gaia DR1 data from TOPCAT

HIE Landscape in California

Use of Gaia DR1 data from TOPCAT

Application for curing ailments through mudra science

The Dangers of Social Networking

Bigdata High Availability Quorum Design

Oriental Mythology (The Masks Of God) By Joseph Campbell READ ONLINE

CAIN AND ABEL PRODUCTS MANUAL E-PUB

Carolina Bachenheimer-Schaefer, Thorsten Reibel, Jürgen Schilder & Ilija Zivadinovic Global Application and Solution Team

ALIEN REVELATION ALIEN REVELATION PDF ALIEN REVELATION - PDF FREE DOWNLOAD - EPDF.TIPS ALIEN REVELATION - AVALON LIBRARY

mministry Weblinks- Evangelism, Discipleship, Church, World Missions

Pastor Views on Technology. Survey of Protestant Pastors

Overview of the ATLAS Fast Tracker (FTK) (daughter of the very successful CDF SVT) July 24, 2008 M. Shochet 1

Q: How important is it to close your eyes while you practice mindufulness?

PRAYERS VERSES AND DEVOTIONS PDF

Allreduce for Parallel Learning. John Langford, Microsoft Resarch, NYC

HOW TO WRITE AN NDES POLICY MODULE

ANGLICAN ALLIANCE RELIEF GUIDELINES-DRAFT

Online Mission Office Database Software

Privacy: more than meets the eye. Daniel Kifer (Penn State University)

DOWNLOAD OR READ : MEDITATION THE BIBLE TELLS YOU HOW PDF EBOOK EPUB MOBI

Reports to: Rocky Mountain Mobilization Manager DEPARTMENT / FUNCTIONAL GROUP: Mobilization / Resources Group

Lost Books Of The Bible For Dummies By Stephen J. Spignesi, Daniel L. Smith- Christopher

MusicKit on the Web #WWDC18. Betim Deva, Engineering Manager, Apple Music DJ Davis, Engineering Manager, Apple Music Jae Hess, Engineer, Apple Music

GLOCAL- MISSIONAL TRAINING CENTER

University of Sioux Falls Online Course September 10 November 19, 2013 THE 140 Introduction to the Bible

EXPECTATIONS & GUIDELINES

Treasures Reading/Language Arts Program

DALI HELP & TROUBLESHOOTING

DOWNLOAD OR READ : VOICE OF LIFE TRADITIONAL THOUGHT AND MODERN SCIENCE PDF EBOOK EPUB MOBI

State of HIE in California

The Gaia Archive. A. Mora, J. Gonzalez-Núñez, J. Salgado, R. Gutiérrez-Sánchez, J.C. Segovia, J. Duran ESA-ESAC Gaia SOC and ESDC

Faculty Advisor Bryan K. Marcia, PhD

Instructions for Using the NEW Search and Map Features. Larry Bartlett, J.D. Volusia County Property Appraiser

Right in God s Sight Paul s Letter to the Romans

E-BOOK // WORSHIP FOR FIREFIGHTERS PART LIST

Parish of Christ the King

Vray 1.50 sp2 x86 crack. Vray 1.50 sp2 x86 crack.zip

It s Not About the Money It s About Relationships!

Welcome to Breeze Fairview Baptist s Church Management Software

A THORNY DECISION FOR ROSE LIBERIA SCRIPT A (DRAFT)

Noah And The Ark / Noé Y El Arca (I Can Read! / The Beginner's Bible / Yo Sé Leer!) By Zondervan READ ONLINE

Executive Summary December 2015

Soto Zen Ancestors In China

Noah Builds a Boat. Lesson 5

So how do we welcome the unbeliever, when the only way they will truly belong is when they also believe the gospel?

Church Manual Mormon Handbook 1 READ ONLINE

A readers' guide to 'Laudato Si''

Parish Pastoral Council 1. Introduction 2. Purpose 3. Scope

NAVAL POSTGRADUATE SCHOOL

The Stellar Consensus Protocol (SCP) draft-mazieres-dinrg-scp-00

Personal Data Protection Policy

Project Plan. Empower African Missionaries

Published in the United States by WaterBrook Multnomah, an imprint of the Crown Publishing Group, a division of Penguin Random House LLC, New York.

DOWNLOAD OR READ : COLLECTIVE RATIONALITY EQUILIBRIUM IN COOPERATIVE GAMES PDF EBOOK EPUB MOBI

Sorting: Merge Sort. College of Computing & Information Technology King Abdulaziz University. CPCS-204 Data Structures I

Graham Thomas Independent Software Testing Consultant

APRIL 2017 KNX DALI-Gateways DG/S x BU EPBP GPG Building Automation. Thorsten Reibel, Training & Qualification

Strategic Plan for Young Adult Ministry: Development, Growth and Expansion

Module 1: Health Information Exchange Policy and Procedures

SEGMENT B10: COSMOPOLITAN ACHIEVERS Mission Impact Focusing your heartburst for the people around you

Tad James Master Practitioner Nlp Manual READ ONLINE

Special Worship Service Invitation

UNDERSTANDING THE MBC S REORIENTATION Q&A S WITH THE MISSOURI BAPTIST CONVENTION S STRATEGIC LEADERS:

Knowing Christ Lessons from Paul s Life and Ministry Freedom in Christ Galatians 1:1-24 Inductive Discovery Lesson 2

USE IT TO SHARE THE GOOD NEWS Psalm :1 Oh sing to the LORD a new song; sing to the LORD, all the earth! 2 Sing to the LORD, bless his name;

Transcription:

P2P Content Distribution BitTorrent and Spotify Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 1 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 2 / 62

Possible Solutions for Content Distribution Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 3 / 62

Client-Server Model Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 4 / 62

Client-Server Model Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 5 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 6 / 62

The Client-Server Model Problems Scalability? Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 7 / 62

The Client-Server Model Problems Scalability? Single Point of failure? Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 7 / 62

The Client-Server Model Problems Scalability? Single Point of failure? Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 7 / 62

Client-Server Systems Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 8 / 62

The Client-Server Model Problem Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 9 / 62

Scalable and Fault-Tolerant Client-Server Model Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 10 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 11 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 12 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 13 / 62

Peer-to-Peer Model Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 14 / 62

Peer-to-Peer (P2P) Model Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 15 / 62

P2P Challenges I Churn in the system I Free-riding problem I Bottleneck in the overlay network I Connectivity problem, e.g., NAT Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 16 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 17 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 18 / 62

How To Discover Data? Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 19 / 62

Possible Solutions - First Generation Central directory Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 20 / 62

Possible Solutions - Second Generation Flooding Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 21 / 62

Possible Solutions - Third Generation Distributed Hash Table (DHT) Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 22 / 62

P2P Content Distribution Applications - File Sharing Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 23 / 62

P2P Content Distribution Applications - Media Streaming Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 24 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 25 / 62

BitTorrent BitTorrent is a system for efficient and scalable replication of large amounts of static data. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 26 / 62

BitTorrent Players Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 27 / 62

Files Files are broken into pieces of size between 64KB and 1MB. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 28 / 62

.torrent Files Metadata Contains: URL of tracker Information about the file, e.g., filename, length,... Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 29 / 62

The Core Idea A peer obtains.torrent file. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 30 / 62

The Core Idea A peer obtains.torrent file. It, then, connects to the tracker. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 30 / 62

The Core Idea A peer obtains.torrent file. It, then, connects to the tracker. The tracker tells the peers from which other peers to download the pieces of the file. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 30 / 62

The Core Idea A peer obtains.torrent file. It, then, connects to the tracker. The tracker tells the peers from which other peers to download the pieces of the file. Peers use this information to communicate with each other. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 30 / 62

The Core Idea A peer obtains.torrent file. It, then, connects to the tracker. The tracker tells the peers from which other peers to download the pieces of the file. Peers use this information to communicate with each other. The peers send information about the file and themselves to tracker. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 30 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 31 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 32 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 33 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 34 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 35 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 36 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 37 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 38 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 39 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 40 / 62

What About Free Riders? Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 41 / 62

Tit-For-Tat Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 42 / 62

Question From which peers download the pieces? Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 43 / 62

Peer Selection Use choking algorithm to choose peer to download pieces. Decision to choke/unchoke based on tit-for-tat. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 44 / 62

Discover More Cooperating Peers Optimistic unchoking Allocate an upload slot to a randomly chosen uncooperative peer Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 45 / 62

Snubbed Peers If all its peers choke it. Increase the number of optimistic unchokes. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 46 / 62

Question Which piece? Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 47 / 62

Piece Selection Rarest first: common parts left for later Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 48 / 62

Piece Selection Rarest first: common parts left for later Random first piece: start-up need to get a complete piece Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 48 / 62

Piece Selection Rarest first: common parts left for later Random first piece: start-up need to get a complete piece Endgame mode: broadcast for all remaining blocks Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 48 / 62

BitTorrent Extension Distributed tracker Peer-exchange Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 49 / 62

Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 50 / 62

Spotify Active users: over 50 million Number of songs: over 20 million Number of songs added per day: over 20000 Number of playlists: over 1.5 billion created so far Available in 58 countries Legal Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 51 / 62

The Core Idea Request first piece from Spotify servers. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 52 / 62

The Core Idea Request first piece from Spotify servers. Meanwhile, search P2P network for remainder. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 52 / 62

The Core Idea Request first piece from Spotify servers. Meanwhile, search P2P network for remainder. Switch back and forth between Spotify servers and peers as needed. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 52 / 62

The Core Idea Request first piece from Spotify servers. Meanwhile, search P2P network for remainder. Switch back and forth between Spotify servers and peers as needed. Towards end of a track, start prefetching the next one. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 52 / 62

Main Problem in Using Spotify P2P Network Peer Discovery Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 53 / 62

Peer Discovery Sever-side tracker (BitTorrent style) Only remembers 20 peers per track. Returns 10 (online) peers to client on query. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 54 / 62

Peer Discovery Sever-side tracker (BitTorrent style) Only remembers 20 peers per track. Returns 10 (online) peers to client on query. Broadcast query in small (2 hops) neighborhood in overlay (Gnutella style) Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 54 / 62

Peer Discovery Sever-side tracker (BitTorrent style) Only remembers 20 peers per track. Returns 10 (online) peers to client on query. Broadcast query in small (2 hops) neighborhood in overlay (Gnutella style) LAN peer discovery Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 54 / 62

Downloading in P2P Ask for most urgent pieces first. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 55 / 62

Downloading in P2P Ask for most urgent pieces first. If a peer is slow, re-request from new peers. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 55 / 62

Downloading in P2P Ask for most urgent pieces first. If a peer is slow, re-request from new peers. When buffers are low, download from central server as well. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 55 / 62

Downloading in P2P Ask for most urgent pieces first. If a peer is slow, re-request from new peers. When buffers are low, download from central server as well. If buffers are very low, stop uploading. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 55 / 62

Spotify vs. BitTorrent One (well, three) P2P overlay for all tracks (not per-torrent). Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 56 / 62

Spotify vs. BitTorrent One (well, three) P2P overlay for all tracks (not per-torrent). Does not inform peers about downloaded blocks. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 56 / 62

Spotify vs. BitTorrent One (well, three) P2P overlay for all tracks (not per-torrent). Does not inform peers about downloaded blocks. Downloads blocks in order. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 56 / 62

Spotify vs. BitTorrent One (well, three) P2P overlay for all tracks (not per-torrent). Does not inform peers about downloaded blocks. Downloads blocks in order. Does not enforce fairness (such as tit-for-tat). Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 56 / 62

Spotify vs. BitTorrent One (well, three) P2P overlay for all tracks (not per-torrent). Does not inform peers about downloaded blocks. Downloads blocks in order. Does not enforce fairness (such as tit-for-tat). Informs peers about urgency of request. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 56 / 62

Caching Player caches tracks it has played. Use 10% of free space (capped at 10GB) Least Recently Used policy for cache eviction. Over 50% of data comes from local cache. Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 57 / 62

Spotify Data Usage Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 58 / 62

Spotify Says Goodbye to P2P Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 59 / 62

Summary Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 60 / 62

Summary Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 61 / 62

Questions? Amir H. Payberah (Tehran Polytechnic) P2P Content Distribution 1393/8/27 62 / 62