Web and Social Computing
Speakers: Chandan ,Clement Robert and Kalthoom
 Objectives
 Peer to Peer Networks
 PeerSim
 Max and Min function Implementation and Results
 Conclusion
 Question & Answers
1. Describe PeerSim functionality
2. Describe the different modes of PeerSim .
3. Design new methods ( Maximum and Minimum ).
4. Explain the out put results .
 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.
 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.
 There are generally two major
types, Structured and
Unstructured. These two types of
networks also contain even more
specific underlying types of
networks.
 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.
 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.
 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.
 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.
 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.
• 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)
 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.
 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.
 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
 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.
 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' .
 Two different modes:
 Cycle-based :based on a very simple time scheduling algorithm and is very efficient and
scalable.
 Event-based :scheduled through events .
 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
 Every simulation is
configured with the help
of a configuration file :a
simple ASCII file
Simulator
• Main() Method
CDSimulator
nextExperment()
• loadInitializers()
• loadControls()
• execute()
Controls
Eg:
AverageObserver
s
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()
Generated in Eclipse by ObjectAid UML Explorer
 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
 AverageObserver
 IncrementalStats
 Config File  Output: The Min Function Remains Constants and
the Max Values decreases towards the Min
value
 Config File  Results: Max Remains the same and Min increases
towards the Max Value
PeerSim Output
 Data taken in Excel  Graph generated
 Graph Generated Data taken in Excel
 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
Q& A

Final peersimp pt

  • 1.
    Web and SocialComputing Speakers: Chandan ,Clement Robert and Kalthoom
  • 2.
     Objectives  Peerto Peer Networks  PeerSim  Max and Min function Implementation and Results  Conclusion  Question & Answers
  • 3.
    1. Describe PeerSimfunctionality 2. Describe the different modes of PeerSim . 3. Design new methods ( Maximum and Minimum ). 4. Explain the out put results .
  • 4.
     A peer-to-peernetwork, 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.
  • 5.
     A peer-to-peernetwork’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.
  • 6.
     There aregenerally two major types, Structured and Unstructured. These two types of networks also contain even more specific underlying types of networks.
  • 7.
     To beconsidered 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.
  • 8.
     In apure 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.
  • 9.
     Infrastructural nodesare 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.
  • 10.
     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.
  • 11.
     Structured peer-to-peernetworks 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.
  • 12.
    • N nodesin 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)
  • 14.
     Supplier vsConsumer 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.
  • 15.
     One ofthe 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.
  • 16.
     One ofthe 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
  • 17.
     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.
  • 18.
     A Peer-to-Peersimulator  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' .
  • 19.
     Two differentmodes:  Cycle-based :based on a very simple time scheduling algorithm and is very efficient and scalable.  Event-based :scheduled through events .
  • 20.
     protocols: usedto 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
  • 21.
     Every simulationis configured with the help of a configuration file :a simple ASCII file
  • 22.
    Simulator • Main() Method CDSimulator nextExperment() •loadInitializers() • loadControls() • execute() Controls Eg: AverageObserver s 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()
  • 23.
    Generated in Eclipseby ObjectAid UML Explorer
  • 24.
     How muchfree 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
  • 26.
  • 27.
     Config File Output: The Min Function Remains Constants and the Max Values decreases towards the Min value
  • 28.
     Config File Results: Max Remains the same and Min increases towards the Max Value PeerSim Output
  • 29.
     Data takenin Excel  Graph generated
  • 30.
     Graph GeneratedData taken in Excel
  • 31.
     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
  • 32.