where theory meets practice · ec sensys osdi mobicom multimedia ubicomp sigcomm hotnets wireless...

67
ETH Zurich – Distributed Computing – www.disco.ethz.ch Roger Wattenhofer Sensor Networks Where Theory Meets Practice

Upload: others

Post on 10-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

ETH Zurich – Distributed Computing – www.disco.ethz.ch

Roger Wattenhofer

Sensor Networks Where Theory Meets Practice

Page 2: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Theory Meets Practice

PODC

SODA

STOCFOCS

ICALPSPAA

EC

SenSysOSDI

Mobicom

Multimedia

Ubicomp

SIGCOMM

HotNets

Page 3: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Wireless Communication?

Page 4: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Capacity!

Page 5: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

InterferenceRange

Protocol Model

ReceptionRange

Page 6: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

6

Page 7: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Physical (SINR) Model

Page 8: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical
Page 9: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Signal-To-Interference-Plus-Noise Ratio (SINR) Formula

Minimum signal-to-interference

ratio

Power level of sender u

Path-loss exponent

Noise

Distance betweentwo nodes

Received signal power from sender

Received signal power from all other nodes (=interference)

Page 10: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Example: Protocol vs. Physical Model

1m

Assume a single frequency (and no fancy decoding techniques!)

Let =3, =3, and N=10nW

Transmission powers: PB= -15 dBm and PA= 1 dBm

SINR of A at D:

SINR of B at C:

4m 2m

A B C D

Is spatial reuse possible?

NO Protocol Model

YES With power control

Page 11: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

This works in practice

… even with very simple hardware

Time for transmitting 20‘000 packets:

Speed-up is almost a factor 3

u1 u2 u3 u4 u5 u6

[Moscibroda, W, Weber, Hotnets 2006]

Page 12: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Possible Application – Hotspots in WLAN

X

Y

Z

Page 13: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Possible Application – Hotspots in WLAN

X

Y

Z

Page 14: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

The Capacity of a Network(How many concurrent wireless transmissions can you have)

Page 15: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Convergecast Capacity in Wireless Sensor Networks

15

Protocol Model

Physical Model (power control)

Max. rate in arbitrary, worst-case deployment

(1/𝑛)

(1/log3 𝑛)

Max. rate in random, uniform deployment

(1/log 𝑛)

(1/log 𝑛)

Worst-Case Capacity

Topology

Model/Power

Classic Capacity

[Giridhar, Kumar, 2005][Moscibroda, W, 2006]

Page 16: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Capacity of a Network

Classic Capacity Worst-Case Capacity

How much information can betransmitted in nice networks?

How much information can betransmitted in nasty networks?

How much information can betransmitted in any network?

Real Capacity

Page 17: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Core Capacity Problems

Given a set of arbitrary communication links

One-Shot ProblemFind the maximum size feasible subset of links

O(1) approximations for uniform power [Goussevskaia, Halldorsson, W, 2009 & 2014] as well as arbitrary power [Kesselheim, 2011]

Scheduling ProblemPartition the links into fewest possible slots, to minimize time

Open problem: Only 𝑂(log𝑛) approximation using the one-shot subroutine

Page 18: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

The Capture Effect

Page 19: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Receiving Different Senders

Page 20: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Layer 4

Layer 3

Layer 2

Layer 1

-64 dBm

-70 dBm

-75 dBm

-81 dBm

“Layer” Abstraction

[König, W, 2016]

Page 21: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Constructive Interference

Page 22: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Energy Efficiency?

Page 23: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Clock Synchronization!

Page 24: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Clock Synchronization Example: Dozer

• Multi-hop sensor network with duty cycling• 10 years of network life-time, mean energy consumption: 0.066mW• High availability, reliability (99.999%)• Many different applications use Dozer: TinyNode, PermaSense, etc.

[Burri, von Rickenbach, W, 2007]

Page 25: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Problem: Physical Reality

t

clock rate

11 + 𝜀

message delay

1 − 𝜀

Page 26: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Given a communication network

1. Each node equipped with hardware clock with drift

2. Message delays with jitter

Goal: Synchronize Clocks (“Logical Clocks”)

• Both global and local synchronization!

Clock Synchronization in Theory?

worst-case (but constant)

Page 27: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

• Time (logical clocks) should not be allowed to stand still or jump

Time Must Behave!

Page 28: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Local Skew

Tree-based Algorithms Neighborhood Algorithms

e.g. FTSP e.g. GTSP

Bad local skew

Page 29: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Synchronization Algorithms: An Example (“Amax”)

• Question: How to update the logical clock based on the messages from the neighbors?

• Idea: Minimizing the skew to the fastest neighbor

– Set clock to maximum clock value you know, forward new values immediately

• First all messages are slow (1), then suddenly all messages are fast (0)!

Time is T Time is T

Clock value:

T

Clock value:

T-1

Clock value:

T-D+1

Clock value:

T-D

Time is T

skew D

Fastest

Hardware

Clock

T T

Page 30: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Dynamic Networks![Kuhn et al., PODC 2010]

Local Skew: Overview of Results

1 logD √D D …

Everybody‘s expectation, 10 years ago („solved“)

Lower bound of logD / loglogD[Fan & Lynch, PODC 2004]

All natural algorithms [Locher et al., DISC 2006]

Blocking algorithm

Kappa algorithm[Lenzen et al., FOCS 2008]

Tight lower bound[Lenzen et al., PODC 2009]

Dynamic Networks![Kuhn et al., SPAA 2009]

together[JACM 2010]

Page 31: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Experimental Results for Global Skew

FTSP PulseSync

[Lenzen, Sommer, W, 2014]

Page 32: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Experimental Results for Global Skew

FTSP PulseSync

[Lenzen, Sommer, W, 2014]

Page 33: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Network Dynamics?

Page 34: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Distributed Control!

Page 35: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical
Page 36: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Complexity Theory

Can a Computer Solve Problem P in Time t?

Page 37: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Complexity Theory

Can a Computer Solve Problem P in Time t?

Network

Distributed

Page 38: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Complexity Theory

Can a Computer Solve Problem P in Time t?

Network

NetworkDistributed

Page 39: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Distributed (Message-Passing) Algorithms

• Nodes are agents with unique ID’s that can communicate with neighbors by sending messages. In each synchronous round, every node can send a (different) message to each neighbor.

69

17

11

10 7

Page 40: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Distributed (Message-Passing) Algorithms

• Nodes are agents with unique ID’s that can communicate with neighbors by sending messages. In each synchronous round, every node can send a (different) message to each neighbor.

• Distributed (Time) Complexity: How many rounds does problem take?

69

17

11

10 7

Page 41: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

An Example

Page 42: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How Many Nodes in Network?

Page 43: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How Many Nodes in Network?

Page 44: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How Many Nodes in Network?

Page 45: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How Many Nodes in Network?

Page 46: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How Many Nodes in Network?

Page 47: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How Many Nodes in Network?

1

1

1

1

1

1

Page 48: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How Many Nodes in Network?

2

1

1

2

1

4

1

1

1

Page 49: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How Many Nodes in Network?

With a simple flooding/echo process, a network can find the numberof nodes in time 𝑂(𝐷), where 𝐷 is the diameter (size) of the network.

2

1

1

2

1

4

1

1

1

10

Page 50: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

• Distance between two nodes = Number of hops of shortest path

Page 51: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

• Distance between two nodes = Number of hops of shortest path

Page 52: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

• Distance between two nodes = Number of hops of shortest path

• Diameter of network = Maximum distance, between any two nodes

Page 53: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

Page 54: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

Page 55: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

Page 56: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

Page 57: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

Page 58: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Diameter of Network?

Page 59: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

(even if diameter is just a small constant)

Pair of rows connected neither left nor right? Communication complexity: Transmit Θ(𝑛2) information over O(𝑛) edges Ω(𝑛) time!

[Frischknecht, Holzer, W, 2012]

Networks Cannot Compute Their Diameter in Sublinear Time!

Page 60: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

e.g., dominating set approximation in planar graphs

Distributed Complexity Classification

1 log∗ 𝑛 polylog 𝑛 𝐷 poly 𝑛

various problems in growth-bounded graphs

MIS, approx. of dominating set, vertex cover, ...

count, sum, spanning tree, ...

diameter, MST, verification of e.g. spanning tree, …

e.g., [Kuhn, Moscibroda, W, 2016]

Page 61: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

SublinearAlgorithms

Self-Stabilization

Self-Assembly

Applicationse.g. Multi-Core

Dynamic (e.g. Ad Hoc)Networks

DistributedComplexity

Page 62: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

SublinearAlgorithms

Self-Stabilization

Self-Assembly

Applicationse.g. Multi-Core

Dynamic(e.g. Ad Hoc)Networks

DistributedComplexity

Page 63: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical
Page 64: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Summary

Page 65: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

The Capture Effect

Page 66: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

How many lines of pseudo code Can you implement on a sensor node?

The best algorithm is often complexAnd will not do what one expects.

Theory models made lots of progressReality, however, they still don’t address.

My advice: invest your research £££sin ... impossibility results and lower bounds!

Theory for sensor networks, what is it good for?!

Page 67: Where Theory Meets Practice · EC SenSys OSDI Mobicom Multimedia Ubicomp SIGCOMM HotNets Wireless Communication? Capacity! Interference Range Protocol Model Reception Range 6 Physical

Thank You!Questions & Comments?

Thanks to my co-authors, mostlySilvio FrischknechtMagnus HalldorssonStephan HolzerMichael KönigChristoph LenzenThomas MoscibrodaPhilipp Sommer www.disco.ethz.ch