BitTorrent Vs Gnutella.

Slides:



Advertisements
Similar presentations
Peer-to-Peer and Social Networks An overview of Gnutella.
Advertisements

Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 12 Prof. Crista Lopes.
The BitTorrent protocol A peer-to-peer file sharing protocol.
Incentives Build Robustness in BitTorrent Bram Cohen.
CompSci 356: Computer Network Architectures Lecture 21: Content Distribution Chapter 9.4 Xiaowei Yang
Gnutella 2 GNUTELLA A Summary Of The Protocol and it’s Purpose By
An Overview of Peer-to-Peer Networking CPSC 441 (with thanks to Sami Rollins, UCSB)
1 Unstructured Routing : Gnutella and Freenet Presented By Matthew, Nicolai, Paul.
Gnutella, Freenet and Peer to Peer Networks By Norman Eng Steven Hnatko George Papadopoulos.
1 Seminar: Information Management in the Web Gnutella, Freenet and more: an overview of file sharing architectures Thomas Zahn.
Peer To Peer Distributed Systems Pete Keleher. Why Distributed Systems? l Aggregate resources! –memory –disk –CPU cycles l Proximity to physical stuff.
1CS 6401 Peer-to-Peer Networks Outline Overview Gnutella Structured Overlays BitTorrent.
CSE 461 University of Washington1 Topic Peer-to-peer content delivery – Runs without dedicated infrastructure – BitTorrent as an example Peer.
The Bittorrent Protocol
P2P File Sharing Systems
INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington.
Freenet. Anonymity  Napster, Gnutella, Kazaa do not provide anonymity  Users know who they are downloading from  Others know who sent a query  Freenet.
Peer-to-Peer Computing CS587x Lecture Department of Computer Science Iowa State University.
1 Napster & Gnutella An Overview. 2 About Napster Distributed application allowing users to search and exchange MP3 files. Written by Shawn Fanning in.
Introduction Widespread unstructured P2P network
1 Reading Report 4 Yin Chen 26 Feb 2004 Reference: Peer-to-Peer Architecture Case Study: Gnutella Network, Matei Ruoeanu, In Int. Conf. on Peer-to-Peer.
BitTorrent Presentation by: NANO Surmi Chatterjee Nagakalyani Padakanti Sajitha Iqbal Reetu Sinha Fatemeh Marashi.
BitTorrent Internet Technologies and Applications.
BitTorrent How it applies to networking. What is BitTorrent P2P file sharing protocol Allows users to distribute large amounts of data without placing.
1 BitTorrent System Efrat Oune Bar-Ilan What is BitTorrent? BitTorrent is a peer-to-peer file distribution system (built for intensive daily use.
Introduction of P2P systems
A P2P file distribution system ——BitTorrent Pegasus Team CMPE 208.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
1 Slides from Richard Yang with minor modification Peer-to-Peer Systems: DHT and Swarming.
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP r.
SIGCOMM 2001 Lecture slides by Dr. Yingwu Zhu Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
1 Peer-to-Peer Technologies Seminar by: Kunal Goswami (05IT6006) School of Information Technology Guided by: Prof. C.R.Mandal, School of Information Technology.
1 Indranil Gupta (Indy) Lecture 4 Peer to Peer Systems January 30, 2014 All Slides © IG CS 525 Advanced Distributed Systems Spring 2014.
15-744: Computer Networking L-22: P2P. Lecture 22: Peer-to-Peer Networks Typically each member stores/provides access to content Has quickly.
P2PComputing/Scalab 1 Gnutella and Freenet Ramaswamy N.Vadivelu Scalab.
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
Peer-to-Peer By Rui Zhang, Chen Teng, Li Dong, Quanshuan He & Yongzheng Zhang.
NETE4631 Network Information Systems (NISs): Peer-to-Peer (P2P) Suronapee, PhD 1.
ADVANCED COMPUTER NETWORKS Peer-Peer (P2P) Networks 1.
15-744: Computer Networking L-22: P2P. L -22; © Srinivasan Seshan, P2P Peer-to-peer networks Assigned reading [Cla00] Freenet: A Distributed.
Peer-to-peer systems (part I) Slides by Indranil Gupta (modified by N. Vaidya)
A Reputation-Based Approach for Choosing Reliable Resources in Peer-to-Peer Networks E. Damiani S. De Capitani di Vimercati S. Paraboschi P. Samarati F.
Algorithms and Techniques in Structured Scalable Peer-to-Peer Networks
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 37 – Introduction to P2P (Part 1) Klara Nahrstedt.
15-744: Computer Networking L-23: P2P. L -23; © Srinivasan Seshan, P2P Peer-to-peer networks Assigned reading [Cla00] Freenet: A Distributed.
Peer to Peer Networking. Network Models => Mainframe Ex: Terminal User needs direct connection to mainframe Secure Account driven  administrator controlled.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
P2P Search COP P2P Search Techniques Centralized P2P systems  e.g. Napster, Decentralized & unstructured P2P systems  e.g. Gnutella.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 37 – Introduction to P2P (Part 1) Klara Nahrstedt.
Distributed Systems Lecture 10 P2P systems 1. Previous lecture Leader election – Problem – Algorithms 2.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 24 – Introduction to Peer-to-Peer (P2P) Systems Klara Nahrstedt (presented by Long Vu)
1 Gnutella. 2 Overview r P2P search mechanism r Simple and straightforward r Completely decentralized r Creates overlay network r Different applications.
An example of peer-to-peer application
Introduction to BitTorrent
CS 268: Lecture 22 (Peer-to-Peer Networks)
Peer-to-Peer and Social Networks
مظفر بگ محمدی دانشگاه ایلام
Early Measurements of a Cluster-based Architecture for P2P Systems
EE 122: Peer-to-Peer (P2P) Networks
15-744: Computer Networking
CS 162: P2P Networks Computer Science Division
CPE 401/601 Computer Network Systems
Unstructured Routing : Gnutella and Freenet
The BitTorrent Protocol
Content Distribution Networks + P2P File Sharing
#02 Peer to Peer Networking
Content Distribution Networks + P2P File Sharing
CSE 486/586 Distributed Systems Peer-to-Peer Architecture --- 1
Presentation transcript:

BitTorrent Vs Gnutella

Presentation Overview Gnutella. Bittorrent.. Code Review.

P2P Peer-to-peer networks Assigned reading [Cla00] Freenet: A Distributed Anonymous Information Storage and Retrieval System [S+01] Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications

Overview P2P Lookup Overview Centralized/Flooded Lookups

Peer-to-Peer Networks Typically each member stores/provides access to content Has quickly grown in popularity Bulk of traffic from/to CMU is Kazaa! Basically a replication system for files Always a tradeoff between possible location of files and searching difficulty Peer-to-peer allow files to be anywhere  searching is the challenge Dynamic member list makes it more difficult What other systems have similar goals? Routing, DNS

Centralized Lookup (Napster) SetLoc(“title”, N4) N3 Client DB N4 Publisher@ Lookup(“title”) Key=“title” Value=MP3 data… N8 N9 N7 N6 O(N) state means its hard to keep the state up to date. Simple, but O(N) state and a single point of failure

Flooded Queries (Gnutella) Lookup(“title”) N3 Client Publisher@ N4 Key=“title” Value=MP3 data… N6 N8 N7 N9 Robust, but worst case O(N) messages per lookup

Routed Queries (Freenet, Chord, etc.) Client N4 Lookup(“title”) Publisher Key=“title” Value=MP3 data… N6 N8 N7 Challenge: can we make it robust? Small state? Actually find stuff in a changing system? Consistent rendezvous point, between publisher and client. N9

Overview P2P Lookup Overview Centralized/Flooded Lookups

Centralized: Napster Simple centralized scheme  motivated by ability to sell/control How to find a file: On startup, client contacts central server and reports list of files Query the index system  return a machine that stores the required file Ideally this is the closest/least-loaded machine Fetch the file directly from peer

Centralized: Napster Advantages: Disadvantages: Simple Easy to implement sophisticated search engines on top of the index system Disadvantages: Robustness, scalability Easy to sue!

Gnutella What Gnutella is? How it works? Its positives and negatives.

What is Gnutella? Gnutella uses distributed search protocol. Each node in a Gnutella network acts as both a client and server. Peer to Peer, decentralized model for file sharing. Any type of file can be shared. Nodes are called “Servents”.

What do Servents do? Servents “know” about other Servents. Act as interfaces through which users can issue queries and view search results. Communicate with other Servents by sending “descriptors”.

Descriptors Each descriptor consists of a header and a body. The header includes (among other things) A descriptor ID number. A Time-To-Live number. The body includes: Port information. IP addresses. Query information. Etc… depending on the descriptor.

Header Fields Descriptor ID Payload Descriptor TTL Hops Payload Length Num. Of Bytes 16 1 4 Descriptor ID Payload descriptor TTL HOPS Payload length

Body Fields Port IP Address Number of Files Shared Number of Kilobytes Shared Optional Pong Data Num. Of Bytes 2 4 L-14 N+2...L-1 N+1 2...N 0...1 Byte offset (Optional) Query Data NUL (0x00) Terminator Search Criteria String Minimum Speed Fields

Routing Node forwards Ping and Query descriptors to all nodes connected to it. Except: If descriptor’s TTL is decremented to 0. Descriptor has already been received before. Loop detection is done by storing Descriptor ID’s. Pong and QueryHit descriptors retrace the exact path of their respective Ping and Query descriptors.

Routing2 C B A D QueryHit Query Query Note: Ping works essentially the same way, except that a Pong is sent as the response

Joining a Gnutella Network Servent connects to the network using TCP/IP connection to another servent. Could connect to a friend or acquaintance, or from a “Host-Cache”. Send a Ping descriptor to the network Hopefully, a number of Pongs are received

Querying Servent sends Query descriptor to nodes it is connected to. Queried Servents check to see if they have the file. If query match is found, a QueryHit is sent back to querying node.

Downloading a File File data is never transferred over the Gnutella network. Data transferred by direct connection Once a servent receives a QueryHit descriptor, it may initiate the direct download of one of the files described by the descriptor’s Result Set. The file download protocol is HTTP. Example: GET /get/<File Index>/<File Name>/ HTTP/1.0\r\n Connection: Keep-Alive\r\n Range: bytes=0-\r\n User-Agent: Gnutella\r\n3

Direct File Download C QueryHit TCP/IP Connection B Query A Query

Overall: Simple Protocol. Not a lot of overhead for routing. Robustness? No central point of failure. However: A file is only available as long as the file-provider is online. Vulnerable to denial-of-service attacks.

Overall Cont. Scales poorly: Querying and Pinging generate a lot of unnecessary traffic. Example: If TTL = 10 and each site contacts six other sites. Up to 10^6 messages could be generated. On a slow day, a GnutellaNet would have to move 2.4 gigabytes per second in order to support numbers of users comparable to Napster. On a heavy day, 8 gigabytes per second (Ritter article). Heavy messaging can result in poor performance.

The BitTorrent protocol A peer-to-peer file sharing protocol.

Philosophy Author: Bram Cohen Based on Tit-for-tat Incentive - Uploading while downloading Pieces of files

BitTorrent HTTP TCP

Overall Architecture Tracker Web Server .torrent C A [Seed] Peer Web page with link to .torrent A B C Peer [Leech] Downloader “US” [Seed] Tracker Web Server .torrent

Overall Architecture Tracker Web Server Get-announce C A [Seed] Peer Web page with link to .torrent A B C Peer [Leech] Downloader “US” [Seed] Tracker Get-announce Web Server

Overall Architecture Tracker Web Server Response-peer list C A [Seed] Web page with link to .torrent A B C Peer [Leech] Downloader “US” [Seed] Tracker Response-peer list Web Server

Overall Architecture Tracker Web Server Hand-shake C A [Seed] Peer Web page with link to .torrent A B C Peer [Leech] Downloader “US” [Seed] Tracker Hand-shake Web Server

Overall Architecture Tracker Web Server C A pieces [Seed] Peer [Leech] Web page with link to .torrent A B C Peer [Leech] Downloader “US” [Seed] Tracker pieces Web Server

Overall Architecture Tracker Web Server C A pieces [Seed] Peer [Leech] Web page with link to .torrent A B C Peer [Leech] Downloader “US” [Seed] Tracker pieces Web Server

Overall Architecture Tracker Web Server Get-announce Web page with link to .torrent A B C Peer [Leech] Downloader “US” [Seed] Tracker Get-announce Response-peer list pieces Web Server

Messages Peer – Peer messages. TCP Sockets. Peer – Tracker messages. HTTP Request/Response.

.torrent URL of the tracker. Pieces <hash1,hash2,….hashn>. Piece length. Name. Length. Files. Path.

Tracker Peer cache. IP, port, peer id State information. Completed. Downloading. Returns random list.

Peer Operation Choking algorithm Choke/Unchoke. Preferred peers. Upload to interested peers who are not choking.

Peer Operation Verify on receiving complete piece Endgame Behavior Cancel

Strengths Better bandwidth utilization Never before speeds. Up to 7 MB/s from the Internet. Limit free riding – tit-for-tat. Limit leech attack – coupling upload & download. Ability to resume a download.

Drawbacks Small files – latency, overhead. Scalability Millions of peers – Tracker behavior (uses 1/1000 of bandwidth). Single point of failure. Robustness System progress dependent on altruistic nature of seeds (and peers). Malicious attacks and leeches.

Code Language Bittorrent - Python. Gnutella – C++/ Java. Both of them are open source. Easy to find the open source but impossible to find green.