
1cfdb77176e76454a16e595dc7dddf97.ppt
- Количество слайдов: 33
On Meta-Management of Spatio-Temporal Data Goce Trajcevski Db. SN Lab Dept. of EECS Northwestern University goce@eecs. northwestern. edu Joint work with: Zachary Bischof, Oliviu Ghica, Nikoly Valtchanov, Peter Scheuermann IGERT-UIC-Sep 09
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) n Environmental (time of day, locations of Situation? attractions n time predictable attributes IGERT-UIC-Sep 09 place Unpredictable (instantaneous) attributes with continuous impact
Pre-Motivation –Combined Situational Awareness ·Nurse on duty in Assisted Living Residence · Resident experiences high temperature and manifests food poisoning ·Physician is the nearest hospital is aware and monitors ·The symptoms worsen Physician decides to send ambulance ·The number of residents with similar symptoms dramatically increases in a short time ·Not enough nurses ·Not enough physician on staff in the nearest ER ·Not enough many ambulances IGERT-UIC-Sep 09
Pre-Intro: Context-Awareness in Distributed Dynamic Settings “If an object has been continuously moving towards RI for more than 5 min. , 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”.
Outline Background n Active Databases and ECA (++) Mobility and Evolving Reactive Behavior (ECA)2 and Meta-Triggers Experimental Observations Concluding Remarks IGERT-UIC-Sep 09
Background: Active Databases Evolution = insert; delete; update (…) Integrity Constraints (IC): -Violation? Fix it ECA = Basic Paradigm of the Reactive Behavior: Triggers (AKA Active Rules) ON EVENT IF CONDITION THEN ACTION IGERT-UIC-Sep 09 seemingly straightforward, but incorporates an interplay of many semantic dimensions
Background: Active Databases Event = IMPORTANT: occurrence of an “entity of interest” detection primitive internal Condition = Action = IGERT-UIC-Sep 09 composite external Event Algebras: • E 1 E 2 (conjunction) • E 1; E 2 (sequence) • … typically, a query (SQL expression) (sequence of) SQL, mostly DML, statements
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… COST: interrupt context-switch Why not all: Condition Action? After all: -OPS-like ; -Formalisms (Temporal Logic) -Expert Systems, Deductive Databases have been around… COST: polling potential_waste… DBMS collaborates closely with, but is NOT the OS events are “seen” only through the “lens” of transactions… (e. g. , insert, delete) conditions are SQL queries (optimized) IGERT-UIC-Sep 09
Background – Triggers in Mobile Networks (TRG) Base station handover: 2 G/3 G mobile phones opt for 3 G connectivity Traffic load TRG identifies Producers and Consumer n Similar to “publishers “ and “subscribers” in ENS Serves as a “point of reference n Ensuring a consistent enforcements of rules/policies NOTE: Same entities can be both consimers (of triggers) and producers (of events) IGERT-UIC-Sep 09
Background – TRG Mobility aspects: n Routing groups formation/maintenance (e. g. , cluster-head selection) IGERT-UIC-Sep 09
Background – Tiny. DB and Triggers SQL: SELECT AVG(volume) FROM sensors WHERE floor = 6 GROUP BY room HAVING AVG(volume) > threshold SAMPLE PERIOD 30 S ECA-triggers? (so called, actuation queries) SELECT nodeid, temp FROM sensors WHERE temp > threshold OUTPUT ACTION power-on(nodeid) SAMPLE PERIOD 10 s Event-Based: ON EVENT bird-detect(loc) SELECT avg(LIGHT), AVG(temp), event. loc FROM sensors AS s WHERE dist(s. loc, event. loc) < 10 m SAMPLE PERIOD 2 s FOR 30 s IGERT-UIC-Sep 09
(ECA)2 – Evolving and Context-Aware Event-Condition-Action Active Databases n n Expert Systems (OPS 5) Events Management Triggering Engine IGERT-UIC-Sep 09 Events Notification Systems Continuous Queries Processing ·Triggers and Mobile Nodes · Tiny. DB Why/What else? Postulate: In many dynamic settings, the need for detecting a particular event(s) and/or monitoring particular conditions arises only after: 1. certain events have been detected 2. certain continuous conditions (do not) hold ·The perception of “event” and “condition” can vary (especially in distributed settings)
Meta-Management – Definition Data n tuples; objects; etc. Meta-Data n Data “about the data” n Types, Schemas, etc. Data Management n Storage/retrieval n Efficient query processing Meta-Management n n Which queries to be processed when; How to steer the data generation/gathering n And do it efficiently, with some Qo. D guarantees… IGERT-UIC-Sep 09
Evolving Reactive Behavior WHEN an object is continuously_moving_towards the region R for more than 5 min. , IF there are less then 10 jets in the base B 1, then send alert_b to the armored unit A 1. Air-Base B 1 R Also send alert_a to the infantry regiment I 1, WHEN *that* object is closer than 3 miles to R, IF all the marine units are further than 5 miles from R. To send, or not to send…
A little “algorithmic-flavor”: continuously_moving_towards R for 6 min. 1. Generate the Voronoi diagram 2. “Shoot-a-ray take-a-walk” 3. Update the time_accumulator accordingly!!! IGERT-UIC-Sep 09 F A E R B C D
Triggers for that Evolving Reactive Behavior Trigger: ON E_Moving_Towards(O, ’R’, 5, T) IF Jets_Count(‘B 1’, X, T) and X<10 AND T 1>=T AND within_event(E_Moving_Towards(O, ’R’, 5, T 1)) THEN Alert(‘b’, ’A 1’) (also): Span Consumed-by-Parent = no, Consume-Parent = no ON E_Distance(O, ’R’, 3, T 2) IF Distance(‘Marines’, ’R’, Y, T 2) AND T 2>T AND Y>=5 THEN Alert(‘a’, ’I 1’) No longer Moving-Towards Event Moving-Towards Detected IGERT-UIC-Sep 09 Distance Event Detected = CHILD OF THE ORIGINAL TRIGGER
(ECA)2 – Evolving and Context-Aware Event-Condition-Action When the body network of a resident signals readings which have been continuously approaching a threshold value for longer then 3 min. If the number of on-site physicians < number of endangered 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-Sep 09
(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 = no ON Traffic_Abnormality(T 1, V 1) IF Expected_Arrival(V 1, T 2, T 1) AND Expected Arrival(V 1, T 3, T) AND T 2 – T > 1. 5(T 3 – T 1) THEN Alert_Nearest_Hospital(Hb, 1) Event “E_Increase” detected IGERT-UIC-Sep 09 Event “E_Traffic_Abnormality”
(ECA)2 – Syntax ON Ep(VEp) <priority> validity(Tpv /Epv(VEpv)) IF Cp 1(VCp 1) within_time(Tc 1)/within_event(Ec 1(VEc 1)) THEN Ap 1(VAp 1) ELSE-IF Cp 2(VCp 2) within_time(Tc 2)/within_event(Ec 2(VEc 2)) THEN Ap 2(VAp 2). . . Span (child’) Consumed-by-Parent=<yes/no>, Consume-Parent=<yes/no> ON Ec 1(VEc 1) <priority> validity(Tc 1 v/Ec 1 v(VEc 1 v)) IF Cc 11(VCc 11) within_time(Tc 11)/within_event(Ec 11(VEc 11)) THEN Ac 11(VAc 11) ELSE-IF. . . Further nesting of children Subsequently (child’’) Consume-Parent=<yes/no> ON Es 1(VEs 1) <priority> validity(Ts 1 v/Es 1 v(VEs 1 v)) IF Cs 11(VCs 11) within_time(Ts 11)/within_event(Es 11(VEs 11)) THEN As 11(VAs 11) ELSE-IF… Further nesting of children IGERT-UIC-Sep 09
(ECA)2 and the Meta-Triggers OBSERVE: ON E_Moving_Towards(O, ’R’, 5, T) IF Jets_Count(‘B 1, X, T) and X<10 AND T 1>=T AND within_event(E_Moving_Towards(O, ’R’, 5, T 1)) THEN Alert(‘b’, ’A 1’) It is very likely that Jets_Count(‘B 1’, X, T) will be maintained by a remote server, for Whom a remote-request is nothing but an instantaneous query But, then the “local site” (monitoring “moving_towards”) will have to “ship” such queries upon every new detection… PLUS, it may miss some important changes at the airport in-between updates (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!!!) IGERT-UIC-Sep 09
(ECA)2 and the Meta-Triggers In general, initially we have a local TR 1: ON E 1 IF CRemote AND CLocal THEN A 1 Meta-Trigger (input) (output) TR 1’: ON E 1; (E-requested-remote; E-notification-from-remote) AND CLocal THEN A 1 IGERT-UIC-Sep 09 ? ? ? TR 1 -Remote: ON E-requested-remote IF CContinuous THEN A(E-notification-to-remote)
(ECA)2 and the Meta-Triggers: HOW…? ? ? WSN Programming Languages: n “borrow” the semantics from existing paradigms n Event-driven; SQL-based; Functional/dynamically typed Node-Level: n Nes. C; Tiny. Script; … n n Target individual sensors and, generally, same code running on individual nodes; Mostly imperative; executable code (Flash); flow control based on events/communication Network-Level: n Tiny. SQL – query optimization; n Tiny. Script – “more accessible” programming (dynamically typed imperative language) n SDlog – declarative networking; Datalog based (“@”; “#”) Most likely, interpreted languages (Mate’; Trickle) IGERT-UIC-Sep 09
Hypothetical Reasoning High-Level Specification (Domain-Description) Language n n Based on Action Theories (well-defined semantics) Enables hypothetical reasoning for queries Domain Description = effects of executing actions: n n A causes F 1 if Fi, Fj, …, Ek, Em, … A induces E 1 when Fl, Ft, …, Er, Es, … Plus, the expressions which define the ramifications n F = facts (i. e. , tuples) E = valid events F 1, F 2, …, E 1, E 2, … suffice_for F/E Action_Read_Radar induces Event_Location_Determined (NOTE: No Condition) Event_Location_Determined, Time_Towards_Accumulator > 5 suffice_for E_Continuously_Moving _Towards AUGMENTED WITH (ECA)2 TRIGGERS IGERT-UIC-Sep 09
Hypothetical Reasoning Basic “vehicles” are queries of the form: L after [A 1, A 2, …, An] at F 1, F 2, … E 1, E 2… Will the Fact/Event L hold in a state which is generated after the sequence of actions [A 1, A 2, …, An] is executed, starting in a state at which F 1, F 2, …, E 1, E 2, … hold? Design: experts from different domains involved Deployment: status of the system and/or impact of modifications. IGERT-UIC-Sep 09
Hypothetical Reasoning Example: Will I have sufficient defense resources if 20 objects are continuously mo towards R for more than 5 minutes within half an hour, approaching from North-West, and three of them are within 3 miles. Sufficient defense resources = More than 5 F 15 s in the air-base B 1 and more than 17 Type A 1 Marksman in the infantry unit A 1 Formally: (Count(Airplanes(F 15, B 1)) > 5 AND (Count(Infantry(A 1, Marksman)) > 17) after [ Moving_towards(X 1, 'R', 'NW', 5, T 1) AND Moving_towards(X 2, 'R', 'NW', 5, T 2) AND … Moving_towards(X 20, 'R', 'NW', 5, T 20) ] AND (T 1<T 2 … < T 20)AND (T 20 - T 1 < 30) AND [ (Distance(Xi, 'R') < 3) AND (Distance(Xj, 'R') < 3) AND (Distance(Xk, 'R') < 3) ] IGERT-UIC-Sep 09
Telos. B – Proof of Concept… IGERT-UIC-Sep 09
SID-net = Tool for hypothetical reasoning 150000 x 150000 ft 2 (500 Mica 2 Motes) IGERT-UIC-Sep 09
Simulation Observations IGERT-UIC-Sep 09
Pre-Conclusion: The “say-so” of The Network… IGERT-UIC-Sep 09
Concluding Remarks Meta-Management of Spatio-Temporal Data n n n Contexts; Evolution and Reactive Behavior with Pro-Active Consequences Meta-Triggers; Fabric vs. Thread… Ongoing Work: n n Translation to NDlog n Possible “type-extensions” Fusion with Tiny. DB n Event-Base Other popular spatio-temporal queries Uncertainty Distributed (meta) indexing IGERT-UIC-Sep 09
Thank You! IGERT-UIC-Sep 09
(ECA)2 Additional Example When a patient has been continuously moving towards the lake OR the perimeter fence for more then 5 min. If there is no nurse within 50 ft. from him Notify 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 lake Notify the nurses IGERT-UIC-Sep 09
(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) > 50 THEN Alert(Security, T) Fork: Consumed-by-Parent = no, Consume-parent = no ON E_Moving_Along(1, Patient, T 1, lake) IF Distance(Nurse, Patient, T 1) > 100 AND Distance(Security, Patient, T 1) > 10 THEN Alert(Nurse, T 1) Event “E_Moving Towards” Event “E_Moving_Along” IGERT-UIC-Sep 09
1cfdb77176e76454a16e595dc7dddf97.ppt