SlideShare a Scribd company logo
1 of 46
Download to read offline
P2P: Simulations and
Real World Networks
Matilda Rhode and Matt Courtney
(Partial) Average function
public void nextCycle(Node node, int protocolID) {
int linkableID = FastConfig.getLinkable(protocolID);
Linkable linkable = (Linkable) node.getProtocol(linkableID);
if (linkable.degree() > 0) {
Node peer = linkable.getNeighbor(CommonState.r.nextInt(linkable
.degree()));
// Failure handling
if (!peer.isUp())
return;
AverageFunction neighbor = (AverageFunction) peer
.getProtocol(protocolID);
double mean = (this.value + neighbor.value) / 2;
this.value = mean;
neighbor.value = mean;
}
}
(Partial) Maximum function
public void nextCycle(Node node, int protocolID) {
int linkableID = FastConfig.getLinkable(protocolID);
Linkable linkable = (Linkable) node.getProtocol(linkableID);
if (linkable.degree() > 0) {
Node peer = linkable.getNeighbor(CommonState.r.nextInt(linkable
.degree()));
// Failure handling
if (!peer.isUp())
return;
MaximumFunction neighbor = (MaximumFunction) peer
.getProtocol(protocolID);
double maximum = this.value
if (neighbor.value > this.value) {
maximum = neighbor.value;
}
this.value = maximum;
neighbor.value = maximum;
}
}
(Partial) Minimum function
public void nextCycle(Node node, int protocolID) {
int linkableID = FastConfig.getLinkable(protocolID);
Linkable linkable = (Linkable) node.getProtocol(linkableID);
if (linkable.degree() > 0) {
Node peer = linkable.getNeighbor(CommonState.r.nextInt(linkable
.degree()));
// Failure handling
if (!peer.isUp())
return;
MaximumFunction neighbor = (MaximumFunction) peer
.getProtocol(protocolID);
double maximum = this.value
if (neighbor.value < this.value) {
maximum = neighbor.value;
}
this.value = maximum;
neighbor.value = maximum;
}
}
Gossip-based protocols
• Gossip or epidemic protocol
• Each node has only a partial view of the network
When all nodes hold the
same value
Using Incremental Stats printed in average observer to see when
network is ‘settled’
control.avgo: 0 1.0 99.99999999999999 50 50.5 867.4354435651799 1 1
CDSimulator: cycle 0 done
control.avgo: 1 1.0 69.6938775510204 50 23.386122448979595 414.34298362076936 7 1
CDSimulator: cycle 1 done
control.avgo: 2 1.0 31.30612244897959 50 5.162040816326529 49.386130098853386 26 2
CDSimulator: cycle 2 done
control.avgo: 3 1.0 7.061224489795918 50 1.4040816326530612 1.6661425086486068 44 2
CDSimulator: cycle 3 done
control.avgo: 4 1.0 1.0 50 1.0 0.0 50 50
CDSimulator: cycle 4 done
Largest value
held by
any node
Cycle
Smallest value
held by
any node
Network
size
Mean
value
Variance
in values
Total nodes
holding
minimum
value
Total nodes
holding
maximum
value
Minimum function, linear distribution of values (1,100) , network size = 50
When all nodes hold the
same value
Using Incremental Stats printed in average observer to see when
network is ‘settled’
control.avgo: 0 1.0 99.99999999999999 50 50.5 867.4354435651799 1 1
CDSimulator: cycle 0 done
control.avgo: 1 1.0 69.6938775510204 50 23.386122448979595 414.34298362076936 7 1
CDSimulator: cycle 1 done
control.avgo: 2 1.0 31.30612244897959 50 5.162040816326529 49.386130098853386 26 2
CDSimulator: cycle 2 done
control.avgo: 3 1.0 7.061224489795918 50 1.4040816326530612 1.6661425086486068 44 2
CDSimulator: cycle 3 done
control.avgo: 4 50 1.0 0.0 50 50
CDSimulator: cycle 4 done
Largest value
held by
any node
Cycle
Smallest value
held by
any node
Network
size
Mean
value
Variance
in values
Total nodes
holding
minimum
value
Total nodes
holding
maximum
value
Minimum function, linear distribution of values (1,100) , network size = 50
1.0 1.0
When all nodes hold the
same value
Using Incremental Stats printed in average observer to see when
network is ‘settled’
control.avgo: 0 1.0 99.99999999999999 50 50.5 867.4354435651799 1 1
CDSimulator: cycle 0 done
control.avgo: 1 1.0 69.6938775510204 50 23.386122448979595 414.34298362076936 7 1
CDSimulator: cycle 1 done
control.avgo: 2 1.0 31.30612244897959 50 5.162040816326529 49.386130098853386 26 2
CDSimulator: cycle 2 done
control.avgo: 3 1.0 7.061224489795918 50 1.4040816326530612 1.6661425086486068 44 2
CDSimulator: cycle 3 done
control.avgo: 4 1.0 1.0 1.0 0.0
CDSimulator: cycle 4 done
Largest value
held by
any node
Cycle
Smallest value
held by
any node
Network
size
Mean
value
Variance
in values
Total nodes
holding
minimum
value
Total nodes
holding
maximum
value
Minimum function, linear distribution of values (1,100) , network size = 50
505050
Varying parameters
• Protocol {AverageFunction, MaximumFunction, MinumumFunction}
• Network size [2,50000]
• Distribution of values {Linear, Peak}, distribution parameters
• k, directed edges out of each node [1,8]
• Network Topography {WireKOut, WireINet, WireRegRootedTree, WireRingLattice,
WireStar, WireWS}
• Network dynamism {Static, Dynamic, Oscillating}, dynamic and oscillating parameters
Distribution
Static config file
random.seed 1234567890
control.shf Shuffle
simulation.cycles 10
network.size 100
protocol.lnk IdleProtocol
protocol.0 example.aggregation.
protocol.0.linkable lnk
init.rnd WireKOut
init.rnd.protocol lnk
init.rnd.k 5
init.lin LinearDistribution
init.lin.protocol 0
init.lin.max 100
init.lin.min 1
init.peak example.aggregation.PeakDistributionInitializer
init.peak.value 10000
init.peak.protocol 0
include.init rnd lin
control.avgo example.aggregation.AverageObserver
control.avgo.protocol 0
k
MaximumFunction
Distribution Parameters
Protocol
Network size
Distribution
Static config file
random.seed 1234567890
control.shf Shuffle
simulation.cycles 10
network.size
protocol.lnk IdleProtocol
protocol.0 example.aggregation.
protocol.0.linkable lnk
init.rnd WireKOut
init.rnd.protocol lnk
init.rnd.k 5
init.lin LinearDistribution
init.lin.protocol 0
init.lin.max 100
init.lin.min 1
init.peak example.aggregation.PeakDistributionInitializer
init.peak.value 10000
init.peak.protocol 0
include.init rnd lin
control.avgo example.aggregation.AverageObserver
control.avgo.protocol 0
Protocol
Network size
MaximumFunction
100
k
Distribution Parameters
Static config file
Protocol
Network size
DistributionMaximumFunction
100
100
1
10000
lin
k
Distribution Parameters
random.seed 1234567890
control.shf Shuffle
simulation.cycles 10
network.size
protocol.lnk IdleProtocol
protocol.0 example.aggregation.
protocol.0.linkable lnk
init.rnd WireKOut
init.rnd.protocol lnk
init.rnd.k 5
init.lin LinearDistribution
init.lin.protocol 0
init.lin.max
init.lin.min
init.peak example.aggregation.PeakDistributionInitializer
init.peak.value
init.peak.protocol 0
include.init rnd
control.avgo example.aggregation.AverageObserver
control.avgo.protocol 0
random.seed 1234567890
control.shf Shuffle
simulation.cycles 10
network.size
protocol.lnk IdleProtocol
protocol.0 example.aggregation.
protocol.0.linkable lnk
init.rnd WireKOut
init.rnd.protocol lnk
init.rnd.k 5
init.lin LinearDistribution
init.lin.protocol 0
init.lin.max
init.lin.min
init.peak example.aggregation.PeakDistributionInitializer
init.peak.value
init.peak.protocol 0
include.init rnd
control.avgo example.aggregation.AverageObserver
control.avgo.protocol 0
Static config file
Protocol
Network size
DistributionMaximumFunction
100
100
1
10000
lin
k
Distribution Parameters
random.seed 1234567890
control.shf Shuffle
simulation.cycles 10
network.size
protocol.lnk IdleProtocol
protocol.0 example.aggregation.
protocol.0.linkable lnk
init.rnd WireKOut
init.rnd.protocol lnk
init.rnd.k
init.lin LinearDistribution
init.lin.protocol 0
init.lin.max
init.lin.min
init.peak example.aggregation.PeakDistributionInitializer
init.peak.value
init.peak.protocol 0
include.init rnd
control.avgo example.aggregation.AverageObserver
control.avgo.protocol 0
Static config file
Protocol
Network size
DistributionMaximumFunction
100
100
1
10000
lin
k
Distribution Parameters
5
Static config file
MaximumFunction
100
100
1
10000
lin
1
random.seed 1234567890
control.shf Shuffle
simulation.cycles 10
network.size
protocol.lnk IdleProtocol
protocol.0 example.aggregation.
protocol.0.linkable lnk
init.rnd WireKOut
init.rnd.protocol lnk
init.rnd.k
init.lin LinearDistribution
init.lin.protocol 0
init.lin.max
init.lin.min
init.peak example.aggregation.PeakDistributionInitializer
init.peak.value
init.peak.protocol 0
include.init rnd
control.avgo example.aggregation.AverageObserver
control.avgo.protocol 0
Observations
• Ran many simulations and recorded results
• Used Tableau to analyse
Protocol
Network size
Network ~ Linear(0,100); k=5; static network
Distribution
k
Benefits of Simulation
Allows for a ‘sterile’ environment where approaches can be
designed to improve the components of a P2P network’s
functionality.
Benefits of Simulation
Test various approaches and topologies for their suitability in
the given scenario. This may imply a suitability for a real life
application.
Other Projects
“http://doc.tm.uka.de/tr/TM-2011-4.pdf” , “https://dspace.stir.ac.uk/bitstream/1893/3688/1/ccnc-2011-jamie.pdf”
Dynamic config file
Removing nodes/
Oscillating
Dynamic
parameters
simulation.cycles 5
network.size 100
protocol.link IdleProtocol
protocol.coord example.hot.InetCoordinates
protocol.1 example.aggregation.MaximumFunction
protocol.1.linkable link
init.0 example.hot.InetInitializer
init.0.protocol coord
init.1 peersim.dynamics.WireRingLattice
init.1.protocol link
init.1.coord_protocol coord
init.1.k 5
init.ld LinearDistribution
init.ld.protocol 1
init.ld.max 100
init.ld.min 1
control.dnet DynamicNetwork
control.dnet.add -10
control.dnet.from 1
control.dnet.until 5
k/alpha/
k, beta
Topography
simulation.cycles 5
network.size 100
protocol.link IdleProtocol
protocol.coord example.hot.InetCoordinates
protocol.1 example.aggregation.MaximumFunction
protocol.1.linkable link
init.0 example.hot.InetInitializer
init.0.protocol coord
init.1 peersim.dynamics.WireRingLattice
init.1.protocol link
init.1.coord_protocol coord
init.1.k 5
init.ld LinearDistribution
init.ld.protocol 1
init.ld.max 100
init.ld.min 1
control.dnet DynamicNetwork
control.dnet.add
control.dnet.from
control.dnet.minsize
Dynamic config file
Removing nodes/
Oscillating
Dynamic
parameters
-10
1
2
100
20
3
k/alpha/
k, beta
Topography
simulation.cycles 5
network.size 100
protocol.link IdleProtocol
protocol.coord example.hot.InetCoordinates
protocol.1 example.aggregation.MaximumFunction
protocol.1.linkable link
init.0 example.hot.InetInitializer
init.0.protocol coord
init.1
init.1.protocol link
init.1.coord_protocol coord
init.1.k 5
init.ld LinearDistribution
init.ld.protocol 1
init.ld.max 100
init.ld.min 1
control.dnet DynamicNetwork
control.dnet.add
control.dnet.from
control.dnet.minsize
Dynamic config file
Removing nodes/
Oscillating
Dynamic
parameters
Topography
k/alpha/
k, beta
-10
1
2
100
20
3
peersim.dynamics.WireRingLattice
simulation.cycles 5
network.size 100
protocol.link IdleProtocol
protocol.coord example.hot.InetCoordinates
protocol.1 example.aggregation.MaximumFunction
protocol.1.linkable link
init.0 example.hot.InetInitializer
init.0.protocol coord
init.1
init.1.protocol link
init.1.coord_protocol coord
init.1.
init.ld LinearDistribution
init.ld.protocol 1
init.ld.max 100
init.ld.min 1
control.dnet DynamicNetwork
control.dnet.add
control.dnet.from
control.dnet.minsize
Dynamic config file
Removing nodes/
Oscillating
Dynamic
parameters
Topography
k/alpha/
k, beta
-10
1
2
100
20
3
peersim.dynamics.WireRingLattice
k 5
Dynamic config file
Removing nodes/
Oscillating
Dynamic
parameters
Topography
k/alpha/
k, beta
-10
1
2
100
20
3
peersim.dynamics.WireRingLattice
k 5
simulation.cycles 5
network.size 100
protocol.link IdleProtocol
protocol.coord example.hot.InetCoordinates
protocol.1 example.aggregation.MaximumFunction
protocol.1.linkable link
init.0 example.hot.InetInitializer
init.0.protocol coord
init.1
init.1.protocol link
init.1.coord_protocol coord
init.1.
init.ld LinearDistribution
init.ld.protocol 1
init.ld.max 100
init.ld.min 1
control.dnet DynamicNetwork
control.dnet.add
control.dnet.from
control.dnet.minsize
Dynamic Network (killing nodes)
Oscillating Network
Oscillating Network
Oscillating Network
WireKOut
WireInetTopology
WireRegRootedTree
WireRingLattice
WireStar
WireWS
Topographies
2
2
Topographies
2
2
2
2
Real World P2P
• Structured - Overlay has fixed topology, protocol
aims to ensure an efficient search of network for a
given resource.
ImageSRC:- “https://personalpages.manchester.ac.uk/staff/m.dodge/cybergeography/atlas/gnucleus_graph_large.gif”
Real World P2P
• Unstructured - No formal topology, easy to build.
Allow for localised optimisations and are highly
resilient against problems caused with high ‘churn’.
ImageSRC:- “http://courses.cse.tamu.edu/caverlee/csce438/hw/rand_graph.png"
Real World P2P
• Hybrid - Combination of P2P and client-server
models. Currently tend to have better all round
performance versus pure P2P and client-server.
ImageSRC:- “http://www.di.unipi.it/~hkholidy/projects/cids/CIDS%20in%20Pure%20P2P%20model.gif”
Real World P2P
• Spotify(2011) - Hybrid model, utilises centralised
servers, P2P network, and a local cache. Only non
web-based on-demand music streaming service.
ImageSRC:- “http://pansentient.com/2011/04/spotify-technology-some-stats-and-how-spotify-works/“
~8
~36~56
Real World P2P
• Spotify - Simple use case
ImageSRC:- “http://pansentient.com/2011/04/spotify-technology-some-stats-and-how-spotify-works/“
• User selects track
• If cached, play from there
• Else
• Request first 15secs from servers.
• Search P2P network for remainder of song.
Real World P2P
• Spotify’s P2P Network - Works like BitTorrent,
using server-side trackers and network queries to
locate peers. Returned peers are those that can
support playback.
Predictable listening habits - Most users listen to the
same music multiple times or listen to albums. Makes
predictive caching possible, reducing network traffic.

More Related Content

Viewers also liked

Real-World Networks
Real-World NetworksReal-World Networks
Real-World Networkszaisahil
 
Web and Social Computing - Presentation Week8
Web and Social Computing - Presentation Week8Web and Social Computing - Presentation Week8
Web and Social Computing - Presentation Week8Matthew Courtney
 
Weka_Manual_Sagar
Weka_Manual_SagarWeka_Manual_Sagar
Weka_Manual_SagarSagar Kumar
 
Ethernet - Networking presentation
Ethernet - Networking presentationEthernet - Networking presentation
Ethernet - Networking presentationViet Nguyen
 
Slideshare.Com Powerpoint
Slideshare.Com PowerpointSlideshare.Com Powerpoint
Slideshare.Com Powerpointguested929b
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentationelliehood
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011photomatt
 

Viewers also liked (11)

Book buyer network
Book buyer networkBook buyer network
Book buyer network
 
IPCC trifold 3 21 14
IPCC trifold 3 21 14IPCC trifold 3 21 14
IPCC trifold 3 21 14
 
Real-World Networks
Real-World NetworksReal-World Networks
Real-World Networks
 
Web and Social Computing - Presentation Week8
Web and Social Computing - Presentation Week8Web and Social Computing - Presentation Week8
Web and Social Computing - Presentation Week8
 
Weka_Manual_Sagar
Weka_Manual_SagarWeka_Manual_Sagar
Weka_Manual_Sagar
 
Selling on amazon
Selling on amazonSelling on amazon
Selling on amazon
 
Data mining with weka
Data mining with wekaData mining with weka
Data mining with weka
 
Ethernet - Networking presentation
Ethernet - Networking presentationEthernet - Networking presentation
Ethernet - Networking presentation
 
Slideshare.Com Powerpoint
Slideshare.Com PowerpointSlideshare.Com Powerpoint
Slideshare.Com Powerpoint
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentation
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
 

Similar to P2P: Simulations and Real world Networks

Managing Large-scale Networks with Trigger
Managing Large-scale Networks with TriggerManaging Large-scale Networks with Trigger
Managing Large-scale Networks with Triggerjathanism
 
The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202Mahmoud Samir Fayed
 
Locks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerLocks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerJAX London
 
Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Michael Barker
 
Profiling ruby
Profiling rubyProfiling ruby
Profiling rubynasirj
 
Didactum SNMP Manual
Didactum SNMP ManualDidactum SNMP Manual
Didactum SNMP ManualDidactum
 
Peer Sim (P2P network)
Peer Sim (P2P network)Peer Sim (P2P network)
Peer Sim (P2P network)Sijo Emmanuel
 
The Ring programming language version 1.4 book - Part 21 of 30
The Ring programming language version 1.4 book - Part 21 of 30The Ring programming language version 1.4 book - Part 21 of 30
The Ring programming language version 1.4 book - Part 21 of 30Mahmoud Samir Fayed
 
Fpga applications using hdl
Fpga applications using hdlFpga applications using hdl
Fpga applications using hdlSankarshan D
 
Handy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemHandy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemSneha Inguva
 
Performance analysis in a multitenant cloud environment Using Hadoop Cluster ...
Performance analysis in a multitenant cloud environment Using Hadoop Cluster ...Performance analysis in a multitenant cloud environment Using Hadoop Cluster ...
Performance analysis in a multitenant cloud environment Using Hadoop Cluster ...Orgad Kimchi
 
Recent my sql_performance Test detail
Recent my sql_performance Test detailRecent my sql_performance Test detail
Recent my sql_performance Test detailLouis liu
 
Cassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewCassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewJoshua McKenzie
 
Building Distributed Systems
Building Distributed SystemsBuilding Distributed Systems
Building Distributed SystemsPivorak MeetUp
 
OpenFlow Data Center - A case Study by Pica8
OpenFlow Data Center - A case Study by Pica8OpenFlow Data Center - A case Study by Pica8
OpenFlow Data Center - A case Study by Pica8nvirters
 
Mac ip snmp
Mac ip snmpMac ip snmp
Mac ip snmpgielth01
 
The Ring programming language version 1.10 book - Part 59 of 212
The Ring programming language version 1.10 book - Part 59 of 212The Ring programming language version 1.10 book - Part 59 of 212
The Ring programming language version 1.10 book - Part 59 of 212Mahmoud Samir Fayed
 

Similar to P2P: Simulations and Real world Networks (20)

Managing Large-scale Networks with Trigger
Managing Large-scale Networks with TriggerManaging Large-scale Networks with Trigger
Managing Large-scale Networks with Trigger
 
The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202
 
AMC Minor Technical Issues
AMC Minor Technical IssuesAMC Minor Technical Issues
AMC Minor Technical Issues
 
Locks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerLocks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael Barker
 
Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!
 
Profiling ruby
Profiling rubyProfiling ruby
Profiling ruby
 
Didactum SNMP Manual
Didactum SNMP ManualDidactum SNMP Manual
Didactum SNMP Manual
 
Peer Sim (P2P network)
Peer Sim (P2P network)Peer Sim (P2P network)
Peer Sim (P2P network)
 
The Ring programming language version 1.4 book - Part 21 of 30
The Ring programming language version 1.4 book - Part 21 of 30The Ring programming language version 1.4 book - Part 21 of 30
The Ring programming language version 1.4 book - Part 21 of 30
 
Fpga applications using hdl
Fpga applications using hdlFpga applications using hdl
Fpga applications using hdl
 
SOFA Tutorial
SOFA TutorialSOFA Tutorial
SOFA Tutorial
 
Handy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemHandy Networking Tools and How to Use Them
Handy Networking Tools and How to Use Them
 
Performance analysis in a multitenant cloud environment Using Hadoop Cluster ...
Performance analysis in a multitenant cloud environment Using Hadoop Cluster ...Performance analysis in a multitenant cloud environment Using Hadoop Cluster ...
Performance analysis in a multitenant cloud environment Using Hadoop Cluster ...
 
Recent my sql_performance Test detail
Recent my sql_performance Test detailRecent my sql_performance Test detail
Recent my sql_performance Test detail
 
Cassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewCassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, Overview
 
Building Distributed Systems
Building Distributed SystemsBuilding Distributed Systems
Building Distributed Systems
 
OpenFlow Data Center - A case Study by Pica8
OpenFlow Data Center - A case Study by Pica8OpenFlow Data Center - A case Study by Pica8
OpenFlow Data Center - A case Study by Pica8
 
Mac ip snmp
Mac ip snmpMac ip snmp
Mac ip snmp
 
The Ring programming language version 1.10 book - Part 59 of 212
The Ring programming language version 1.10 book - Part 59 of 212The Ring programming language version 1.10 book - Part 59 of 212
The Ring programming language version 1.10 book - Part 59 of 212
 
ADCSS 2022
ADCSS 2022ADCSS 2022
ADCSS 2022
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

P2P: Simulations and Real world Networks

  • 1. P2P: Simulations and Real World Networks Matilda Rhode and Matt Courtney
  • 2. (Partial) Average function public void nextCycle(Node node, int protocolID) { int linkableID = FastConfig.getLinkable(protocolID); Linkable linkable = (Linkable) node.getProtocol(linkableID); if (linkable.degree() > 0) { Node peer = linkable.getNeighbor(CommonState.r.nextInt(linkable .degree())); // Failure handling if (!peer.isUp()) return; AverageFunction neighbor = (AverageFunction) peer .getProtocol(protocolID); double mean = (this.value + neighbor.value) / 2; this.value = mean; neighbor.value = mean; } }
  • 3. (Partial) Maximum function public void nextCycle(Node node, int protocolID) { int linkableID = FastConfig.getLinkable(protocolID); Linkable linkable = (Linkable) node.getProtocol(linkableID); if (linkable.degree() > 0) { Node peer = linkable.getNeighbor(CommonState.r.nextInt(linkable .degree())); // Failure handling if (!peer.isUp()) return; MaximumFunction neighbor = (MaximumFunction) peer .getProtocol(protocolID); double maximum = this.value if (neighbor.value > this.value) { maximum = neighbor.value; } this.value = maximum; neighbor.value = maximum; } }
  • 4. (Partial) Minimum function public void nextCycle(Node node, int protocolID) { int linkableID = FastConfig.getLinkable(protocolID); Linkable linkable = (Linkable) node.getProtocol(linkableID); if (linkable.degree() > 0) { Node peer = linkable.getNeighbor(CommonState.r.nextInt(linkable .degree())); // Failure handling if (!peer.isUp()) return; MaximumFunction neighbor = (MaximumFunction) peer .getProtocol(protocolID); double maximum = this.value if (neighbor.value < this.value) { maximum = neighbor.value; } this.value = maximum; neighbor.value = maximum; } }
  • 5. Gossip-based protocols • Gossip or epidemic protocol • Each node has only a partial view of the network
  • 6. When all nodes hold the same value Using Incremental Stats printed in average observer to see when network is ‘settled’ control.avgo: 0 1.0 99.99999999999999 50 50.5 867.4354435651799 1 1 CDSimulator: cycle 0 done control.avgo: 1 1.0 69.6938775510204 50 23.386122448979595 414.34298362076936 7 1 CDSimulator: cycle 1 done control.avgo: 2 1.0 31.30612244897959 50 5.162040816326529 49.386130098853386 26 2 CDSimulator: cycle 2 done control.avgo: 3 1.0 7.061224489795918 50 1.4040816326530612 1.6661425086486068 44 2 CDSimulator: cycle 3 done control.avgo: 4 1.0 1.0 50 1.0 0.0 50 50 CDSimulator: cycle 4 done Largest value held by any node Cycle Smallest value held by any node Network size Mean value Variance in values Total nodes holding minimum value Total nodes holding maximum value Minimum function, linear distribution of values (1,100) , network size = 50
  • 7. When all nodes hold the same value Using Incremental Stats printed in average observer to see when network is ‘settled’ control.avgo: 0 1.0 99.99999999999999 50 50.5 867.4354435651799 1 1 CDSimulator: cycle 0 done control.avgo: 1 1.0 69.6938775510204 50 23.386122448979595 414.34298362076936 7 1 CDSimulator: cycle 1 done control.avgo: 2 1.0 31.30612244897959 50 5.162040816326529 49.386130098853386 26 2 CDSimulator: cycle 2 done control.avgo: 3 1.0 7.061224489795918 50 1.4040816326530612 1.6661425086486068 44 2 CDSimulator: cycle 3 done control.avgo: 4 50 1.0 0.0 50 50 CDSimulator: cycle 4 done Largest value held by any node Cycle Smallest value held by any node Network size Mean value Variance in values Total nodes holding minimum value Total nodes holding maximum value Minimum function, linear distribution of values (1,100) , network size = 50 1.0 1.0
  • 8. When all nodes hold the same value Using Incremental Stats printed in average observer to see when network is ‘settled’ control.avgo: 0 1.0 99.99999999999999 50 50.5 867.4354435651799 1 1 CDSimulator: cycle 0 done control.avgo: 1 1.0 69.6938775510204 50 23.386122448979595 414.34298362076936 7 1 CDSimulator: cycle 1 done control.avgo: 2 1.0 31.30612244897959 50 5.162040816326529 49.386130098853386 26 2 CDSimulator: cycle 2 done control.avgo: 3 1.0 7.061224489795918 50 1.4040816326530612 1.6661425086486068 44 2 CDSimulator: cycle 3 done control.avgo: 4 1.0 1.0 1.0 0.0 CDSimulator: cycle 4 done Largest value held by any node Cycle Smallest value held by any node Network size Mean value Variance in values Total nodes holding minimum value Total nodes holding maximum value Minimum function, linear distribution of values (1,100) , network size = 50 505050
  • 9. Varying parameters • Protocol {AverageFunction, MaximumFunction, MinumumFunction} • Network size [2,50000] • Distribution of values {Linear, Peak}, distribution parameters • k, directed edges out of each node [1,8] • Network Topography {WireKOut, WireINet, WireRegRootedTree, WireRingLattice, WireStar, WireWS} • Network dynamism {Static, Dynamic, Oscillating}, dynamic and oscillating parameters
  • 10. Distribution Static config file random.seed 1234567890 control.shf Shuffle simulation.cycles 10 network.size 100 protocol.lnk IdleProtocol protocol.0 example.aggregation. protocol.0.linkable lnk init.rnd WireKOut init.rnd.protocol lnk init.rnd.k 5 init.lin LinearDistribution init.lin.protocol 0 init.lin.max 100 init.lin.min 1 init.peak example.aggregation.PeakDistributionInitializer init.peak.value 10000 init.peak.protocol 0 include.init rnd lin control.avgo example.aggregation.AverageObserver control.avgo.protocol 0 k MaximumFunction Distribution Parameters Protocol Network size
  • 11. Distribution Static config file random.seed 1234567890 control.shf Shuffle simulation.cycles 10 network.size protocol.lnk IdleProtocol protocol.0 example.aggregation. protocol.0.linkable lnk init.rnd WireKOut init.rnd.protocol lnk init.rnd.k 5 init.lin LinearDistribution init.lin.protocol 0 init.lin.max 100 init.lin.min 1 init.peak example.aggregation.PeakDistributionInitializer init.peak.value 10000 init.peak.protocol 0 include.init rnd lin control.avgo example.aggregation.AverageObserver control.avgo.protocol 0 Protocol Network size MaximumFunction 100 k Distribution Parameters
  • 12. Static config file Protocol Network size DistributionMaximumFunction 100 100 1 10000 lin k Distribution Parameters random.seed 1234567890 control.shf Shuffle simulation.cycles 10 network.size protocol.lnk IdleProtocol protocol.0 example.aggregation. protocol.0.linkable lnk init.rnd WireKOut init.rnd.protocol lnk init.rnd.k 5 init.lin LinearDistribution init.lin.protocol 0 init.lin.max init.lin.min init.peak example.aggregation.PeakDistributionInitializer init.peak.value init.peak.protocol 0 include.init rnd control.avgo example.aggregation.AverageObserver control.avgo.protocol 0
  • 13. random.seed 1234567890 control.shf Shuffle simulation.cycles 10 network.size protocol.lnk IdleProtocol protocol.0 example.aggregation. protocol.0.linkable lnk init.rnd WireKOut init.rnd.protocol lnk init.rnd.k 5 init.lin LinearDistribution init.lin.protocol 0 init.lin.max init.lin.min init.peak example.aggregation.PeakDistributionInitializer init.peak.value init.peak.protocol 0 include.init rnd control.avgo example.aggregation.AverageObserver control.avgo.protocol 0 Static config file Protocol Network size DistributionMaximumFunction 100 100 1 10000 lin k Distribution Parameters
  • 14. random.seed 1234567890 control.shf Shuffle simulation.cycles 10 network.size protocol.lnk IdleProtocol protocol.0 example.aggregation. protocol.0.linkable lnk init.rnd WireKOut init.rnd.protocol lnk init.rnd.k init.lin LinearDistribution init.lin.protocol 0 init.lin.max init.lin.min init.peak example.aggregation.PeakDistributionInitializer init.peak.value init.peak.protocol 0 include.init rnd control.avgo example.aggregation.AverageObserver control.avgo.protocol 0 Static config file Protocol Network size DistributionMaximumFunction 100 100 1 10000 lin k Distribution Parameters 5
  • 15. Static config file MaximumFunction 100 100 1 10000 lin 1 random.seed 1234567890 control.shf Shuffle simulation.cycles 10 network.size protocol.lnk IdleProtocol protocol.0 example.aggregation. protocol.0.linkable lnk init.rnd WireKOut init.rnd.protocol lnk init.rnd.k init.lin LinearDistribution init.lin.protocol 0 init.lin.max init.lin.min init.peak example.aggregation.PeakDistributionInitializer init.peak.value init.peak.protocol 0 include.init rnd control.avgo example.aggregation.AverageObserver control.avgo.protocol 0
  • 16. Observations • Ran many simulations and recorded results • Used Tableau to analyse
  • 18. Network size Network ~ Linear(0,100); k=5; static network
  • 20. k
  • 21. Benefits of Simulation Allows for a ‘sterile’ environment where approaches can be designed to improve the components of a P2P network’s functionality.
  • 22. Benefits of Simulation Test various approaches and topologies for their suitability in the given scenario. This may imply a suitability for a real life application.
  • 23. Other Projects “http://doc.tm.uka.de/tr/TM-2011-4.pdf” , “https://dspace.stir.ac.uk/bitstream/1893/3688/1/ccnc-2011-jamie.pdf”
  • 24. Dynamic config file Removing nodes/ Oscillating Dynamic parameters simulation.cycles 5 network.size 100 protocol.link IdleProtocol protocol.coord example.hot.InetCoordinates protocol.1 example.aggregation.MaximumFunction protocol.1.linkable link init.0 example.hot.InetInitializer init.0.protocol coord init.1 peersim.dynamics.WireRingLattice init.1.protocol link init.1.coord_protocol coord init.1.k 5 init.ld LinearDistribution init.ld.protocol 1 init.ld.max 100 init.ld.min 1 control.dnet DynamicNetwork control.dnet.add -10 control.dnet.from 1 control.dnet.until 5 k/alpha/ k, beta Topography
  • 25. simulation.cycles 5 network.size 100 protocol.link IdleProtocol protocol.coord example.hot.InetCoordinates protocol.1 example.aggregation.MaximumFunction protocol.1.linkable link init.0 example.hot.InetInitializer init.0.protocol coord init.1 peersim.dynamics.WireRingLattice init.1.protocol link init.1.coord_protocol coord init.1.k 5 init.ld LinearDistribution init.ld.protocol 1 init.ld.max 100 init.ld.min 1 control.dnet DynamicNetwork control.dnet.add control.dnet.from control.dnet.minsize Dynamic config file Removing nodes/ Oscillating Dynamic parameters -10 1 2 100 20 3 k/alpha/ k, beta Topography
  • 26. simulation.cycles 5 network.size 100 protocol.link IdleProtocol protocol.coord example.hot.InetCoordinates protocol.1 example.aggregation.MaximumFunction protocol.1.linkable link init.0 example.hot.InetInitializer init.0.protocol coord init.1 init.1.protocol link init.1.coord_protocol coord init.1.k 5 init.ld LinearDistribution init.ld.protocol 1 init.ld.max 100 init.ld.min 1 control.dnet DynamicNetwork control.dnet.add control.dnet.from control.dnet.minsize Dynamic config file Removing nodes/ Oscillating Dynamic parameters Topography k/alpha/ k, beta -10 1 2 100 20 3 peersim.dynamics.WireRingLattice
  • 27. simulation.cycles 5 network.size 100 protocol.link IdleProtocol protocol.coord example.hot.InetCoordinates protocol.1 example.aggregation.MaximumFunction protocol.1.linkable link init.0 example.hot.InetInitializer init.0.protocol coord init.1 init.1.protocol link init.1.coord_protocol coord init.1. init.ld LinearDistribution init.ld.protocol 1 init.ld.max 100 init.ld.min 1 control.dnet DynamicNetwork control.dnet.add control.dnet.from control.dnet.minsize Dynamic config file Removing nodes/ Oscillating Dynamic parameters Topography k/alpha/ k, beta -10 1 2 100 20 3 peersim.dynamics.WireRingLattice k 5
  • 28. Dynamic config file Removing nodes/ Oscillating Dynamic parameters Topography k/alpha/ k, beta -10 1 2 100 20 3 peersim.dynamics.WireRingLattice k 5 simulation.cycles 5 network.size 100 protocol.link IdleProtocol protocol.coord example.hot.InetCoordinates protocol.1 example.aggregation.MaximumFunction protocol.1.linkable link init.0 example.hot.InetInitializer init.0.protocol coord init.1 init.1.protocol link init.1.coord_protocol coord init.1. init.ld LinearDistribution init.ld.protocol 1 init.ld.max 100 init.ld.min 1 control.dnet DynamicNetwork control.dnet.add control.dnet.from control.dnet.minsize
  • 41. Real World P2P • Structured - Overlay has fixed topology, protocol aims to ensure an efficient search of network for a given resource. ImageSRC:- “https://personalpages.manchester.ac.uk/staff/m.dodge/cybergeography/atlas/gnucleus_graph_large.gif”
  • 42. Real World P2P • Unstructured - No formal topology, easy to build. Allow for localised optimisations and are highly resilient against problems caused with high ‘churn’. ImageSRC:- “http://courses.cse.tamu.edu/caverlee/csce438/hw/rand_graph.png"
  • 43. Real World P2P • Hybrid - Combination of P2P and client-server models. Currently tend to have better all round performance versus pure P2P and client-server. ImageSRC:- “http://www.di.unipi.it/~hkholidy/projects/cids/CIDS%20in%20Pure%20P2P%20model.gif”
  • 44. Real World P2P • Spotify(2011) - Hybrid model, utilises centralised servers, P2P network, and a local cache. Only non web-based on-demand music streaming service. ImageSRC:- “http://pansentient.com/2011/04/spotify-technology-some-stats-and-how-spotify-works/“ ~8 ~36~56
  • 45. Real World P2P • Spotify - Simple use case ImageSRC:- “http://pansentient.com/2011/04/spotify-technology-some-stats-and-how-spotify-works/“ • User selects track • If cached, play from there • Else • Request first 15secs from servers. • Search P2P network for remainder of song.
  • 46. Real World P2P • Spotify’s P2P Network - Works like BitTorrent, using server-side trackers and network queries to locate peers. Returned peers are those that can support playback. Predictable listening habits - Most users listen to the same music multiple times or listen to albums. Makes predictive caching possible, reducing network traffic.

Editor's Notes

  1. Development in a controlled environment Allows for highlighting of functionality: Means that development can be undertaken on the targeted functionality.
  2. Testing specific functionality in a clean environment: May indicate strengths/weaknesses. May be applicable to real work scenarios.
  3. OverSwarm - Taking inspiration from nature. Emulating natural networks, example: Pheromone trails. DHTs - Using underlying data structure of a network to more efficiently support network queries under churn. More efficient than flooding network.
  4. Distributed hash tables - BitTorrent.
  5. Gnutella