Economics and Computation Week 7: The economics of P2P file sharing Prof. Pingzhong Tang kenshin@tsinghua.edu.cn http://iiis.tsinghua.edu.cn/~kenshin/ec Fall 2016 11/21/2018 Pingzhong Tang
Reference Chapter 4, The economics of Peer-to-Peer file sharing Economics and computation. David Parkes, Sven Seuken. Cambridge press. Project example: Mechanism design for resource allocation with applications to centralized multi-commodity routing. AAMAS-2015, Qipeng Liu, Yicheng Liu, Pingzhong Tang 11/21/2018 Pingzhong Tang
Client-server paradigm Download apps from apple store Stream videos from youtube Buy ebooks from amazon Key features Client and server are clearly separated For large scales, lots of local servers needed, costly 11/21/2018 Pingzhong Tang
P2P file-sharing paradigm P2P network: server = client = peer Who has ever used a P2P client? What client do you use? Why? How do you feel? Pros and cons? 11/21/2018 Pingzhong Tang
Client-server vs. P2P 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
A P2P protocol defines a game Actions, messages supported Rules of the game e.g., how files are shared among users Reference client: Default action Other clients: Other actions A p2p protocol defines a game! 11/21/2018 Pingzhong Tang
In 2002, P2P was responsible for 50% of internet traffic 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
Files shared by only a few hosts! 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
Repeated game? If the same file-sharing game played repeatedly, “share” is also an equilibrium outcome! Folk theorem, Tit-for-Tat, Grim Trigger Fact: large networks, low rendezvous probability Two peers rarely meet again in the future The game is not really repeated… Neatly solved in BitTorrent! 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
“I will share with you if you share with me” 11/21/2018 Pingzhong Tang
Download process of BitTorrent 11/21/2018 Pingzhong Tang
Terminologies Block: basic element of file .torrent file: name, SHA1, file size, tracker IP Tracker: a server that maintains a list of participating peers Swarm: peers current downloading/ uploading Leechers: downloading Seeders: have complete file and still uploading 11/21/2018 Pingzhong Tang
Terminologies Neighbors: Unchoked peers: two connected peers Exchange Bit-field: informs each other which pieces of file they have Unchoked peers: small subset of peers that a peer chooses to upload to Rarest first downloading strategy: leecher always starts from downloading the rarest pieces Unchoking strategy in BitTorrent? 11/21/2018 Pingzhong Tang
Unchoking mechanism 11/21/2018 Pingzhong Tang
Unchoking algorithm ≈ Tit for Tat Why ≈? 11/21/2018 Pingzhong Tang
Attacks (Manipulations) on BitTorrent 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
Attack #1 11/21/2018 Pingzhong Tang
BitThief vs. Default Client 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
Attack #2 11/21/2018 Pingzhong Tang
SPR vs. Default client 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
Technique details 11/21/2018 Pingzhong Tang
Attack #3: BitTyrant 11/21/2018 Pingzhong Tang
BitTyrant algorithm For each peer j, i estimates the download rate dj from j the upload rate uj necessary for reciprocation with j Allocate the upload budget greedily according to dj/ uj until budget is exhausted Update i’s estimation of d and u. Comments: new users have a longer bootstrapping phase What is this? 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
BitTyrant vs Default 11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
11/21/2018 Pingzhong Tang
Further readings Reading: chapter 4 of reference book #1 Optional reading: people.csail.mit.edu/hqz/papers/dime.pdf http://www.cs.ubc.ca/~kevinlb/pub.php?u=welcom01.pdf 11/21/2018 Pingzhong Tang