Survey of Peer to Peer Technologies Authors: Bratislav Milić, [email protected] Jelena Krunić,...

35
Survey of Peer to Peer Technologies Authors: Bratislav Milić, [email protected] Jelena Krunić, [email protected] Veljko

Transcript of Survey of Peer to Peer Technologies Authors: Bratislav Milić, [email protected] Jelena Krunić,...

Page 1: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

Survey of Peer to Peer Technologies

Authors: Bratislav Milić, [email protected] Krunić, [email protected] Veljko Milutinović, [email protected]

Page 2: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

2/35

Introduction

What is P2P? When was it created?

(Bell vs. Fanning)

Page 3: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

3/35

What Is It Used for?

Sharing of computer resources and services between systems

Exchanging information, processing cycles, cache storage, and disk storage for files

Page 4: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

4/35

P2P Features

All peers in a P2P network are the same Data and computation are decentralized Search for data in real time Peers and their connections are volatile

Page 5: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

5/35

P2P Applications

File sharing applications Process sharing applications Collaborative applications

Page 6: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

6/35

File Sharing Applications

Napster It is not P2P in the strictest sense Created for sharing MP3 files Centralized server holds file indexes

and other metadata Peers query the central server Sued by recording companies

Page 7: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

7/35

File Sharing Applications

Gnutella Similar purpose as Napster Decentralized Flooding (peer sends PING to all its neighbors,

each of these will PING all its neighbors, and so on; radius of the flood is 5-7)

A Gnutella node needs a server (or a set of servers) to “start-up”

Gnutellahosts.Com

Page 8: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

8/35

File Sharing Applications

Free-rider problem Peers that do not share files Majority of participants act

as free riders P2P system devolves into

a client/server system Sharers of desirable content

are overloaded

Page 9: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

9/35

Process Sharing Applications

SETI@home Search for extraterrestrial intelligence (SETI) Scientific experiment that started in year 2000 Downloads and analyzes radio telescope data http://setiathome.ssl.berkeley.edu/

Page 10: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

10/35

Process Sharing Applications

How does SETI@home work? A special kind of screensaver Large calculations are easily divided

into completely independent parts (about 340kbytes per work-unit)

Connects only when transferring data 4 million users Average CPU time per work-unit 11h

Page 11: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

11/35

Process Sharing Applications

FightAIDS@home Free software that runs “in the background”

on your computer Processes information for drug discovery Uses idle processor cycles

www.fightaidsathome.org

Page 12: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

12/35

Process Sharing Applications

Folding@home Examining the folding of proteins Simulation of protein folding for the first time Simulate timescales thousands to millions

of times longer than previously achieved Over 100 000 users http://folding.stanford.edu/

Page 13: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

13/35

Communication Applications

ICQ I seek you (ICQ) Free download You can see when your friends

are also online, in real time Instant messaging, virtual meetings,

shared whiteboards, teleconferencing www.icq.com

Page 14: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

Freenet project

www.freenetproject.org

Page 15: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

15/35

Freenet Project - Introduction

Based on paper written by Ian Clarke“A Distributed Decentralized Information Storage and Retrieval System”

Open standard Development under GPL (GNU Public

Licence)

Page 16: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

16/35

Freenet Project – Basic Ideas

Lack of privacy on the Internet – Lots of information can be collected about people who are using Internet (WWW, mail, FTP, etc.)

Lack of anonymity on Internet Censorship Copyright problems

Page 17: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

17/35

Freenet Project - Features

All nodes are basically the same No central control or administration Anonymity for users Dynamic duplication of data Transfer of data Encrypted data –

no one can be held responsible for the data on it’s node

Page 18: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

18/35

Freenet Project – Routing

Each node holds data and information about nodes

Node communicates with near nodes. Search in the Freenet network

is based on passing the message to the node that mostly likely has the searched information.

Ad-hoc networks as an ETF tutorial

Page 19: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

19/35

Freenet Project – Routing

Page 20: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

20/35

Freenet Project – Information Removal

Data duplication and data transfer create multiple copies of same data

Storage space is limited Some data must be deleted LRU algorithm Caching effect but not a cache Inserting of “junk” data cannot destroy

data in the Freenet

Page 21: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

21/35

Freenet Project – Message Types

Like it has been mentioned, nodes can behave differently, but they must use the same communication protocol.

Four message types for communication: Data request Data reply Request failed Data insert

Each message has TTL (Time to Live) and pseudo unique ID

Page 22: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

22/35

Freenet Project – Message Types

It is sent in order to search for some data TTL indicates how many hops

it should have before it fails Each node stores message ID

that passes through it In the case of Data request

with ID that has been seen, sender must be notified (to avoid loops)

Data request

Page 23: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

23/35

Freenet Project – Message Types

It should be sent to the node that sent Data request

Node should keep the data in order to speed up future queries

Data reply

Page 24: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

24/35

Freenet Project – Message Types

Data insert Node sends Data insert to nodes

that contain similar data TTL for Data insert Messages should be low If it isn’t, node that receives Data insert message

can reduce TTL to lower level In the case of loop, receiver sends

non-backtracking Request Failed When TTL reaches zero,

Request Failed is sent to notify the sender that operation is complete

Page 25: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

25/35

Freenet Project – Message Types

Node sends Data insert message to itself If the key is occupied,

user receives notification TTL typically low.

If it is high, the node can reduce it. Data is inserted on

nodes that are “close” to the data key.

Page 26: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

26/35

Freenet Project – Message Types

Data request and replies – example

*Adapted from Ian Clarke’s paper

A B

E

F

C

D

Data requests

Request Failed

Data reply

D

Page 27: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

27/35

Freenet Project – Search Keys

Users search files under their names/descriptions

Each file has its key To create key

160bit SHA-1 hash function is used Keys used in Freenet:

Keyword Signed Key (KSK) Signed Subspace Key (SSK) Content Hash Key (CHK)

Page 28: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

28/35

Freenet Project – Search Keys

Author defines short description of the data Deterministic generation of public/private key

pair from the description Public part is hashed to create key Private is used to sign the file Problems:

Flat namespace (duplicates problem) Dictionary attack

Keyword Signed Key

Page 29: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

29/35

Freenet Project – Search Keys

Each user generates random key pair to identify their namespace

Private part of random keyis used to sign the data

User places both public key and description

Signed Subspace Key

Public keyDescription

XOR

SHA-1 SHA-1

SHA-1

Page 30: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

30/35

Freenet Project – Search Keys

Content Hashed Keys are useful for splitting and updating data, but will not be described here

Remains problem of finding the key Web crawlers Individual compilations of favorite keys

Page 31: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

31/35

Freenet Project – Adding A New Node

New node joins network by discovering address of an already existing node (not through Freenet)

Requests allow that new node learns about network

Network cannot learn of new nodes through requests

Announcement message

Page 32: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

32/35

Freenet Project - Conclusion

Completely decentralized Anonymity for both writers and readers No censorship High fault tolerance Adaptive routing saves bandwidth

(in contrast to broadcast requests) No guaranties for QoS

Page 33: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

33/35

Future

JXTA Sun Microsystem's peer-to-peer initiative Juxtapose (JXTA) –

to put things next to each other Open, generalized peer-to-peer protocols

that allow any connected device (cell phone to PDA, PC to server) on the network to collaborate

Page 34: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

34/35

Conclusion

Problem: individual users Problem: QoS Benefit: flexibility Benefit: scalability Benefit: fault resistance Final conclusion:

useful technology that has to be improved in order to show all its good sides

Page 35: Survey of Peer to Peer Technologies Authors: Bratislav Milić, zverko@eunet.yu Jelena Krunić, jelak@beotel.yu Veljko Milutinović, vm@etf.bg.ac.yu.

Survey of Peer to Peer Technologies

Bratislav Milić, [email protected] Krunić, [email protected] Veljko Milutinović, [email protected]

http://galeb.etf.bg.ac.yu/~vm/tutorial/p2p.ppt