introduction to peer to peer networks z.m. joseph cse 6392 – db exploration spring 2006 cse, ut...

19
INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Upload: amy-greer

Post on 25-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

INTRODUCTION TO PEER TO PEER NETWORKS

Z.M. JosephCSE 6392 – DB Exploration

Spring 2006CSE, UT Arlington

Page 2: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

WHAT DOES KONICHIWA MEAN?

Page 3: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Peer to Peer Networks

• Decentralized and distributed system• Nodes are equivalent (Peers)• Data could be at ANY node on the network• Nodes leave and join the network• Network is resilient

• Avoid dependence on central resources

Node

Node

Node

Internet

Node

Node

Page 4: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Centralized Network

• Napster model• Nodes register their

contents with server

• Centralized server for searches

• File access done on a peer to peer basis

– Poor scalability

– Single point of failure

Client

Server

Client

Query

Reply

File Transfer

Page 5: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Unstructured Blind - Gnutella

= forward query

= processed query

= source

= found result

= forward response

Breadth-First Search (BFS)

Page 6: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Unstructured Blind - Gnutella

• A node/peer connects to a set of Gnutella neighbors

• Forward queries to neighbors

• Client which has the Information responds.

• Flood network with TTL for termination

+ Results are complete

– Bandwidth wastage

Page 7: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Random Walkers

• Improved Unstructured Blind•Similar structure to Gnutella•Forward the query (called walker) to random subset of it neighbors+ Reduced bandwidth requirements– Incomplete results

Peer nodes

Page 8: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Unstructured Informed Networks

• Zero in on target based on information about the query and the neighbors.

• Intelligent routing

+ Reduces number of messages

+ Not complete, but more accurate

– COST: Must thus flood in order to get initial information

Page 9: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Informed Searches: Local Indices

• Node keeps track of information available within a radius of r hops around it.

• Queries are made to neighbors just beyond the r radius.

+ Flooding limited to bounded part of network

Page 10: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Routing Indices

• For each query, calculate goodness of each neighbor.

• Calculating goodness:– Categorize or separate query into themes– Rank best neighbors for a given theme based on

number of matching documents

• Follows chain of neighbors that are expected to yield the best results

• Backtracking possible

Page 11: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Bloom Filters

• Bloom filter is a bit pattern (Hash, etc)

• Contains the likelihood of a match

• Can determine the degree of similarity

• Also known as Lossy Distributed Index

• Attenuated Bloom Filters– Maintain downstream bloom filters for each neighbor– Reduce weight of distant nodes when choosing neighbors

Page 12: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Bloom Filters CONTD.

0

0

1

0

0

1

0

0

0

1

0

0

0

1

0

0

0

0

1

0

0

0

0

1

1

0

0

0

0

1

0

0

0

0

0

1

0

0

1

0

N neighbors

Hash value

Requesting

Node

Page 13: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Structured P2P Networks

• Self-organizing

• Load balanced and Resilient

• Fault-tolerant

• Guarantees on numbers of hops to answer a query

• Based on a Distributed Hash Table (DHT)

Page 14: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Properties of DHT

• Keys mapped evenly to all nodes in the network

• Each node maintains information about only a few other nodes

• Efficient routing of messages to nodes

• Node insertion/deletion only affects a few nodes

Page 15: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Chord

• Chord provides operations:– P2P hash lookup must give:

• Lookup(key) IP address– Uses Hash function:

• Key identifier = SHA-1 (key)• Node identifier = SHA-1 (IP add)

– Both are uniformly distributed– Both exist in the same ID space

• How to map key IDs to node IDs?– A key is stored at its successor: node with next higher

ID (modulo N)

N10N1

K0

K7

K4

Circular

ID space

K11

Page 16: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Chord continued…..

start Interval Succ

100 [100,101) 110

101 [101,103) 5

103 [103,107) 5

107 [107,115) 5

115 [115,3) 5

3 [3,35) 5

35 [35,100) 60

N32

N10

N5

N20

N110

N99

N80

N60

K19

… … …

9 [9,13) 10

13 [13,21) 20

Lookup(K19)

Page 17: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Analysis of Chord

In a system with N nodes and K keys:

Each node manages at most K/N keys

Bound information stored in every node

Lookups resolved with O(logN) hops

Page 18: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

Benefits of P2P Networks

• Ideally:

– Allows peers anywhere to share information and/or resources dynamically

– Decentralized

– Resilient to failures and network changes

– Utilizes resources located closer to requesting nodes

Page 19: INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington

References

• www.ececs.uc.edu/~annexste/Papers/OLN.ppt

• www.dcs.bbk.ac.uk/selene/reports/SeLeNeP2P.ppt

• www.eecg.utoronto.ca/~vinod/mie456/p2pintro.ppt

• L. Singh, Z. Joseph: Search Algorithms in Peer to Peer Networks (CSE5311 Fall ‘05)