Upload
piers-mcbride
View
213
Download
0
Embed Size (px)
Citation preview
Optimization for Atlas Re-active Engine
Dunam Kim, Hokyu Kang, Yangbae Park
Table of Contents
Introduction
• The problems of the basic RE– PUSH only– Too much energy consumption
• Our objectives– To reduce accessing sensors– To fix minor bugs of the basic RE
Evaluation Shortcut
• Finding optimized execution plan of pulling events
• Steps– Enumerate all possible query-evaluation
plans• All possible sequences of evaluation of atomic
events(terminal events)• Equivalent Rules
– Compute the cost for the plans• Probability of each events
– Pick up the plan having the minimum cost
Evaluation Shortcut (cont’d)
• Probability Model– P(event1) = # Occurrence / # Observation– P(~event1) = 1 - P(event1)– P(event1 ∧ event2) = P(event1) * P(event2)
• Example– P(S1(0,100)) * 1 + P(~S1(0,100)) * P(~S2(0,50))
* 2 + P(~S1(0,100)) * P(S2(0,50)) * 3– [S1,S2,S3], [S1,S2,S3]– [S2,S1,S3],[S2,S3,S1]– [S3,S1,S2],[S3,S2,S1]
Evaluation Shortcut (cont’d)• Formal Representation of Cost Calculation
– n• size of atomic events in forms of S(Number) or S[Number, Number]. n is 3 in
the previous example.
– Integer x • truth value for each sensing event• x = 011 for [S1(0,100) = FALSE, S2(0,50) = TRUE, S3(0,50) = TRUE]
– M(x)• minimum number of evaluation for the case x, x = 100 for [S1(0,100) = TRUE,
S2(0,50) = FALSE, S3(0,50) = FALSE]
– Pi• probability that ith sensing event is true.• For [S1(0,100), S2(0,50), S3(0,50)], P2 = P(S2(0,50))
– B(x, i) • ith bit value of integer x
B(x, i) = (x >> (n-i)) bitwise & 1
– Expected number of evaluation of sensing event is
Cache System
Atlas Client (Reactive Engine)
History Manager
Cache Manager
Database
Cache System (cont’d)
• Data History Manager– Stores all received data on the database• MySQL + JDBC Driver
– Provides statistical functions• The number of reports in certain period• Average time interval• Range• Standard Deviation• Probability of event
Cache System (cont’d)
• Cache Manager– Tracks each sensor’s stability• Timestamps• Values
– Controls PUSH/PULL mode of a sensor• Additive Increase Multiplicative Decrease al-
gorithm
– Updates out-of-date caches
Cache System (cont’d)
1 2 3 4 5 6 7 8 9 10 11 12 130
20
40
60
80
100
120
Traditional PUSH mode
value
Time
Valu
e
Cache System (cont’d)
0 5 10 15 20 25 30 35 400
20
40
60
80
100
120
Dynamic PULL mode(Additive Increase)
value
Time
Valu
e
Cache System (cont’d)
0 5 10 15 20 25 30 35 400
20
40
60
80
100
120
Dynamic PULL mode(Additive Increase)
value
Time
Valu
e