Date post: | 17-Jan-2016 |
Category: |
Documents |
Upload: | mervin-chambers |
View: | 214 times |
Download: | 0 times |
IGERT-UIC-Sep09
On Meta-Management of On Meta-Management of Spatio-Temporal DataSpatio-Temporal Data
Goce TrajcevskiDbSN Lab
Dept. of EECSNorthwestern University
[email protected] work with:Zachary Bischof, Oliviu Ghica, Nikoly Valtchanov, Peter Scheuermann
IGERT-UIC-Sep09
Pre-Motivation
Context: Any information pertaining to a given situation that can be used to characterize the entities of interest – e.g., GUIDE project
Personal (location, interests, preferred meals) Environmental (time of day, locations of attractions
time place
predictable attributes
Unpredictable (instantaneous) attributes with continuous impact
Situation?
IGERT-UIC-Sep09
Pre-Motivation –Combined Situational Awareness
Nurse on duty in Assisted Living Residence Resident experiences high temperatureand manifests food poisoningPhysician is the nearest hospital is aware andmonitors
The number of residents with similar symptomsdramatically increases in a short timeNot enough nursesNot enough physician on staff in the nearest ERNot enough many ambulances
The symptoms worsen Physician decides to send ambulance
Pre-Intro: Context-Awareness in Distributed Dynamic Settings
“If an object has been continuously moving towards RI for more than 5min., begin tracking it with at least 2 cameras when it gets closer than 100 yards.
Subsequently, if that object is identified as human carrying a bag, maximize the focus of the closest camera, and transmit its stream to the monitor in the closest patrol vehicle”.
IGERT-UIC-Sep09
OutlineOutline
Background Active Databases and ECA (++)
Mobility and Evolving Reactive Behavior
(ECA)2 and Meta-Triggers
Experimental Observations
Concluding Remarks
IGERT-UIC-Sep09
Background: Active Databases
ECA = Basic Paradigm of the Reactive Behavior:Triggers (AKA Active Rules)
ON EVENTIF CONDITIONTHEN ACTION
seemingly straightforward,but incorporates an interplayof manysemantic dimensions
Evolution = insert; delete; update (…)
Integrity Constraints (IC):-Violation? Fix it
IGERT-UIC-Sep09
Background: Active Databases
Event =
Condition =
Action =
occurrence of an “entity of interest”
primitive composite
internal external Event Algebras:• E1 E2 (conjunction)• E1; E2 (sequence)• …
typically, a query (SQL expression)
(sequence of) SQL, mostly DML, statements
IMPORTANT: detection
IGERT-UIC-Sep09
Background – Active Databases
Why ECA?
Why not all: Event Action?
After all: -Composite Events
-Formalisms (AKA Algebras)-Detection “tools” (e.g., Petri Nets)-Interval vs. Instantaneous
-ENS have been around…
Why not all: Condition Action?
After all: -OPS-like ;
-Formalisms (Temporal Logic)-Expert Systems, Deductive Databases have been around…
COST: interrupt context-switch
COST: polling potential_waste…
DBMS collaborates closely with, but is NOT the OS events are “seen” only through the “lens” oftransactions… (e.g., insert, delete) conditions are SQL queries (optimized)
IGERT-UIC-Sep09
Background – Triggers in Mobile Networks (TRG)
TRG identifies Producers and Consumer Similar to “publishers “ and “subscribers” in
ENS
Serves as a “point of reference Ensuring a consistent enforcements of
rules/policiesNOTE: Same entities can be both consimers (of triggers) and producers (of events)
Base station handover: 2G/3G mobile phones opt for 3G connectivity Traffic load
IGERT-UIC-Sep09
Background – TRG
Mobility aspects: Routing groups formation/maintenance (e.g., cluster-head selection)
VSN-enabled vehic le
Inter-vehic lecommunications
Vehicle-to-roadsidecommunications
Roadside base station
Video Chem.
Sensors
Storage
Systems
Proc.
IGERT-UIC-Sep09
Background – TinyDB and Triggers
SELECT AVG(volume)FROM sensorsWHERE floor = 6GROUP BY roomHAVING AVG(volume) > thresholdSAMPLE PERIOD 30S
SQL:
ON EVENT bird-detect(loc)SELECT avg(LIGHT), AVG(temp), event.locFROM sensors AS sWHERE dist(s.loc, event.loc) < 10mSAMPLE PERIOD 2s FOR 30s
Event-Based:
ECA-triggers?(so called, actuation queries)
SELECT nodeid, tempFROM sensorsWHERE temp > thresholdOUTPUT ACTION power-on(nodeid)SAMPLE PERIOD 10s
IGERT-UIC-Sep09
(ECA)2 – Evolving and Context-Aware Event-Condition-Action
Active Databases Expert Systems (OPS5) Events Management
Events Notification Systems Continuous Queries ProcessingTriggers and Mobile Nodes TinyDB Why/What else?
Triggering EnginePostulate: In many dynamic settings, the need for detecting a particular event(s) and/or monitoring particularconditions arises only after: 1. certain events have been detected2. certain continuous conditions (do not) holdThe perception of “event” and“condition” can vary (especially indistributed settings)
IGERT-UIC-Sep09
Meta-Management – Definition
Data tuples; objects; etc.
Meta-Data Data “about the data”
Types, Schemas, etc.
Data Management Storage/retrieval Efficient query processing
Meta-Management Which queries to be processed when; How to steer the data generation/gathering
And do it efficiently, with some QoD guarantees…
Evolving Reactive Behavior
WHEN an object is continuously_moving_towardsthe region R for more than 5 min., IF there are lessthen 10 jets in the base B1, then send alert_b tothe armored unit A1.
Air-Base B1
R
Also send alert_a to the infantry regimentI1, WHEN *that* object is closer than 3miles to R, IF all the marine units arefurther than 5 miles from R.
To send, or not to send…
IGERT-UIC-Sep09
A little “algorithmic-flavor”: continuously_moving_towards R for 6 min.
RB
C D
E
FA1. Generate the Voronoi diagram2. “Shoot-a-ray take-a-walk”3. Update the time_accumulator accordingly!!!
IGERT-UIC-Sep09
Triggers for that Evolving Reactive Behavior
Trigger:
ON E_Moving_Towards(O,’R’,5,T)
IF Jets_Count(‘B1’,X,T) and X<10 AND T1>=T
AND within_event(E_Moving_Towards(O,’R’,5,T1))
THEN Alert(‘b’,’A1’)
(also): Span Consumed-by-Parent = no, Consume-Parent = no
ON E_Distance(O,’R’,3,T2)
IF Distance(‘Marines’,’R’,Y,T2) AND T2>T AND Y>=5
THEN Alert(‘a’,’I1’)
EventMoving-TowardsDetected
Distance Event Detected = CHILD OF THE ORIGINAL TRIGGER
No longer Moving-Towards
IGERT-UIC-Sep09
(ECA)2 – Evolving and Context-Aware Event-Condition-Action
When the body network of a resident signals readings which have been continuously approachinga threshold value for longer then 3 min.
If the number of on-site physicians < number ofendangered residents
Notify the nearest k hospitals, requesting emergency vehicles with/without physicians
Subsequently, When some of the k ambulances en-route experiences heavy traffic congestion, If the delay in the expected arrival time is > 50% (with respect to the original arrival time)Notify another hospital, requesting emergency vehicle…
IGERT-UIC-Sep09
(ECA)2 – Evolving and Context-Aware Event-Condition-Action
ON E_Increase(Signal,3, patient_i, T)IF Physician_Count(T,m) AND Endangered_Patients(T,n) AND m < n AND within_validity(Signal,patient_i)THEN Alert_Nearest_Hospitals(Ha,k)
Fork:Consumed-by-Parent = yes, Consume-parent = noON Traffic_Abnormality(T1,V1)IF Expected_Arrival(V1,T2,T1) AND Expected Arrival(V1,T3,T) AND T2 – T > 1.5(T3 – T1)THEN Alert_Nearest_Hospital(Hb,1)
Event “E_Increase” detectedEvent “E_Traffic_Abnormality”
IGERT-UIC-Sep09
(ECA)2 – Syntax
ON Ep(VEp) <priority> validity(Tpv /Epv(VEpv)) IF Cp1(VCp1) within_time(Tc1)/within_event(Ec1(VEc1)) THEN Ap1(VAp1) ELSE-IF Cp2(VCp2) within_time(Tc2)/within_event(Ec2(VEc2)) THEN Ap2(VAp2) ..... Span (child’) Consumed-by-Parent=<yes/no>, Consume-Parent=<yes/no> ON Ec1(VEc1) <priority> validity(Tc1v/Ec1v(VEc1v))
IF Cc11(VCc11) within_time(Tc11)/within_event(Ec11(VEc11)) THEN Ac11(VAc11) ELSE-IF ...
Subsequently (child’’) Consume-Parent=<yes/no> ON Es1(VEs1) <priority> validity(Ts1v/Es1v(VEs1v))
IF Cs11(VCs11) within_time(Ts11)/within_event(Es11(VEs11)) THEN As11(VAs11) ELSE-IF…
Further nesting of children
Further nesting of children
IGERT-UIC-Sep09
(ECA)2 and the Meta-Triggers
ON E_Moving_Towards(O,’R’,5,T)IF Jets_Count(‘B1,X,T) and X<10 AND T1>=T AND within_event(E_Moving_Towards(O,’R’,5,T1))THEN Alert(‘b’,’A1’)
OBSERVE:
It is very likely that Jets_Count(‘B1’,X,T)will be maintained by a remote server, for Whom a remote-request is nothing butan instantaneous query
But, then the “local site” (monitoring “moving_towards”) willhave to “ship” such queries upon every new detection…PLUS, it may miss some important changes at the airport in-betweenupdates (pull-mode)
REMEDY: 1. Tell the remote site to make the query continuous; 2. Tell the remote site to setup a trigger for certain values of that continuous query 3. “Remember” locally that now instead of asking the query for the condition, you are actually expecting an arrival of an event from the airport database (push mode!!!)(push mode!!!)
IGERT-UIC-Sep09
(ECA)2 and the Meta-Triggers
In general, initially we have a localTR1:ON E1IF CRemote AND CLocal
THEN A1
Meta-Trigger
TR1’:ON E1; (E-requested-remote; E-notification-from-remote)
AND CLocal
THEN A1
(input)
TR1-Remote:ON E-requested-remoteIF CContinuous
THEN A(E-notification-to-remote)
(output)
???
IGERT-UIC-Sep09
(ECA)2 and the Meta-Triggers: HOW…???
WSN Programming Languages: “borrow” the semantics from existing paradigms
Event-driven; SQL-based; Functional/dynamically typed
Node-Level: NesC; TinyScript;…
Target individual sensors and, generally, same code running on individual nodes;
Mostly imperative; executable code (Flash); flow control based on events/communication
Network-Level: TinySQL – query optimization; TinyScript – “more accessible” programming (dynamically typed
imperative language) SDlog – declarative networking; Datalog based (“@”; “#”)
Most likely, interpreted languages (Mate’; Trickle)
IGERT-UIC-Sep09
Hypothetical Reasoning
High-Level Specification (Domain-Description) Language Based on Action Theories (well-defined semantics) Enables hypothetical reasoning for queries
Domain Description = effects of executing actions: A causes F1 if Fi, Fj, …, Ek, Em,… A induces E1 when Fl, Ft, …, Er, Es, …
Plus, the expressions which define the ramifications F1, F2, …, E1, E2, … suffice_for F/E
AUGMENTED WITH (ECA)2 TRIGGERS
F = facts (i.e., tuples)E = valid events
Action_Read_Radar induces Event_Location_Determined (NOTE: No Condition)
Event_Location_Determined, Time_Towards_Accumulator > 5 suffice_for E_Continuously_Moving _Towards
IGERT-UIC-Sep09
Hypothetical Reasoning
Basic “vehicles” are queries of the form:
Will the Fact/Event L hold in a state which is generated after the sequence of actions [A1, A2, …, An] is executed, starting in a state at which F1, F2, …, E1, E2, … hold?
L after [A1,A2,…,An] at F1, F2, … E1, E2…
Design: experts from different domains involved
Deployment: status of the system and/or impact of modifications.
IGERT-UIC-Sep09
Hypothetical Reasoning
Example:
Formally:
Will I have sufficient defense resources if 20 objects are continuously moving towards R for more than 5 minutes within half an hour, approaching from North-West, and three of them are within 3 miles.
(Count(Airplanes(F15,B1)) > 5 AND (Count(Infantry(A1,Marksman)) > 17) after [ Moving_towards(X1,'R','NW',5,T1) AND Moving_towards(X2,'R','NW',5,T2) AND … Moving_towards(X20,'R','NW',5,T20) ] AND (T1<T2 … < T20)AND (T20 - T1 < 30) AND [ (Distance(Xi,'R') < 3) AND (Distance(Xj,'R') < 3) AND (Distance(Xk,'R') < 3) ]
Sufficient defense resources = More than 5 F15s in the air-base B1 and more than 17 Type A1 Marksman in the infantry unit A1
IGERT-UIC-Sep09
TelosB – Proof of Concept…
IGERT-UIC-Sep09
SID-net = Tool for hypothetical reasoning
150000x150000 ft2
(500 Mica2 Motes)
IGERT-UIC-Sep09
Simulation Observations
IGERT-UIC-Sep09
Pre-Conclusion: The “say-so” of The Network…
IGERT-UIC-Sep09
Concluding Remarks
Meta-Management of Spatio-Temporal Data Contexts; Evolution and Reactive Behavior with Pro-Active Consequences Meta-Triggers;
Fabric vs. Thread…
Ongoing Work: Translation to NDlog
Possible “type-extensions” Fusion with TinyDB
Event-Base
Other popular spatio-temporal queriesUncertainty
Distributed (meta) indexing
IGERT-UIC-Sep09
Thank You!
IGERT-UIC-Sep09
(ECA)2 Additional Example
When a patient has been continuously moving towardsthe lake OR the perimeter fence for more then 5 min.If there is no nurse within 50 ft. from himNotify the security personnel
Subsequently, When that person has been continuously moving along the lake for more than 1 min.If there is no nurse or security within 100 ft. from the lakeNotify the nurses
IGERT-UIC-Sep09
(ECA)2 – Additional Example
ON E_Moving_Towards(5, Patient, T, lake) OR E_Moving_Towards(5, Patient, T, fence) IF Distance(Nurse, Patient, T) > 50THEN Alert(Security, T)
Fork:Consumed-by-Parent = no, Consume-parent = noON E_Moving_Along(1,Patient,T1, lake)IF Distance(Nurse,Patient,T1) > 100 AND Distance(Security,Patient,T1) > 100THEN Alert(Nurse, T1)
Event “E_Moving Towards”Event “E_Moving_Along”