470 likes | 488 Views
Searchlight: Won't You Be My Neighbor?. Mehedi Bakht, Matt Trower, Robin Kravets Department of Computer Science University of Illinois. Is anybody out there?. Is anybody out there?. Registration services Foursquare, Facebook, Google Latitude
E N D
Searchlight: Won't You Be My Neighbor? Mehedi Bakht, Matt Trower, Robin Kravets Department of Computer Science University of Illinois Robin Kravets, University of Illinois
Is anybody out there? Robin Kravets, University of Illinois
Is anybody out there? • Registration services • Foursquare, Facebook, Google Latitude - centralized, slow, difficult to manage across apps Provides applications with absolute locations Robin Kravets, University of Illinois
Is anybody out there? • Direct mobile-to-mobile communication • QualComm AllJoyn, Nokia Sensor, Nintendo StreetPass, Sony Vita, Wi-Fi Direct +Local, reduced latency, up-to-date, user-controlled Enables applications to focus on proximity instead of absolute location! Robin Kravets, University of Illinois
Won’t you be my neighbor? • Detection Challenges • Encounters are unplanned and unpredictable • Requires constant scanning • Nodes are energy-constrained • Requires effective duty cycling • Global Synchronization is difficult • Requires asynchronous solutions ? ? ? ? ? Goal: Continuous Energy-efficient Asynchronous Neighbor Discovery Robin Kravets, University of Illinois
Energy Efficiency: Duty-cycling • Basic Discovery Idea • Time is slotted • Nodes selectively remain awake for a full slot duration • Nodes beacon at the beginning and end of an awake slot • Discovery occurs when two active slots overlap Awake slots Robin Kravets, University of Illinois
Duty-cycled Neighbor Discovery • Challenges: • Dealing with unsynchronized slots • Choosing active slots • Dealing with asymmetric duty cycles Active Slot Selection Awake slots Robin Kravets, University of Illinois
Slot Selection: Random • Birthday protocol • Randomly select a slot to wake up in with a given probability • Advantage • Good average case performance • Disadvantage • No bounds on worst-case discovery latency Cumulative Discovery Latency Long tail • Is a small delay bound really necessary? • Average discovery → Useful contact time • Worst-case → Missed contacts Fraction of Discoveries Good Avg. Case Performance Discovery Latency Robin Kravets, University of Illinois
Slot Selection: Deterministic • Disco (Sensys 2008) • Each node selects two primes p1iand p2i • Both nodes wake up every p1thand p2thslot (5th and 7th) • Guarantees discovery in p1i x p1jslots • U-Connect (IPSN 2010) • Each node selects one prime pi • Every node wakes up every pthslot and (p-1)/2 slots every p*p slots • Overlap is guaranteed within pi x pj slots Both Disco and U-Connect handle symmetric and asymmetric duty cycles Robin Kravets, University of Illinois
Slot Selection: Deterministic • Prime-based • Advantage • Strict worst-case bound • Disadvantage • Poor average-case performance • Can we get the best of both worlds • Good average discovery latency from random protocols • Good delay bound from deterministic protocols Cumulative Discovery Latency Disco U-Connect Fraction of Discoveries Birthday Discovery Latency Robin Kravets, University of Illinois
Searchlight • Approach • Have a deterministic discovery schedule that has a pseudo-random component • Consider two nodes with the same (symmetric) duty cycles • Insight • Offset between slots with fixed period remains fixed 3 slots Node A Node B B B B Robin Kravets, University of Illinois A A A
Searchlight • Approach • Have a deterministic discovery schedule that has a pseudo-random component • Consider two nodes with the same (symmetric) duty cycles • Insight • Offset between slots with fixed period remains fixed • B will fall in the first t/2 slots of A’s cycle orA will fall in the first t/2slots of B’s cycle 4 slots Node A Node B B B B 4 slots Robin Kravets, University of Illinois A A A
Searchlight • Approach • Have a deterministic discovery schedule that has a pseudo-random component • Consider two nodes with the same (symmetric) duty cycles • Insight • Offset between slots with fixed period remains fixed • B will fall in the first t/2 slots of A’s cycle orA will fall in the first t/2slots of B’s cycle 4 slots Node A Node B B B B 4 slots Robin Kravets, University of Illinois A A A
Systematic Probing • Technique • Select a fixed period t (does not need to be prime) • Keep one slot fixed (anchor slot) • Add a second “probe” slot • Objective is to meet the fixed/anchor slot of the other node • Only need to search in the range 1 to t/2 • No need to probe all t/2slots all of the time • Move around the probe slot t Node A Node B B B B Robin Kravets, University of Illinois A A A
Sequential Probing • Two slots per period t • Anchor slot: Keep one slot fixed at slot 0 • Probe slot: Move around the other slot sequentially • Guaranteed overlap in t*t/2 slots • Improved bound over existing protocols • Based on the time needed to ensure a probe-anchor overlap • But: Probe-probe overlap should also lead to discovery • Sequential scanning can result in probes “chasing” each other 1 2 3 1 2 3 2 3 1 2 Discovery through anchor-probe overlap Robin Kravets, University of Illinois
Randomized Probing • Break the pattern of chasing: • Move the probe slot randomly (A: 1-3-2; B: 3-1-2) • Pseudo-random instead of random • Each node randomly chooses a schedule for its probe slot that repeats every (t*t/2) slots • Schedules of two nodes appear random to each other • Advantage • Retains the same worst-case bound • Improves average case performance 1 3 2 1 3 3 1 2 3 1 Discovery through probe-probe overlap Robin Kravets, University of Illinois
Evaluation • Comparison Protocols • Birthday • Disco • U-Connect • Searchlight Protocols • Sequential ( Searchlight-s) • Random (Searchlight-r) • Scenarios • Symmetric and asymmetric duty cycles • Metrics • Fixed Energy • All protocols operate at the same duty cycle • Latency • Worst-case latency bound • Cumulative discovery latency • Methods • Empirical and Simulation • Implementation • Testbed of G1 android and Nokia N900 phones Robin Kravets, University of Illinois
Worst-case Latency Bound • Metric: Energy Latency Product Robin Kravets, University of Illinois
Worst-case Latency Bound • Metric: Energy Latency Product Robin Kravets, University of Illinois
Worst-case Latency Bound • Metric: Energy Latency Product Robin Kravets, University of Illinois
Worst-case Latency Bound • Metric: Energy Latency Product Robin Kravets, University of Illinois
Symmetric Duty Cycles Cumulative Discovery Latency Fraction of Discoveries Discovery Latency in Number of Slots 5% duty cycle Robin Kravets, University of Illinois
Symmetric Duty Cycles Cumulative Discovery Latency Fraction of Discoveries Discovery Latency in Number of Slots 5% duty cycle Robin Kravets, University of Illinois
Symmetric Duty Cycles Cumulative Discovery Latency Fraction of Discoveries Discovery Latency in Number of Slots 5% duty cycle Robin Kravets, University of Illinois
Symmetric Duty Cycles Cumulative Discovery Latency Fraction of Discoveries Discovery Latency in Number of Slots 5% duty cycle Robin Kravets, University of Illinois
Symmetric Duty Cycles • Searchlight does not have the long tail of other deterministic protocols • Searchlight-R performs almost as good as Birthday in the average case 820 960 Fraction of Discoveries Discovery Latency in Number of Slots Robin Kravets, University of Illinois
Handling Duty Cycle Asymmetry • Why? • Different energy requirements • Different duty cycles (different values for t) • Problem • Anchor slots no longer have constant distance Node A (period=5) Node B (period=3) Robin Kravets, University of Illinois
Handling Duty Cycle Asymmetry • Solution • Restrict choice of period to primes • Overlap of anchor slots guaranteed through Chinese remainder theorem • tneeds to be prime • Worst case latency is t1 × t2 Node A (period=5) Node B (period=3) Robin Kravets, University of Illinois
Asymmetric (1% and 5%) Cumulative Discovery Latency • Searchlight-R • Worst-case latency is worse than both Disco and U-Connect • Compensates for that by having best average case performance 82% Fraction of Discoveries Discovery Latency in Number of Slots Robin Kravets, University of Illinois
Can we do better? • Observation • When slots are not fully aligned, slots of neighboring nodes overlap more than once within bound • One overlap is sufficient for discovery! Anchor Slot Probe Slot 1 Probe Slot 2 Anchor Slot Robin Kravets, University of Illinois
Striping across the rounds • Insight • Only need to probe alternate slots • Reduces the number of active slots by almost ½! • Problem • Slot alignment Anchor Slot Probe Slot 1 Probe Slot 2 Probe Slot 3 Probe Slot 4 Anchor Slot Robin Kravets, University of Illinois
Handling Slot Alignment • Let the slots overflow a bit • Extent of overlap () depends on • Beacon transmission time • Possible clock drift 1 2 4 5 3 6 Anchor Slot Probe Slot Probe Slot Anchor Slot δ Robin Kravets, University of Illinois
Does it help? δ = amount of “overflow” beyond regular slot boundary Robin Kravets, University of Illinois
Does it help? Robin Kravets, University of Illinois
Does it help? Robin Kravets, University of Illinois
Striping and Asymmetry • Problem • Anchor slots no longer have constant distance • Striping cannot be used • Original approach • Restrict choice of t to primes • Worst-case bound worse than other deterministic protocols Robin Kravets, University of Illinois
Maintaining Constant Offset • New approach • Restrict value of the bigger period to an integer multiple of the smaller period • Other protocols also restrict the choice of values for their parameters • Only primes are allowed by Disco and U-Connect Node A (period=6) Node B (period=3) Robin Kravets, University of Illinois
Symmetric Duty Cycles Cumulative Discovery Latency Worst-case bound: 2000+ slots Fraction of Discoveries Discovery Latency in Number of Slots 5% duty cycle Robin Kravets, University of Illinois
Symmetric Duty Cycles Cumulative Discovery Latency Worst-case bound: 961 slots Fraction of Discoveries Discovery Latency in Number of Slots 5% duty cycle Robin Kravets, University of Illinois
Symmetric Duty Cycles Cumulative Discovery Latency Worst-case bound: 800 slots Fraction of Discoveries Searchlight-S Discovery Latency in Number of Slots 5% duty cycle Robin Kravets, University of Illinois
Symmetric Duty Cycles Cumulative Discovery Latency • Striped probing improves bound by almost 50% Worst-case bound: 440 slots Fraction of Discoveries Searchlight-S Discovery Latency in Number of Slots 5% duty cycle Robin Kravets, University of Illinois
Asymmetric Duty Cycles Worst-case bound: 2266 slots Fraction of Discoveries Searchlight-S Discovery Latency in Number of Slots 1%-10% duty cycle Robin Kravets, University of Illinois
Asymmetric Duty Cycles Worst-case bound: 1819 slots Fraction of Discoveries Searchlight-S Discovery Latency in Number of Slots 1%-10% duty cycle Robin Kravets, University of Illinois
Asymmetric Duty Cycles • Randomized probing does not have the same worst-case bound Fraction of Discoveries Searchlight-S Discovery Latency in Number of Slots 1%-10% duty cycle Robin Kravets, University of Illinois
Restricted Randomized Probing • Randomization across tA/2 could delay discovery • Restrict randomization based on smallest t • Impact • Same bound as sequential for asymmetric case • No effect on symmetric case Node A (period=16) 3 2 1 Node B (period=8) Robin Kravets, University of Illinois
What should I use? • Mostly symmetric duty cycles • Searchlight with restricted randomized striped probing • For any two nodes with the same duty cycle • Best average and best worst-case bound • For any two nodes with different duty cycles • Almost best average and best worst-case bound • Very diverse duty cycles • Searchlight with symmetric striped probing • Has slightly better average discovery latency Robin Kravets, University of Illinois
Searchlight: Won't You Be My Neighbor? http://mobius.cs.uiuc.edu Robin Kravets, University of Illinois