alma mater studiorum – universita di bologna alma mater studiorum – universita di bologna...

47
ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Upload: deasia-carbonell

Post on 31-Mar-2015

229 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

Gossipping in Bologna

Gossipping in Bologna

Ozalp Babaoglu

Page 2: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 2Leiden Meeting

BackgroundBackground

• 2003: Márk Jelasity brings the gossipping gospel to Bologna from Amsterdam

• 2003-2006: We get good milage from gossipping in the context of Project BISON

• 2005-present: Continue to get milage in the context of Project DELIS

Page 3: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 3Leiden Meeting

What have we done?What have we done?

• We have used gossipping to obtain fast, robust, decentralized solutions for• Aggregation• Overlay topology management• Heartbeat synchronization• Cooperation in selfish environments

Page 4: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 4Leiden Meeting

CollaboratorsCollaborators

• Márk Jelasity

• Alberto Montresor

• Gianpaolo Jesi

• Toni Binci

• David Hales

• Stefano Arteconi

Page 5: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu Leiden Meeting

Proactive gossip frameworkProactive gossip framework

// active threaddo forever wait(T time units) q = SelectPeer() push S to q pull Sq from q

S = Update(S,Sq)

// passive threaddo forever (p,Sp) = pull * from * push S to p S = Update(S,Sp)

Page 6: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 6Leiden Meeting

Proactive gossip frameworkProactive gossip framework

• To instantiate the framework, need to define• Local state S• Method SelectPeer()• Style of interaction

▴ push-pull

▴ push

▴ pull

• Method Update()

Page 7: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

#1Aggregation

#1Aggregation

Page 8: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 8Leiden Meeting

Gossip framework instantiationGossip framework instantiation

• Style of interaction: push-pull

• Local state S: Current estimate of global aggregate

•Method SelectPeer(): Single random neighbor

•Method Update(): Numerical function defined according to desired global aggregate (arithmetic/geometric mean, min, max, etc.)

Page 9: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 9Leiden Meeting

Exponential convergence of averagingExponential convergence of averaging

Page 10: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 10

Leiden Meeting

Properties of gossip-based aggregationProperties of gossip-based aggregation

• In gossip-based averaging, if the selected peer is a globally random sample, then the variance of the set of estimates decreases exponentially

• Convergence factor:

E( i1

2 )

E( i2)

1

2 e0.303

Page 11: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 11

Leiden Meeting

Robustness of network size estimationRobustness of network size estimation

1000 nodes crash at the beginning of each cycle

Page 12: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 12

Leiden Meeting

Robustness of network size estimationRobustness of network size estimation

20% of messages are lost

Page 13: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

#2Topology Management

#2Topology Management

Page 14: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 14

Leiden Meeting

Gossip framework instantiationGossip framework instantiation

• Style of interaction: push-pull

• Local state S: Current neighbor set

•Method SelectPeer(): Single random neighbor

•Method Update(): Ranking function defined according to desired topology (ring, mesh, torus, DHT, etc.)

Page 15: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 15

Leiden Meeting

Mesh ExampleMesh Example

Mesh.mov

Page 16: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 16

Leiden Meeting

Sorting exampleSorting example

Line.mov

Page 17: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 17

Leiden Meeting

Exponential convergence - timeExponential convergence - time

Page 18: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu Leiden Meeting

Exponential convergence - network sizeExponential convergence - network size

Page 19: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

#3Heartbeat Synchronization

#3Heartbeat Synchronization

Page 20: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 20

Leiden Meeting

Synchrony in natureSynchrony in nature

• Nature displays astonishing cases of synchrony among independent actors• Heart pacemaker cells• Chirping crickets• Menstrual cycle of women living together• Flashing of fireflies

• Actors may belong to the same organism or they may be parts of different organisms

Page 21: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 21

Leiden Meeting

Coupled oscillatorsCoupled oscillators

• The “Coupled oscillator” model can be used to explain the phenomenon of “self-synchronization”

• Each actor is an independent “oscillator”, like a pendulum

• Oscillators coupled through their environment • Mechanical vibrations• Air pressure• Visual clues• Olfactory signals

• They influence each other, causing minor local adjustments that result in global synchrony

Page 22: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 22

Leiden Meeting

FirefliesFireflies

• Certain species of (male) fireflies (e.g., luciola pupilla) are known to synchronize their flashes despite:• Small connectivity (each firefly has a small number of

“neighbors”)• Communication not instantaneous• Independent local “clocks” with random initial periods

Page 23: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 23

Leiden Meeting

Gossip framework instantiationGossip framework instantiation

• Style of interaction: push

• Local state S: Current phase of local oscillator

•Method SelectPeer(): (small) set of random neighbors

•Method Update(): Function to reset the local oscillator based on the phase of arriving flash

Page 24: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 24

Leiden Meeting

Experimental resultsExperimental results

fireflies.mov

Page 25: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 25

Leiden Meeting

Exponential convergenceExponential convergence

Page 26: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA 

#4Cooperation in Selfish

Environments

#4Cooperation in Selfish

Environments

Page 27: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 27

Leiden Meeting

OutlineOutline

• P2P networks are usually open systems• Possibility to free-ride• High levels of free-riding can seriously degrade global

performance

• A gossip-based algorithm can be used to sustain high levels of cooperation despite selfish nodes

• Based on simple “copy” and “rewire” operations

Page 28: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 28

Leiden Meeting

Gossip framework instantiationGossip framework instantiation

• Style of interaction: pull

• Local state S: Current utility, strategy and neighborhood within an interaction network

•Method SelectPeer(): Single random sample

•Method Update(): Copy strategy and neighborhood if the peer is achieving better utility

Page 29: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 29

Leiden Meeting

A

“Copy” strategy

SLAC Algorithm: “Copy and Rewire”SLAC Algorithm: “Copy and Rewire”

B

CA

D

E F

H

JK

G

Compare utilities

“Rewire”

Page 30: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 30

Leiden Meeting

A

“Mutate” strategy

A

SLAC Algorithm: “Mutate”SLAC Algorithm: “Mutate”

B

C

D

E F

H

JK

G

Drop current links

Link to random node

Page 31: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 31

Leiden Meeting

Prisoner’s DilemmaPrisoner’s Dilemma

• Prisoner’s Dilemma in SLAC• Nodes play PD with neighbors chosen randomly in the interaction

network• Only pure strategies (always C or always D)• Strategy mutation: flip current strategy• Utility: average payoff achieved

Page 32: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 32

Leiden Meeting

Cycle 180: Small defective clustersCycle 180: Small defective clusters

Page 33: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 33

Leiden Meeting

Cycle 220: Cooperation emergesCycle 220: Cooperation emerges

Page 34: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 34

Leiden Meeting

Cycle 230:Cooperating cluster starts to break apart

Cycle 230:Cooperating cluster starts to break apart

Page 35: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 35

Leiden Meeting

Cycle 300: Defective nodes isolated, small cooperative clusters formed

Cycle 300: Defective nodes isolated, small cooperative clusters formed

Page 36: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 36

Leiden Meeting

Phase transition of cooperationPhase transition of cooperation%

of c

oo

pe

ratin

g n

od

es

Page 37: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 37

Leiden Meeting

Broadcast ApplicationBroadcast Application

• How to communicate a piece of information from a single node to all other nodes

• While:• Minimizing the number of messages sent (MC)• Maximizing the percentage of nodes that receive the message

(NR)• Minimizing the elapsed time (TR)

Page 38: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 38

Leiden Meeting

Broadcast ApplicationBroadcast Application

• Given a network with N nodes and L links• A spanning tree has MC = N• A flood-fill algorithm has MC = L

• For fixed networks containing reliable nodes, it is possible to use an initial flood-fill to build a spanning tree from any node

• Practical if broadcasting initiated by a few nodes only

• In P2P applications this is not practical due to network dynamicity and the fact that all nodes may need to broadcast

Page 39: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 39

Leiden Meeting

The broadcast gameThe broadcast game

• Node initiates a broadcast by sending a message to each neighbor

• Two different node behaviors determine what happens when they receive a message for the first time:• Pass: Forward the message to all neighbors• Drop: Do nothing

• Utilities are updated as follows:• Nodes that receive the message gain a benefit β• Nodes that pass the message incur a cost γ• Assume β > γ > 0, indicating nodes have an incentive to receive

messages but also an incentive to not forward them

Page 40: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 40

Leiden Meeting

1000-node static random network1000-node static random network

Page 41: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 41

Leiden Meeting

1000-node high churn network1000-node high churn network

Page 42: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 42

Leiden Meeting

Fixed random networkFixed random network

Average over 500 broadcasts x 10 runs

Page 43: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 43

Leiden Meeting

High churn networkHigh churn network

Average over 500 broadcasts x 10 runs

Page 44: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 44

Leiden Meeting

Some food for thoughtSome food for thought

• What is it that makes a protocol “gossip based”?• Cyclic execution structure (whether proactive or reactive)• Bounded information exchange per peer, per cycle• Bounded number of peers per cycle• Random selection of peer(s)

Page 45: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 45

Leiden Meeting

Some food for thoughtSome food for thought

• Bounded information exchange per peer, per round implies• Information condensation — aggregation

• Is aggregation the mother of all gossip protocols?

Page 46: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu 46

Leiden Meeting

Some food for thoughtSome food for thought

• Is exponential convergence a universal characterization of all gossip protocols?

• No, depends on the properties of the peer selection step

• What are the minimum properties for peer selection that are necessary to guarantee exponential convergence?

Page 47: ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA ALMA MATER STUDIORUM – UNIVERSITA DI BOLOGNA Gossipping in Bologna Ozalp Babaoglu

Babaoglu Leiden Meeting

Gossip versus evolutionary computing Gossip versus evolutionary computing

• What is the relationship between gossip and evolutionary computing?

• Is one more powerful than the other? Are they equal?