SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
PeerSim (P2P Network)
Sijo Emmanuel & Hein Min Htike
What is PeerSim?
● Peer Simulator (PeerSim) is a simulation engine
○ Used to write network protocols for P2P (Peer-to-Peer) networks
○ Scalable (up to 1 million nodes), portable and highly configurable
○ Open source Peer-to-Peer (P2P) system developed using Java
○ Developed at the department of Computer Science in University of Bologna
What is a simulation engine?
● An application on top of which we can write simulations, collect results and
analyze them.
● The engine takes care of the temporal structure of the experiment
● The programmer takes care of the logic of the interactions among the
elements of the scenario.
● There are two modes of simulation engines:
● More on next slide!!
PeerSim Simulation Engines
● PeerSim has two simulation modes:
● Event-driven: a set of events (messages) are scheduled at different simulation
time and the node protocols are run accordingly to messages’ delivery times.
● Cycle-driven: sequential simulation, in each cycle each protocol’s actions are
executed by every node (we will be focusing on this)
Aim
● To create new protocol
○ protocols to find Min & Max in the network
● To explore PeerSim package
Objectives
● To create new protocols to generate networks with the maximum and
minimum value.
○ create package for new codes
○ create two classes for Min and Max protocols
○ create observer classes
○ create Max and Min configuration files
○ visualise the topology of the network
Key themes/Ideas
● Key theme and idea was to calculate Max and Min values that exists within
the network
● Source of idea - Average function ??
● More on next slides!!!
Average Function
● Calculates average between two interacting nodes, and assign that value to
them.
● Perform that computation at every node in each cycle.
● After certain amount of time, all the average values in the network converge.
Min/Max Function
● Finds min/max value between two interacting nodes, and assign that value to
them.
● Perform that computation at every node in each cycle.
● After certain amount of time, all the values in the network become (the same)
min/max.
Design & Implementation
MaxFunction and MinFunction
● Took AverageFunction class as example to create MaxFunction and
MinFunction
Observer classes
● Based on AverageObserver, we created two different observer classes
a. node values in the network (NodeValuesObserver)
b. similar to average observer (MaxMinObserver)
NodeValuesObserver
● observes the values at each node in all the cycles.
○ to see how the values of the nodes change over time
NodeValuesObserver
● same as AverageObserver,
except execute() method,
● use MedianStats Object
○ to print out all the values in
node
○ more about MedianStats in
next slide
● line 111
○ protocol name
○ cycle
● line 112 - 114: print node
values
● line 115: number of nodes
MedianStats and IncrementalStats
● included in peersim.util package
● IncrementalStats - keep track of statistics about the network
○ average, min, max, etc.
● MedianStats - extends IncrementalStats
○ can retrieve median element
○ STORE all the elements (ArrayList)
○ we added a getter method to retrieve all the elements
MaxMinObserver
● Observe the statistics about the nodes at each cycle
● Same as AverageObserver, except changes to what we want to see in output
MaxMinObserver
● same as AverageObserver, except execute() method
● MedianStats is used
● line 112 - prints out only Minimum and Maximum values of the network and no. of nodes
Configuration File
● We wrote several configuration files with different components to learn more
about PeerSim.
● Different components we tried will be preseneted in coming slides.
Configuration File
● Created configuration files based on Average configuration file for Max and
Min
● simulation.cycles value are
the number of cycles in the
network
● network.size is the size of
the network
Configuration File: Protocols
● Created new protocols to run Max and Min functions
● IdleProtocol is the topology of the network which
determines the nodes and degree of network
● aMaxMin.MaxFuntion reads in the Max function and
uses it to find the maximum value in the network
● IdleProtocol serve as a source of neighbourhood
information for other protocols
● It stores links: useful to model a static link-structure
Configuration: Linking Nodes
● link nodes to form network
● takes “linkable” protocol, add edges to define topology
● WireKOut: adds random connection
○ Parameter: k - number of edges coming out of each node
Configuration: Assigning Values to Nodes
● assign values to the node during initilisation
● ways to distribute values
○ provided in peersim.vector package
○ PeakDistribution
■ parameter: peak - peak value
■ assign peak nodes the peak value, the rest 0
○ LinearDistribution
■ parameter: min and max
■ assign values in the range (min & max) in linearly increasing manner from min to max
○ UniformDistribution
■ parameter: min and max
■ assign values in random from the range (min & max)
Configuration: Distribution Examples
Uniform Distribution
Linear Distribution
Peak Distribution
Configuration File: Visualisation
● used built-in GraphPrinter control
○ provided in peersim.report package
○ print the whole graph in given format
● two parameters
○ outf - prefix of filename
■ extension - .graph
■ prefix0000001.graph
○ format - format of output graph
■ neighborlist: neighborlist
■ edgelist: one node pair at each line for each edge
■ gml: generic format for many graph tools
● We used Gephi to visualise the graph
○ change file name from .graph extension to .gml
Configuration File: Visualisation Example
Example .gml file
Graph visualised in Gephi
Nodes = 1000, k = 10
Edges = 10000
Configuration File: Statistics
● Used built-in DegreeStats control
○ provided in peersim.report package
○ statistics about the node degree in graph
● four parameters
○ n: numbers of nodes for sampling degree
○ method: method to print results
■ stats: statistics about degrees of graph (min degree, max degree, average degree, etc.)
■ freq: frequency of degrees of graph
■ list: lists degree of sampled nodes
○ linktype: type of links to print information about (live (default), dead, all)
○ trace: trace the given number of nodes
Configuration File: Statistics Example
Example print out to console using stats
Example print out to console using lists & n = 10
Example: freq & n = 25
Configuration File: Dynamic Network
● dynamically change the size of network
○ add or remove nodes from the network
● line 31: adds DynamicNetwork control to configuration file.
○ provided in peersim.dynamics package
● line 32: take out 500 nodes from network
● line 33 & 34: when to add/remove nodes from network
Results - I
Network size: 10,000
Protocol: MaxFunction
Connection: WireKOut (k=30)
Observer: MaxMinObserver
Dynamic Network: remove 500
from cycle 1 till 5
Results - II
Network size: 10,000
Protocol: MinFunction
Connection: WireKOut (k=30)
Observer: MaxMinObserver
Dynamic Network: remove 500
from cycle 1 till 5
What have been achieved?
● Created Max/Min functions
● Created two observer classes
● Multiple configurations with different components
● Visualised the graph
Observations
● the more the edges, the faster it reaches min/max/average of the network
○ using the same configurations except k;
■ k=10, 20 cycles for all nodes to become minimum value
■ k = 20, 14 cycles for all nodes to become minimum value
■ k = 30, 12 cycles for all nodes to become minimum value
Lessons learnt & Conclusions
Benefits of PeerSim (P2P Network)
● Portability
○ Possible to reuse simulation code with minor modification
○ Allows user defined entities to replace almost all predefined entities
○ highly configurable
○ Architecture based on extendable and pluggable component features
● Scalability
○ Provides high scalability
○ Can simulate millions of network nodes
○ Can hold up a network up to 106 nodes in the cycle-based model
○ Able to solve problems related to scalability
○ One of the major parameters on which a simulator can be analysed
Limitations of PeerSim
● Lacks support for simulating unstructured or semi-structured P2P routing
protocols
● Ability to scale will be reduced if resources are not used efficiently
● Limited support for extending the simulator for protocols other than Bit
○ Difficult to implement other protocols as the simulator is tightly coupled to the Bittorrent
protocol
● No support for distributed simulation
● Simulator makes use of main memory to store visualisation events
○ Limits the system performance in terms of nodes

Mais conteúdo relacionado

Semelhante a Peer sim (p2p network)

PeerSim - Maximum and Minimum Functions using Aggregation Protocol
PeerSim - Maximum and Minimum Functions using Aggregation Protocol PeerSim - Maximum and Minimum Functions using Aggregation Protocol
PeerSim - Maximum and Minimum Functions using Aggregation Protocol Maneshka Paiva
 
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...NETWAYS
 
Presentation 2 Spring 2016 FINAL fat cut (1)
Presentation 2 Spring 2016 FINAL fat cut (1)Presentation 2 Spring 2016 FINAL fat cut (1)
Presentation 2 Spring 2016 FINAL fat cut (1)Michael Vistine
 
Senior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster ComputingSenior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster ComputingRalph Walker II
 
Computer Architecture and Organization
Computer Architecture and OrganizationComputer Architecture and Organization
Computer Architecture and Organizationssuserdfc773
 
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...Rob Skillington
 
Network Analyzer and Report Generation Tool for NS-2 using TCL Script
Network Analyzer and Report Generation Tool for NS-2 using TCL ScriptNetwork Analyzer and Report Generation Tool for NS-2 using TCL Script
Network Analyzer and Report Generation Tool for NS-2 using TCL ScriptIRJET Journal
 
Networking
NetworkingNetworking
NetworkingSNancy
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1Ruslan Meshenberg
 
Distributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflowDistributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflowEmanuel Di Nardo
 
FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1FIWARE
 
Client side machine learning
Client side machine learningClient side machine learning
Client side machine learningKumar Abhinav
 
SDN in the Management Plane: OpenConfig and Streaming Telemetry
SDN in the Management Plane: OpenConfig and Streaming TelemetrySDN in the Management Plane: OpenConfig and Streaming Telemetry
SDN in the Management Plane: OpenConfig and Streaming TelemetryAnees Shaikh
 
Once-for-All: Train One Network and Specialize it for Efficient Deployment
 Once-for-All: Train One Network and Specialize it for Efficient Deployment Once-for-All: Train One Network and Specialize it for Efficient Deployment
Once-for-All: Train One Network and Specialize it for Efficient Deploymenttaeseon ryu
 
Netflix machine learning
Netflix machine learningNetflix machine learning
Netflix machine learningAmer Ather
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Kynetics
 

Semelhante a Peer sim (p2p network) (20)

PeerSim - Maximum and Minimum Functions using Aggregation Protocol
PeerSim - Maximum and Minimum Functions using Aggregation Protocol PeerSim - Maximum and Minimum Functions using Aggregation Protocol
PeerSim - Maximum and Minimum Functions using Aggregation Protocol
 
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
 
Presentation 2 Spring 2016 FINAL fat cut (1)
Presentation 2 Spring 2016 FINAL fat cut (1)Presentation 2 Spring 2016 FINAL fat cut (1)
Presentation 2 Spring 2016 FINAL fat cut (1)
 
Senior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster ComputingSenior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster Computing
 
Computer Architecture and Organization
Computer Architecture and OrganizationComputer Architecture and Organization
Computer Architecture and Organization
 
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
 
Network Analyzer and Report Generation Tool for NS-2 using TCL Script
Network Analyzer and Report Generation Tool for NS-2 using TCL ScriptNetwork Analyzer and Report Generation Tool for NS-2 using TCL Script
Network Analyzer and Report Generation Tool for NS-2 using TCL Script
 
Networking
NetworkingNetworking
Networking
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Distributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflowDistributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflow
 
FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1
 
Client side machine learning
Client side machine learningClient side machine learning
Client side machine learning
 
SDN in the Management Plane: OpenConfig and Streaming Telemetry
SDN in the Management Plane: OpenConfig and Streaming TelemetrySDN in the Management Plane: OpenConfig and Streaming Telemetry
SDN in the Management Plane: OpenConfig and Streaming Telemetry
 
Once-for-All: Train One Network and Specialize it for Efficient Deployment
 Once-for-All: Train One Network and Specialize it for Efficient Deployment Once-for-All: Train One Network and Specialize it for Efficient Deployment
Once-for-All: Train One Network and Specialize it for Efficient Deployment
 
Netflix machine learning
Netflix machine learningNetflix machine learning
Netflix machine learning
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7
 
Nexmark with beam
Nexmark with beamNexmark with beam
Nexmark with beam
 
GCF
GCFGCF
GCF
 
Peer Sim & P2P
Peer Sim & P2PPeer Sim & P2P
Peer Sim & P2P
 
Final peersimp pt
Final peersimp ptFinal peersimp pt
Final peersimp pt
 

Último

Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
MK KOMUNIKASI DATA (TI)komdat komdat.docx
MK KOMUNIKASI DATA (TI)komdat komdat.docxMK KOMUNIKASI DATA (TI)komdat komdat.docx
MK KOMUNIKASI DATA (TI)komdat komdat.docxUnduhUnggah1
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxdolaknnilon
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 

Último (20)

Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
MK KOMUNIKASI DATA (TI)komdat komdat.docx
MK KOMUNIKASI DATA (TI)komdat komdat.docxMK KOMUNIKASI DATA (TI)komdat komdat.docx
MK KOMUNIKASI DATA (TI)komdat komdat.docx
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptx
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 

Peer sim (p2p network)

  • 1. PeerSim (P2P Network) Sijo Emmanuel & Hein Min Htike
  • 2. What is PeerSim? ● Peer Simulator (PeerSim) is a simulation engine ○ Used to write network protocols for P2P (Peer-to-Peer) networks ○ Scalable (up to 1 million nodes), portable and highly configurable ○ Open source Peer-to-Peer (P2P) system developed using Java ○ Developed at the department of Computer Science in University of Bologna
  • 3. What is a simulation engine? ● An application on top of which we can write simulations, collect results and analyze them. ● The engine takes care of the temporal structure of the experiment ● The programmer takes care of the logic of the interactions among the elements of the scenario. ● There are two modes of simulation engines: ● More on next slide!!
  • 4. PeerSim Simulation Engines ● PeerSim has two simulation modes: ● Event-driven: a set of events (messages) are scheduled at different simulation time and the node protocols are run accordingly to messages’ delivery times. ● Cycle-driven: sequential simulation, in each cycle each protocol’s actions are executed by every node (we will be focusing on this)
  • 5. Aim ● To create new protocol ○ protocols to find Min & Max in the network ● To explore PeerSim package
  • 6. Objectives ● To create new protocols to generate networks with the maximum and minimum value. ○ create package for new codes ○ create two classes for Min and Max protocols ○ create observer classes ○ create Max and Min configuration files ○ visualise the topology of the network
  • 7. Key themes/Ideas ● Key theme and idea was to calculate Max and Min values that exists within the network ● Source of idea - Average function ?? ● More on next slides!!!
  • 8. Average Function ● Calculates average between two interacting nodes, and assign that value to them. ● Perform that computation at every node in each cycle. ● After certain amount of time, all the average values in the network converge.
  • 9. Min/Max Function ● Finds min/max value between two interacting nodes, and assign that value to them. ● Perform that computation at every node in each cycle. ● After certain amount of time, all the values in the network become (the same) min/max.
  • 11. MaxFunction and MinFunction ● Took AverageFunction class as example to create MaxFunction and MinFunction
  • 12. Observer classes ● Based on AverageObserver, we created two different observer classes a. node values in the network (NodeValuesObserver) b. similar to average observer (MaxMinObserver)
  • 13. NodeValuesObserver ● observes the values at each node in all the cycles. ○ to see how the values of the nodes change over time
  • 14. NodeValuesObserver ● same as AverageObserver, except execute() method, ● use MedianStats Object ○ to print out all the values in node ○ more about MedianStats in next slide ● line 111 ○ protocol name ○ cycle ● line 112 - 114: print node values ● line 115: number of nodes
  • 15. MedianStats and IncrementalStats ● included in peersim.util package ● IncrementalStats - keep track of statistics about the network ○ average, min, max, etc. ● MedianStats - extends IncrementalStats ○ can retrieve median element ○ STORE all the elements (ArrayList) ○ we added a getter method to retrieve all the elements
  • 16. MaxMinObserver ● Observe the statistics about the nodes at each cycle ● Same as AverageObserver, except changes to what we want to see in output
  • 17. MaxMinObserver ● same as AverageObserver, except execute() method ● MedianStats is used ● line 112 - prints out only Minimum and Maximum values of the network and no. of nodes
  • 18. Configuration File ● We wrote several configuration files with different components to learn more about PeerSim. ● Different components we tried will be preseneted in coming slides.
  • 19. Configuration File ● Created configuration files based on Average configuration file for Max and Min ● simulation.cycles value are the number of cycles in the network ● network.size is the size of the network
  • 20. Configuration File: Protocols ● Created new protocols to run Max and Min functions ● IdleProtocol is the topology of the network which determines the nodes and degree of network ● aMaxMin.MaxFuntion reads in the Max function and uses it to find the maximum value in the network ● IdleProtocol serve as a source of neighbourhood information for other protocols ● It stores links: useful to model a static link-structure
  • 21. Configuration: Linking Nodes ● link nodes to form network ● takes “linkable” protocol, add edges to define topology ● WireKOut: adds random connection ○ Parameter: k - number of edges coming out of each node
  • 22. Configuration: Assigning Values to Nodes ● assign values to the node during initilisation ● ways to distribute values ○ provided in peersim.vector package ○ PeakDistribution ■ parameter: peak - peak value ■ assign peak nodes the peak value, the rest 0 ○ LinearDistribution ■ parameter: min and max ■ assign values in the range (min & max) in linearly increasing manner from min to max ○ UniformDistribution ■ parameter: min and max ■ assign values in random from the range (min & max)
  • 23. Configuration: Distribution Examples Uniform Distribution Linear Distribution Peak Distribution
  • 24. Configuration File: Visualisation ● used built-in GraphPrinter control ○ provided in peersim.report package ○ print the whole graph in given format ● two parameters ○ outf - prefix of filename ■ extension - .graph ■ prefix0000001.graph ○ format - format of output graph ■ neighborlist: neighborlist ■ edgelist: one node pair at each line for each edge ■ gml: generic format for many graph tools ● We used Gephi to visualise the graph ○ change file name from .graph extension to .gml
  • 25. Configuration File: Visualisation Example Example .gml file Graph visualised in Gephi Nodes = 1000, k = 10 Edges = 10000
  • 26. Configuration File: Statistics ● Used built-in DegreeStats control ○ provided in peersim.report package ○ statistics about the node degree in graph ● four parameters ○ n: numbers of nodes for sampling degree ○ method: method to print results ■ stats: statistics about degrees of graph (min degree, max degree, average degree, etc.) ■ freq: frequency of degrees of graph ■ list: lists degree of sampled nodes ○ linktype: type of links to print information about (live (default), dead, all) ○ trace: trace the given number of nodes
  • 27.
  • 28. Configuration File: Statistics Example Example print out to console using stats Example print out to console using lists & n = 10 Example: freq & n = 25
  • 29. Configuration File: Dynamic Network ● dynamically change the size of network ○ add or remove nodes from the network ● line 31: adds DynamicNetwork control to configuration file. ○ provided in peersim.dynamics package ● line 32: take out 500 nodes from network ● line 33 & 34: when to add/remove nodes from network
  • 30. Results - I Network size: 10,000 Protocol: MaxFunction Connection: WireKOut (k=30) Observer: MaxMinObserver Dynamic Network: remove 500 from cycle 1 till 5
  • 31. Results - II Network size: 10,000 Protocol: MinFunction Connection: WireKOut (k=30) Observer: MaxMinObserver Dynamic Network: remove 500 from cycle 1 till 5
  • 32. What have been achieved? ● Created Max/Min functions ● Created two observer classes ● Multiple configurations with different components ● Visualised the graph
  • 33. Observations ● the more the edges, the faster it reaches min/max/average of the network ○ using the same configurations except k; ■ k=10, 20 cycles for all nodes to become minimum value ■ k = 20, 14 cycles for all nodes to become minimum value ■ k = 30, 12 cycles for all nodes to become minimum value
  • 34. Lessons learnt & Conclusions
  • 35. Benefits of PeerSim (P2P Network) ● Portability ○ Possible to reuse simulation code with minor modification ○ Allows user defined entities to replace almost all predefined entities ○ highly configurable ○ Architecture based on extendable and pluggable component features ● Scalability ○ Provides high scalability ○ Can simulate millions of network nodes ○ Can hold up a network up to 106 nodes in the cycle-based model ○ Able to solve problems related to scalability ○ One of the major parameters on which a simulator can be analysed
  • 36. Limitations of PeerSim ● Lacks support for simulating unstructured or semi-structured P2P routing protocols ● Ability to scale will be reduced if resources are not used efficiently ● Limited support for extending the simulator for protocols other than Bit ○ Difficult to implement other protocols as the simulator is tightly coupled to the Bittorrent protocol ● No support for distributed simulation ● Simulator makes use of main memory to store visualisation events ○ Limits the system performance in terms of nodes