SlideShare a Scribd company logo
1 of 34
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
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
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
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
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
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
Limitations of PeerSim
Lack of 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

More Related Content

Viewers also liked

Social Media is a human p2p network. And Uber and AirBnb are the Napster of t...
Social Media is a human p2p network. And Uber and AirBnb are the Napster of t...Social Media is a human p2p network. And Uber and AirBnb are the Napster of t...
Social Media is a human p2p network. And Uber and AirBnb are the Napster of t...Xavier Damman
 
Radio Days Sweden
Radio Days SwedenRadio Days Sweden
Radio Days SwedenAdam Bowie
 
Absolute Radio - RAJAR Q2 09
Absolute Radio - RAJAR Q2 09Absolute Radio - RAJAR Q2 09
Absolute Radio - RAJAR Q2 09Adam Bowie
 
Absolute Radio - RAJAR Q2 09
Absolute Radio - RAJAR Q2 09Absolute Radio - RAJAR Q2 09
Absolute Radio - RAJAR Q2 09Adam Bowie
 
The Future of Radio
The Future of RadioThe Future of Radio
The Future of RadioAdam Bowie
 
Future Of Online Radio Middle East Glance
Future Of Online Radio   Middle East GlanceFuture Of Online Radio   Middle East Glance
Future Of Online Radio Middle East GlanceKhaled Husseini
 
Rajar radio academy - adam bowie
Rajar   radio academy - adam bowieRajar   radio academy - adam bowie
Rajar radio academy - adam bowieAdam Bowie
 
Future of radio for today generation
Future of radio for today generationFuture of radio for today generation
Future of radio for today generationHemat Dwi Nuryanto
 
Google July 2010
Google July 2010Google July 2010
Google July 2010Adam Bowie
 
Fjord@ The Future of Broadcasting
Fjord@ The Future of BroadcastingFjord@ The Future of Broadcasting
Fjord@ The Future of BroadcastingFjord
 
Absolute Radio Presentation
Absolute Radio PresentationAbsolute Radio Presentation
Absolute Radio PresentationAdam Bowie
 
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)Gerd Leonhard
 
Internet radio presentation
Internet radio presentationInternet radio presentation
Internet radio presentationtjbacon530
 
2020 global digital transformation communicasia Gerd Leonhard Futurist Speake...
2020 global digital transformation communicasia Gerd Leonhard Futurist Speake...2020 global digital transformation communicasia Gerd Leonhard Futurist Speake...
2020 global digital transformation communicasia Gerd Leonhard Futurist Speake...Gerd Leonhard
 
The future of marketing, advertising and the Internet: Futurist Speaker Gerd ...
The future of marketing, advertising and the Internet: Futurist Speaker Gerd ...The future of marketing, advertising and the Internet: Futurist Speaker Gerd ...
The future of marketing, advertising and the Internet: Futurist Speaker Gerd ...Gerd Leonhard
 
News Media 2017: Trends & Forecasts in headlines
News Media 2017: Trends & Forecasts in headlines News Media 2017: Trends & Forecasts in headlines
News Media 2017: Trends & Forecasts in headlines Tatiana Repkova
 
Technology vs Humanity: key themes from Futurist Gerd Leonhard's new book
Technology vs Humanity: key themes from Futurist Gerd Leonhard's new bookTechnology vs Humanity: key themes from Futurist Gerd Leonhard's new book
Technology vs Humanity: key themes from Futurist Gerd Leonhard's new bookGerd Leonhard
 
Spotify: P2P music-on-demand streaming
Spotify: P2P music-on-demand streamingSpotify: P2P music-on-demand streaming
Spotify: P2P music-on-demand streamingRicardo Vice Santos
 

Viewers also liked (20)

Social Media is a human p2p network. And Uber and AirBnb are the Napster of t...
Social Media is a human p2p network. And Uber and AirBnb are the Napster of t...Social Media is a human p2p network. And Uber and AirBnb are the Napster of t...
Social Media is a human p2p network. And Uber and AirBnb are the Napster of t...
 
Radio Days Sweden
Radio Days SwedenRadio Days Sweden
Radio Days Sweden
 
Absolute Radio - RAJAR Q2 09
Absolute Radio - RAJAR Q2 09Absolute Radio - RAJAR Q2 09
Absolute Radio - RAJAR Q2 09
 
Absolute Radio - RAJAR Q2 09
Absolute Radio - RAJAR Q2 09Absolute Radio - RAJAR Q2 09
Absolute Radio - RAJAR Q2 09
 
The Future of Radio
The Future of RadioThe Future of Radio
The Future of Radio
 
Rajar 2009 Q4
Rajar 2009 Q4Rajar 2009 Q4
Rajar 2009 Q4
 
Future of the broadcasting spectrum
Future of the broadcasting spectrum Future of the broadcasting spectrum
Future of the broadcasting spectrum
 
Future Of Online Radio Middle East Glance
Future Of Online Radio   Middle East GlanceFuture Of Online Radio   Middle East Glance
Future Of Online Radio Middle East Glance
 
Rajar radio academy - adam bowie
Rajar   radio academy - adam bowieRajar   radio academy - adam bowie
Rajar radio academy - adam bowie
 
Future of radio for today generation
Future of radio for today generationFuture of radio for today generation
Future of radio for today generation
 
Google July 2010
Google July 2010Google July 2010
Google July 2010
 
Fjord@ The Future of Broadcasting
Fjord@ The Future of BroadcastingFjord@ The Future of Broadcasting
Fjord@ The Future of Broadcasting
 
Absolute Radio Presentation
Absolute Radio PresentationAbsolute Radio Presentation
Absolute Radio Presentation
 
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
The Future of Radio and Broadcasting (Gerd Leonhard, The Futures Agency)
 
Internet radio presentation
Internet radio presentationInternet radio presentation
Internet radio presentation
 
2020 global digital transformation communicasia Gerd Leonhard Futurist Speake...
2020 global digital transformation communicasia Gerd Leonhard Futurist Speake...2020 global digital transformation communicasia Gerd Leonhard Futurist Speake...
2020 global digital transformation communicasia Gerd Leonhard Futurist Speake...
 
The future of marketing, advertising and the Internet: Futurist Speaker Gerd ...
The future of marketing, advertising and the Internet: Futurist Speaker Gerd ...The future of marketing, advertising and the Internet: Futurist Speaker Gerd ...
The future of marketing, advertising and the Internet: Futurist Speaker Gerd ...
 
News Media 2017: Trends & Forecasts in headlines
News Media 2017: Trends & Forecasts in headlines News Media 2017: Trends & Forecasts in headlines
News Media 2017: Trends & Forecasts in headlines
 
Technology vs Humanity: key themes from Futurist Gerd Leonhard's new book
Technology vs Humanity: key themes from Futurist Gerd Leonhard's new bookTechnology vs Humanity: key themes from Futurist Gerd Leonhard's new book
Technology vs Humanity: key themes from Futurist Gerd Leonhard's new book
 
Spotify: P2P music-on-demand streaming
Spotify: P2P music-on-demand streamingSpotify: P2P music-on-demand streaming
Spotify: P2P music-on-demand streaming
 

Similar to 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
 
Networking
NetworkingNetworking
NetworkingSNancy
 
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
 
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
 
Implementation of a Deadline Monotonic algorithm for aperiodic traffic schedu...
Implementation of a Deadline Monotonic algorithm for aperiodic traffic schedu...Implementation of a Deadline Monotonic algorithm for aperiodic traffic schedu...
Implementation of a Deadline Monotonic algorithm for aperiodic traffic schedu...Andrea Tino
 
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
 
Performance comparision 1307.4129
Performance comparision 1307.4129Performance comparision 1307.4129
Performance comparision 1307.4129Pratik Joshi
 
Network Monitoring System ppt.pdf
Network Monitoring System ppt.pdfNetwork Monitoring System ppt.pdf
Network Monitoring System ppt.pdfkristinatemen
 
network monitoring system ppt
network monitoring system pptnetwork monitoring system ppt
network monitoring system pptashutosh rai
 
Vpn Virtual Private Network
Vpn  Virtual Private NetworkVpn  Virtual Private Network
Vpn Virtual Private Networkfaisalmalik
 
1.- Networking Models, Devices.pdf
1.- Networking Models, Devices.pdf1.- Networking Models, Devices.pdf
1.- Networking Models, Devices.pdfOpositorGonzalez1
 
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
 

Similar to 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
 
Networking
NetworkingNetworking
Networking
 
Final peersimp pt
Final peersimp ptFinal peersimp pt
Final peersimp pt
 
Peer Sim & P2P
Peer Sim & P2PPeer Sim & P2P
Peer Sim & P2P
 
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)
 
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
 
MininetasSDNPlatform.pdf
MininetasSDNPlatform.pdfMininetasSDNPlatform.pdf
MininetasSDNPlatform.pdf
 
Implementation of a Deadline Monotonic algorithm for aperiodic traffic schedu...
Implementation of a Deadline Monotonic algorithm for aperiodic traffic schedu...Implementation of a Deadline Monotonic algorithm for aperiodic traffic schedu...
Implementation of a Deadline Monotonic algorithm for aperiodic traffic schedu...
 
Network simulator
Network  simulatorNetwork  simulator
Network simulator
 
L1803027588
L1803027588L1803027588
L1803027588
 
Senior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster ComputingSenior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster Computing
 
Lecture3
Lecture3Lecture3
Lecture3
 
Performance comparision 1307.4129
Performance comparision 1307.4129Performance comparision 1307.4129
Performance comparision 1307.4129
 
Network Monitoring System ppt.pdf
Network Monitoring System ppt.pdfNetwork Monitoring System ppt.pdf
Network Monitoring System ppt.pdf
 
network monitoring system ppt
network monitoring system pptnetwork monitoring system ppt
network monitoring system ppt
 
Vpn Virtual Private Network
Vpn  Virtual Private NetworkVpn  Virtual Private Network
Vpn Virtual Private Network
 
1.- Networking Models, Devices.pdf
1.- Networking Models, Devices.pdf1.- Networking Models, Devices.pdf
1.- Networking Models, Devices.pdf
 
6. TinyOS_2.pdf
6. TinyOS_2.pdf6. TinyOS_2.pdf
6. TinyOS_2.pdf
 
GCF
GCFGCF
GCF
 
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
 

Recently uploaded

Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 

Recently uploaded (20)

Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 

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
  • 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
  • 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
  • 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
  • 27. Configuration File: Statistics Example Example print out to console using stats Example print out to console using lists & n = 10 Example: freq & n = 25
  • 28. 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
  • 29. Results - I Network size: 10,000 Protocol: MaxFunction Connection: WireKOut (k=30) Observer: MaxMinObserver Dynamic Network: remove 500 from cycle 1 till 5
  • 30. Results - II Network size: 10,000 Protocol: MinFunction Connection: WireKOut (k=30) Observer: MaxMinObserver Dynamic Network: remove 500 from cycle 1 till 5
  • 31. What have been achieved? ● Created Max/Min functions ● Created two observer classes ● Multiple configurations with different components ● Visualised the graph
  • 32. 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
  • 33. 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
  • 34. Limitations of PeerSim Lack of 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

Editor's Notes

  1. More to be added