52
P2P Networks Advanced Computer Networks: Part 1

P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

Embed Size (px)

Citation preview

Page 1: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

P2P Networks

Advanced Computer Networks: Part 1

Page 2: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

2

Agenda

What are P2P Systems?

File Sharing Techniques

Content Delivery

PageRank

Example of Work

Page 3: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3

What are P2P Systems?

Allow a group of computer users (employing the same networking software) to connect with each other to share resources.

Processing power, disk storage, network bandwidth and files to be directly available to other peers.

They behave in a distributed manner without a central server.

Peers can act as both server and client th

en they are also called servent, which is different from the traditional client-server model.

Page 4: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

4

What are P2P Systems?

First, protocols are constructed at the application layer of the network protocol stack.

Second, in most designs peers have a unique identifier, which is the peer ID or peer address.

Third, many of the message types defined in various P2P protocols are similar.

Finally, the protocol supports some type of message-routing capability. That is, a message intended for one

peer can be transmitted via intermediate peers to reach the destination peer.

Page 5: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

5

What are P2P Systems?

An overlay network design that is consistent with self-organization would not use a star topology or a broadcast topology to operate the peers or form the overlay. Instead the topology is likely to be

decentralized such that the interconnectedness of any peer, referred to as the degree, doesn’t dominate the overlay graph.

Self-organization means that peers cooperate in the formation and maintenance of the overlay, with each peer using local state and partial information about the overlay.

Page 6: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

6

What are P2P Systems?

Each peer determines its capabilities based on its own resources. Each peer also determines when it joins the overlay,

what requests it makes to the overlay, and when it leaves the overlay.

A peer that searches for an object and doesn’t find it might not be able to determine whether the object doesn’t exist in the overlay or the peer storing the object has left the overlay.

Peers may act to limit their resource contribution to the overlay, for example, by disconnecting from the overlay when not using it.

Page 7: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

7

P2P File-Sharing Application

Peer-to-Peer technology is a way to share music, video and documents, play games, and facilitate online telephone conversations.

The technology enables computers using the same or compatible P2P programs to form a network and share digital files directly with other computers on the network.

User have digital media files that they want to share with others.

These files are registered by the user using the local application according to properties such as title, artist, date, and format

Page 8: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

8

P2P File-Sharing Application

File transfer using the FTP is referred as Client-Server file transfer. The file is downloaded from a

single source (the file server) by the destination/PC (a client).

http://propakistani.pk/2010/02/08/what-is-peer-to-peer-p2p-file-sharing-and-how-does-it-work/

How are P2Ps Different From Traditional File Transfer Methods?

Page 9: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

9

P2P File-Sharing Application

Users anywhere on the Internet can search for these files by providing a query in terms of some combination of the same attributes. Query is sent to other online peers in the

network.

Peer that has local media files matching the query will return information on how to retrieve the files. It may also forward the query to other peers.

Users may receive multiple successful responses to their query and can then select the files they want to retrieve. The files are then downloaded from the remote

peer to the local machine.

How to Search for Files?

Page 10: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

10

P2P File-Sharing Application

Challenging Issues A large amount of polluted or corrupted content

has been published in file-sharing systems, and it is difficult for a user to distinguish such content from the original digital content they seek.

A free rider is a peer that uses the file-sharing application to access content from others but does not contribute content to the same degree to the community of peers.

Page 11: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

11

P2P File-Sharing Application

Proxy Connection If the user hasn’t initiated any file searches or

selected local files for sharing, the P2P application is most likely using the computer and its network connection for other peers. It may be responding to search requests from other peers

or acting as a bootstrap peer for newly joining peers. It may be caching popular files on its disk drive to save

search time for other peers.

It could be proxying connections on behalf of peers that are behind firewalls.

Page 12: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

12

P2P File-Sharing Application

Peer is connected to the overlay, it can exchange messages with other peers in its neighbor list. Over time it can add and remove peers from its neighbor list. To refresh and update its neighbor list, it can send requests to

current neighbors asking for their neighbors.

Page 13: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

13

P2P File-Sharing Application

Random graphs and scale-free or power-law random graphs are relevant to most unstructured topologies.

Page 14: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

14

File Sharing Techniques (Gnutella) Gnutella was the first full P2P file-sharing system

and has remained one of the more popular systems to date.

The earliest versions of the Gnutella protocol, through version 0.4, used an unstructured overlay with flooding for query routing.

After scalability became an apparent performance issue, the most recent version of the Gnutella protocol (version 0.6) adopted a superpeer architecture in which the high-capacity peers are superpeers and all queries are routed, using a flooding mechanism, between superpeers.

Gnutella network has a power-law distribution and what the peer lifetime distribution is.

Page 15: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

15

File Sharing Techniques (Napster) Napster is a file-sharing system that used

a central server for storing and searching the directory of files, but performed the file transfer in a direct P2P fashion.

The majority of these designs used an unstructured overlay mechanism.

Napster is not a full P2P system, it popularized the P2P concept in the mass media and influenced subsequent file-sharing systems.

Page 16: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

16

File Sharing Techniques (Freenet)

Peer identifiers are called routing keys.

Each peer has a fixed-size routing table that stores links to other peers.

Each entry contains the routing key of the peer.

Freenet uses key-based routing for inserting and retrieving objects in the mesh.

Requests are forwarded to peers with the closest matching routing key.

If a request along one hop fails, the peer will try the next closest routing key in its routing table.

Page 17: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

17

File Sharing Techniques

Most existing P2P indexing schemes can be categorized into local, centralized, distributed, or hybrid indexing types.

Page 18: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

18

File Sharing Techniques (Centralized Indexing)

The index is kept on a centralized server. Object lookup is done by searching over the index on the central server to

obtain the location of the target object.

Napster,190 the father of today’s P2P content distribution system, is a classical example of centralized indexing.

Napster, peers share MP3 files stored locally on their hard drives.

Text-based content description, such as the title of a song, is then generated, indexed, and stored by the Napster server.

Each peer in the Napster network uses the Napster client software to connect to the centralized Napster server.

Peers connected to the Napster server can submit keyword-based queries for a particular audio file.

Page 19: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

19

File Sharing Techniques (Centralized Indexing) A list of matching files along with the description and

location of the file is sent to the peer from the server.

The peer then tries to connect to the peer with the desired audio file and transfers the target content in a P2P fashion.

The most noticeable drawbacks of a fully centralized indexing system include vulnerability to attacks on the server and the possibility of a bottleneck at the server.

Page 20: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

20

File Sharing Techniques (Localized Index) Each peer keeps the directory of its own data objects locally.

The early Gnutella design is a typical example of local index-based P2P system.

Local object indexing can be used to support complex query search. When a peer generates a query, it conveys the query to peers in the network to locate the desired

object, most often through flooding or random walk. Forwarding of query messages is stopped when the desired object is found or when the Time-to-Live

(TTL) value expires.

Compared to centralized indexing schemes, localized indexing can create more network load since queries potentially have to be sent to many peers in the overlay. But since query processing is distributed across many peers in parallel, there is inherent scalability. If any peer node is faulty, it affects the objects stored locally but not the overall search mechanism of

the network.

Localized indexing offers advantages over centralized schemes in terms of system scalability and reliability. It has led to the development of many Gnutella-based systems

Page 21: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

21

File Sharing Techniques (Distributed Index) Distributes the index over all peers.

Pointers to a single object may reside in multiple indices located in different peer nodes, most often in neighborhood peer nodes.

Freenet is one of the earliest P2P systems in this category.

It uses content hash keys to identify files.

Queries are forwarded to neighborhood peers based on a peer routing table until the target object is found or the TTL threshold is reached.

One disadvantage posed by Freenet is its long startup time at peer joining.

Page 22: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

22

File Sharing Techniques (Hybrid Index) Hybrid indexing intends to take advantage of the

query efficiency of centralized indexing and the scalability of localized and distributed indexing.

Superpeers (supernodes) maintain the indices in a distributed manner.

A query from an ordinary peer is sent to its superpeer to retrieve the location of the desired object.

The superpeer forwards the query to other superpeers if it does not find the desired object in its own index.

Information about the desired object is sent back to the ordinary peer via its superpeer.

Thereafter, the query issuer may directly contact the peer with the desired object.

Page 23: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

23

Content Delivery

The large and growing number of audiences and traffic levels, content providers have tried to deploy networks and systems that can provide increased scalability, reliability, and quality of services.

A content delivery network or content distribution network (CDN) is a system of computers containing copies of data placed at various nodes of a network.

When properly designed and implemented, a CDN can improve access to the data it caches by

increasing access bandwidth and redundancy and reducing access delay.

CDN is an overlay network that employs technologies, such as caching, load balancing, scheduling, and request routing, to push replicated content close to the network

To reduce the cost of content delivery, today many companies are seeking or are offering peer-to-peer-based solutions in both personal and enterprise applications

Page 24: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

24

Content Delivery (P2P Caching) Caching is a well-known

strategy in many networked applications.

The capability to: Reduce origin server load and

bandwidth requirement Reduce network bandwidth usage Reduce client-side latency leads to

improved scalability and performance with lower cost.

Page 25: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

25

Content Delivery (P2P Caching)

Page 26: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

2626

PageRank

Page 27: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

2727

RFID Datenvolumen Major Issues of Existing PageRank

Only Structure Consideration

Knowledge of Global Network Structure

Broken Link Problems

Page 28: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

2828

Example of Work: Extended Pagerank

Calculation

Page 29: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

2929

Ideas: Structure and Network Parameters Combination

Pagerank can be calculated by random walkers (visiting probability)

Apply a population of random walkers to handle the large network size

Apply network parameters to modify the transistion probability of random walks

Page 30: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3030

Proposed Pagerank Calculation Transition probability of walkers

Equal probability (without BW consideration)

Non-equal probability (with BW consideration)

Ranking calculation

Page 31: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3131

Simulation Results (1)

PageRank Proposed Work (without BW consideration)

Page 32: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3232

Simulation Results (2)-without BW Consideration

One-Walker Convergence Time Comparison in Different Size of

Network

Convergence Time Comparison in Different Number

of Walkers

Where,

Page 33: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3333

Simulation Results (3)-with BW Consideration

Page 34: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3434

Heaps of Documents on Super Peers

Page 35: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3535

Heaps of Documents

Ant colony optimization: Dead ant collection

Dropping probability

Picking up probability

Document clustering:

Heaps of the same kind of documents

Page 36: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

36

Heaps of Documents

36

t=1 t=10,000 t=100,000

t=811,042t=500,000

Page 37: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3737

Heaps of Documents Combine together between

05

1015

20

0

5

10

15

200

0.002

0.004

0.006

0.008

0.01

To be robust search and file sharing system

Page 38: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3838

Simulation Result

t=1

BW Structure

Page 39: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

3939

Simulation Result

t=10,0000

Page 40: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

4040

Simulation Result

t=100,0000

Page 41: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

4141

Simulation Result

t=500,0000

Page 42: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

4242

Simulation Result

t=503,663

Page 43: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

43

Other Applications

VoIP (voice over IP) lack of voice quality and limited availability of broadband access in the consumer market.

Skype is a VoP2P client

Skype offers both free desktop-to-desktop calls and low-cost desktop-to-public switched telephone network (PSTN) calls, including international calls.

Page 44: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

44

Other Applications

P2PTV delivery often follows a channel organization in which content is organized and accessed according to a directory of programs and movies. Unlike file-sharing systems in which a media file is first

downloaded to the user’s computer and then played locally, video-streaming applications must provide a real-time stream transfer rate to each peer that equals the video playback rate.

If a media stream is encoded at 1.5 Mbps and there is a single peer acting as the source for the stream, the path from the source peer to the playback peer must provide a data transfer rate of 1.5 Mbps on average. Some variation in the playback rate along the path can be

accommodated by pre-buffering a sufficient number of video frames. Then if the transfer rate temporarily drops, the extra content in the buffer is used to prevent dropouts at the rendering side.

Page 45: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

45

Joost

Zattoo

Page 46: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

46

Other Applications

Video-on-demand type applications, peers start viewing a stream at arbitrary times, and those peers that start viewing a stream concurrently may soon diverge in stream position due to user actions such as pause or rewind.

To avoid transferring complete copies of video files to peers at playback, a method is needed for a peer to locate the next chunk of video in its playback schedule from some other peers in the P2P system.

Page 47: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

Basic Security in P2P Networks

Advanced Computer Networks: Part 1

Page 48: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

P2P Network

Network classification based on network connectivity Exponential Networks:

Homogenous network, [average] node connectivity is equally distributed

Scale-free networks:Follows power-law for connectivity, that is there are some highly connected nodes and many not to highly connected nodes

Current P2P systems are scale-free networks

Page 49: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

Failure and Attack

Failure: Random failure of nodes and/or infrastructure elements

Attack: Systematic failure of nodes and/or infrastructure elements

Scale-free networks are failure-tolerance Exponential networks are attack-tolerance

Why? Most P2P systems give priority for failure-tolerance

over attack-tolerance

Page 50: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

Attack Classification

Infrastructure Attacks: Attacks aimed at disabling p2p system

e.g: eliminating nodes, attacks on routing protocols

Semantic Attacks: Attacks aimed at p2p system but not to disable

the system but to make users abandon the systeme.g: bad content, asymmetric consumption

Both attacks are equally effective because p2p is a “peoples’ system”

Page 51: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

Attacks & Defenses

Attack detection & recovery involves… Identifying Invariants in the System Monitoring the Invariants Detecting/Ascertain Attacks Triggering Recovery Procedure

Infrastructure Attacks Attacks on nodes Attacks on routing mechanism

Semantic Attacks Storage & Retrieval Attacks Flooding Face/Off

Page 52: P2P Networks Advanced Computer Networks: Part 1. 2 Agenda What are P2P Systems? File Sharing Techniques Content Delivery PageRank Example of Work

52

References

John Buford, Heather Yu, Eng Keong Lua , P2P Networking and Applications, Morgan Kaufmann Series in Networking, December 26, 2008.

Kulesh Shanmugasundaram, Peer-to-Peer Systems:Security Issues, presentation (ppt).