+ All Categories
Home > Documents > inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number...

inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number...

Date post: 15-May-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
45
inf5040 - Presentation by group 1 nghial, baardehe, chricar 30.10.08
Transcript
Page 1: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

inf5040 - Presentation by group 1

nghial, baardehe, chricar

30.10.08

Page 2: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Goals of today After this lecture you should

have a general understanding of what P2P and bittorrent is

be able to recognize the main differences of bitTorrent and other P2P networks

Page 3: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

A way of organizing resource sharing in computer networks

Page 4: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

What is P2P?Server/client model Peer-to-peer model

Page 5: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Characteristics of P2P networks Peers act as equals

Peers function as both client and server

No central server managing the network

No central router

Examples of ”pure” P2P networks

Gnutella, Freenet (filesharing)

Page 6: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

In short Decentralization and multirole

BUT!

Most networks and applications described as P2P actually contain or rely on some non-peer elements

Page 7: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

History 1970 – SMTP, NNTP (Usenet)

One process both server and client

IBM, 1984 ”Advanced Peer to Peer Networking”

Software for filesharing in a LAN

1990 – IRC (DCC), MBONE

One client can both send and receive

1997 – Napster

Created a lot of controversy

Convicted because of the centralized file indexing

Page 8: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Advantages of P2P networks Better performance and reliability compared to

server/client scheme

Popular resources will be available at several locations

Principle of locality -> less delay and faster transmission

Page 9: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Overlay routing Application layer routing (middleware)

Two ways of searching for files

Flooding

DHT (Distributed Hash Table)

Page 10: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Area of application Mostly used in ad hoc networks

Often categorized by what it’s used for

Filesharing

Media streaming

Telephony (skype)

Discussion forums

Used to distribute short messages within the stock market.

Page 11: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Categories of P2P systems Centralized

Indexing server

Decentralized

All peers equal

Structured

DHT

Unstructured

Flooding

Hybrid

Centralized index, P2P transfer

Page 12: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

P2P security No protection against malware

Each client is vulnerable to DoS attack

But this won’t hurt the overall performace of the network unless the attack is really massive

Page 13: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Used to distribute large amounts of data

Page 14: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Concept Each peer who downloads the data also uploads them

to other peers

Significant reduction in the original distributor’s hardware and resource costs

Redundancy against system problems

Reduces dependance on original distributor

Page 15: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

History Bram Cohen, 2001

Designer of the BitTorrent protocol

Maintained by Cohen’s company BitTorrent, Inc

Page 16: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

How does the protocol work?1. Create small file -> torrent

Contains metadata about files and tracker

2. Peers download torrent and connect to trackerTracker == computer that coordinates file distribution

3. Tracker tells them from which peer to download pieces of the file

Page 17: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Torrent creationSender Receiver

1.

2.

1.

2.

3. compare

data

chksum

SHA1

data

64kB – 4 MB

data

Recompute chksum

New chksum

torrentfile

Page 18: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Torrent creation (2) Treats file as a number of identically sized pieces

Usually between 64kB and 4 MB each

Peer creates checksum for each piece

Using SHA1 hash algorithm

And records it in the torrent file

Completed torrent typically published on web

Pieces with sized greater than 512kB will reduce the size of the torrent file for a very large payload, but is claimed to reduce the efficiency of the protocol.

Page 19: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Torrent architecture Announce section

Specifies URL of the tracker (not if trackerless system)

Info section

Filenames

Their lengths

Piece length used

Checksum for each piece

Page 20: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Trackerless system Uses DHT instead of trackers

Decentralized

Every peer acts as a tracker

BitTorrent, uTorrent, BitComet, Ktorrent and Deluge

Vuze uses another way for trackerless torrents

Page 21: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

BitTorrent vs HTTP GETBitTorrent HTTP GET

Many data requests over different TCP sockets

Rarest-first download (or random)

Ensures high availability -> increases download/upload rates

Single HTTP GET over single TCP socket

Sequential download

Page 22: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

BitTorrent vs HTTP GETBitTorrent HTTP GET

Advantages

Reach very high speeds

Lower cost

Higher redundancy

Greater resistance to abuse

Disadvantages

Full download speed delay

Advantages

Rise to speed quickly

Maintains speed throughout

Can use file at once

Disadvantages

Vulnerable to flash crowds

Page 23: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Performance comparison

dow

nlo

ad s

peed

time

Page 24: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Performance comparison (2)

Users

Speed

Page 25: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Controversy BitTorrent does NOT support streaming-playback due

to the non-contigous way of downloading

BUT, this will most likely be commonplace in the future!

Dependent of resident nodes in the network for the exchange of resources to take place

Page 26: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Some terminology Client

Program that implements bitTorrent protocol

Peer

Any computer running an instance of a client

Seeder

Peer that provide the entire file

Initial seeder

Peer that provide(d) the initial copy

Swarm

Group of peers connected to each other to share a torrent

Page 27: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Downloading1. User

1. Finds torrent on web

2. ...downloads it

3. ...and opens torrent with client

2. Client

1. Connects to specified trackers

2. List of peers received

3. Client connects to peers and starts downloading

Page 28: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Sharing If the swarm contains only the initial seeder, the client

connects directly to it and begins to request pieces.

As peers enter the swarm, they begin to trade pieces with one another, instead of downloading directly from the seeder.

Clients download pieces in random order to optimize download and upload rates

Page 29: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Sharing algorithms Problem: Which peers do I send to?

Tit for tat scheme

Optimistic unchoking

Page 30: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Tit for tat scheme Send data to peers that send data back

Encourages fair trading

Problem

Newly joined peers don’t have any data to send

Page 31: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Optimistic unchoking Reserved bandwidth for random peers

Two main reasons

In hope of finding even better partners

Granting access to new peers

Implemented in official bitTorrent client

Page 32: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Adoption Television companies

First was CBC in 2008

NRK started in march 2008

Open source software

Projects encourage bitTorrent

Film and music

Webradio, free content etc

Game companies

Blizzard, Valve

Page 33: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Network impact 18-35 % of all internet traffic is bitTorrent

BitTorrent contacts 300-500 peers pr. second

Common cause of home router locking up

Page 34: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Indexing No way to index torrent files

Small number of websites (search engines) hosts the large majority of torrents

Mininova, Monova, BTJunkie, Torrentz, isoHunt and PirateBay

Vulnerable for law suits due to copywrighted material

Page 35: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Limitations Lack of anonymity

Your IP address is in the open!

The leech problem

When done downloading, people stop uploading

3rd party upload speed limiters

The leech compensation problem

Withhold final piece (stuck at 99,9%)

The cheater problem

BitThief: Download without uploading

Page 36: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Legal issues Where do we begin?

TorrentSpy, OiNK, Demonoid, Suprnova.org, LokiTorrent, EliteTorrents.org

HBO

Sent out emails to ISP

”Poisoned” the series Rome in 2005

Page 37: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

With other P2P networks

Page 38: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

FastTrack Made by Niklas Zennström, Janus Friis & Jaan Tallinn.

Creators of Skype (P2P-telephony) and Joost

Semi-centralized

Came right after Napster’s fall

Commercial P2P system

Kazaa (Spyware)

Second generation P2P protocol (Uses supernodes)

Download from multiple sources

Page 39: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

FastTrack - Download

Page 40: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Gnutella Created by Frankel & Pepper of Nullsoft in early 2000

Decentralized & Unstructured

All nodes are equal

Free riding

Page 41: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Gnutella - Download

Cons

Accurate search

A node only has to know a small number of nodes

Pros

Inefficient

Flooding-based protocol

Expensive (TCP)

Page 42: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Freenet Designed by Ian Clarke

Decentralized and structured

Encryption

Freedom of speech through anonymity

Friend to friend

Distributed storage (cache)

Page 43: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

Freenet - Download

Page 44: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

eDonkey2000 Semi-centralized

Index-servers, but no single cetralized server

Anyone can set up a server

The beginning of BitTorrent-like download

Closed down!

Page 45: inf5040 - Presentation by group 1 nghial, baardehe ...Torrent creation (2) Treats file as a number of identically sized pieces Usually between 64kB and 4 MB each Peer creates checksum

ComparisonP2P system Strong points Weak points

BitTorrent popularity, download performance,pollution

availability, content lifetime

FastTrack availability, content lifetime, scalability pollution

eDonkey2000 content lifetime, pollution scalability

Freenet anonymity, availability scalability

Gnutella availability, content lifetime, scalability pollution


Recommended