final peersimp pt

32
Web and Social Computing P2P SIMULATION WITH PEERSIM Speakers: Chandan ,Clement Robert and Kalthoom

Upload: clement-robert-habimana

Post on 07-Jan-2017

126 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Final peersimp pt

Web and Social Computing

P2P SIMULATION WITH PEERSIM

Speakers: Chandan ,Clement Robert and Kalthoom

Page 2: Final peersimp pt

OUTLINES Objectives Peer to Peer Networks PeerSim Max and Min function Implementation and Results Conclusion Question & Answers

Page 3: Final peersimp pt

OBJECTIVES1. Describe PeerSim functionality 2. Describe the different modes of PeerSim .3. Design new methods ( Maximum and Minimum ).4. Explain the out put results .

Page 4: Final peersimp pt

WHAT IS P2P? A peer-to-peer network, P2P, is considered to

be a type of network architecture composed of contributors that make their resources available to other contributors on the same network without the need for a server to oversee the transfer of information.

Page 5: Final peersimp pt

PEER-TO-PEER NETWORKING - ARCHITECTURE A peer-to-peer network’s architecture is generally formed dynamically by

an ad-hoc type of addition of nodes, meaning the loss of a certain node does not have a significant impact on the rest of the network.

This aspect of peer-to-peer networks gives the system the ability to easily scale to any size that may be needed for a certain application.

Page 6: Final peersimp pt

TYPES OF P2P There are generally two major

types, Structured and Unstructured. These two types of networks also contain even more specific underlying types of networks.

Page 7: Final peersimp pt

UNSTRUCTURED P2P To be considered an

unstructured peer-to-peer network, the network must not use any algorithm for organization or optimization of the network.

For unstructured peer-to-peer networks there are three different models which include Pure peer-to-peer networks, Hybrid peer-to-peer networks, and Centralized peer-to-peer networks.

Page 8: Final peersimp pt

PURE PEER-TO-PEER NETWORK In a pure peer-to-peer network, or sometimes called a purely decentralized

network, all nodes are of equal ability meaning that there are no nodes that have any special infrastructure function that could affect the network.

A great example of a popular purely decentralized peer-to-peer network is the Gnutella network. The main purpose of the Gnutella network is for that of a file sharing system.

Page 9: Final peersimp pt

CENTRALIZED PEER-TO-PEER NETWORK.

Infrastructural nodes are allowed to exist and are often a type of central directory server.

All clients connected to the network must connect to one of these servers.

Users connection information and List of files are saved in the central server.

Page 10: Final peersimp pt

HYBRID PEER-TO-PEER NETWORK

Added Supernodes. These Supernodes are nodes

that are dynamically assigned the task of servicing a small subpart of the peer network by indexing and caching files contained therein.

A popular example of this centralized peer-to-peer network is the file sharing network Kazaa.

Page 11: Final peersimp pt

STRUCTURED ARCHITECTURE Structured peer-to-peer networks generally hold the traits of using some

type of algorithm for organization or optimization of the network. Structured peer-to-peer networks use some type of global protocol to

ensure that any node in the network can proficiently route a search to some peer that has a desired file.

By far the most popular type of structured peer-to-peer network is the distributed hash table or DHT.

Page 12: Final peersimp pt

CHORD: DHT ALGORITHM• N nodes in the network• Consistent hashing is used to assign keys

and values to nodes and resources - SHA-1 hash of node’s IP address produces 160-bit ID - SHA-1 hash of file produces 160-bit key, k • Resource with key K is stored at node with

ID=k - If node with ID=k doesn’t exist then resource is stored in the node with next highest available ID• If node n joins the network

- Reassign keys from successor(n)• If node n leaves the network

- Reassign keys to successor(n)

Page 13: Final peersimp pt
Page 14: Final peersimp pt

P2P VS CLIENT/SERVER MODEL

Supplier vs Consumer Concept. Unlike Client/Server networks peers in P2P don’t rely one single source for

acquiring their necessities. Multiple Participants are involved. P2P is relatively cheaper to setup and simpler than client server networks. P2P can operate on a basic PC operating system whereas Client/ Server

networks require special OS.

Page 15: Final peersimp pt

ADVANTAGES IN COMPARISON WITH

CLIENT/SERVER One of the major advantages to a peer-to-peer network is that each time a new node is connected to the network the total capacity of the system increases.

This point differs from the client-server model standpoint since the addition of new nodes to a network that connects to a set of number of servers could possibly slow data transfers for all of the connected users.

Another advantage in regards to a pure peer-to-peer network is that there is no single point of failure in the network.

When compared to the client-server model on this point if the server fails the network is brought down since the server is unable to relay information to the connected nodes.

Page 16: Final peersimp pt

LIMITATIONS One of the weaknesses of peer-to-peer networks is that of security.

Generally speaking peer-to-peer networks are more susceptible to security problems. 

Another disadvantage of peer-to-peer networks is the high bandwidth usage required. This high bandwidth usage has lead to Internet Service Providers starting to throttle, or limit, peer-to-peer traffic

Page 17: Final peersimp pt

PEER-TO-PEER SIMULATION Simulating Peer-to-Peer (P2P) overlay networks is a common problem for

researchers and developers:

need to be scalable . are highly dynamic .

PeerSim :is one of the most known among researchers.

Page 18: Final peersimp pt

PEERSIM A Peer-to-Peer simulator Is to use a modular approach, as the preferred way of coding with it is to re-

use existing modules: construct and initialize the underlying network modules. handle the different protocols modules. control and modify the network modules.

The engines consist of components which may be 'plugged in' .

Page 19: Final peersimp pt

PEERSIM Two different modes: Cycle-based :based on a very simple time scheduling algorithm and is very efficient and

scalable.

Event-based :scheduled through events .

Page 20: Final peersimp pt

GENERAL FUNCTIONING

protocols: used to define the behavior of the different peers. nodes: represent the peer themselves in the P2P network.

controls: control the simulation by perform the global initialization and analysis: Initializer Dynamic Observers

Linkable :interface used to access and manage node’s properties Add neighbor Get neighbor Node’s degree

Page 21: Final peersimp pt

THE CONFIGURATION FILE Every simulation is

configured with the help of a configuration file :a simple ASCII file

Page 22: Final peersimp pt

PRACTICAL PEERSIM EXPLAINED

Simulator• Main() Method

CDSimulatornextExperment()

• loadInitializers()• loadControls()• execute()

ControlsEg:

AverageObservers

Protocol n

IncrementalStats

Max, Min, Nmax, Nmin, AVG etc

Protocol1 Protocol 2

Config File• Set of Protocols and

ordering• Set of Controls and

Ordering• Set of Initializers +

ordering

AverageFunction• nextCycle()

Page 23: Final peersimp pt

CLASS DIAGRAM (SAMPLE)

Generated in Eclipse by ObjectAid UML Explorer

Page 24: Final peersimp pt

STATISTICS WE MAY WANT TO KNOW IN A P2P NETWORK

How much free space does the network have to offer? What is the average lifetime of a node in the network? How many documents do nodes share on the average? Which node(s) performed the most searches? What is the maximum number of downloads that some node supported

during a session Etc

MAYANK BAWA, HECTOR GARCIA-MOLINA, ARISTIDES GIONIS, RAJEEV MOTWANI“Estimating Aggregates on a Peer-to-Peer Network”

Stanford University, CA 94305 USA

Page 25: Final peersimp pt

MAX AND MIN FUNCTION IN PEER SIM

Page 26: Final peersimp pt

CONTROL (S) AverageObserver

IncrementalStats

Page 27: Final peersimp pt

RESULTS (MIN FUNCTION) Config File Output: The Min Function Remains Constants and

the Max Values decreases towards the Min value

Page 28: Final peersimp pt

RESULTS (MAXFUNCTION) Config File Results: Max Remains the same and Min

increases towards the Max Value

PeerSim Output

Page 29: Final peersimp pt

MIN FUNCTION RESULTS VISUALIZATION

Data taken in Excel Graph generated

Page 30: Final peersimp pt

MAX FUNCTION RESULTS VISUALIZATION

Graph Generated Data taken in Excel

Page 31: Final peersimp pt

CONCLUSION Lessons Learnt (slide)

Clear understanding of how Peer to Peer Networks work PeerSim provides an easy way to simulate P2P Protocols without wasting

resources Java Programming Revised.

Limitations The PeerSim Source codes are somehow complex to understand Some Protocols implemented in PeerSim need some time to understand

Page 32: Final peersimp pt

Q& A