peersim - maximum and minimum functions using aggregation protocol
TRANSCRIPT
PeerSim
Speakers: Daniyar Mukhanov & Maneshka Paiva
P2P
Peer-to-peer
Decentralised connection
Application
Parallelizable
Content management
Collaborative
PeerSim
Configuration
Objective Create maximum and minimum functions using the Aggregate Protocol
Aggregation protocol
About Aggregation protocol
● A protocol that allows computation of average,minimum and maximum functions
● Each node holds a numeric value
● Each node knows its neighbor’s node values
Average function● Divide the sum of the
current node and neighbor’s node by 2
● The average is computed at each node in each cycle
Maximum Function● Computes the maximum
value between a node’s value and its neighbor’s values
Codes for max
Computing Max
Config File
MaxObserver
Returns the maximum value of the nodes in cycle
Returns the number of occurrences of maximum value
From Console
Prints the maximum value and the maximum data counts
Minimum Function● Computes the minimum
value between a node’s value and its neighbour’s values
Codes for Min
Computing Min
Config File
MinObserver
Returns the minimum value of the nodes in cycle
Returns the number of occurrences of minimum value
From Console
Prints the maximum value and the maximum data counts
Exploring Observer File Further
What does it do?
Included a print statement in observer file to view what value is been added to stats
Result?Value at each node was
obtained from the protocol
Pros
❏ Platform independent
❏ Composed of cycle driven and event driven simulation engines
❏ This allows it to be scalable(CD) and dynamic(ED)
❏ High configurability
Cons❏ Poor documentation
❏ Code is difficult to understand at first
Thank you!
questions?