180 likes | 363 Views
WS-ECA : An ECA Rule Description Language for Ubiquitous Services Computing. Seung-Kyun Han Digital Interactions Lab. Seoul National University, Korea jackleg83@gmail.com. Jonghun Park Digital Interactions Lab. Seoul National University, Korea jonghun@snu.ac.kr. Kang Chan Lee
E N D
WS-ECA: An ECA Rule Description Language for Ubiquitous Services Computing Seung-Kyun Han Digital Interactions Lab. Seoul National University, Korea jackleg83@gmail.com Jonghun Park Digital Interactions Lab. Seoul National University, Korea jonghun@snu.ac.kr Kang Chan Lee Protocol Eng. Center ETRI, Korea chan@etri.re.kr Jae-Yoon Jung ASRI Seoul National University, Korea jjyjung@gmail.com
Contents 1. Introduction 2. WS-ECA Language 3. The Framework of WS-ECA 4. Example 5. Rule Conflict Detection 6. Conclusions
Mobile Automobile Service Office SIM SD MMC ♪ Infra Info IC Card Personal Info Home Shop E-Tower Game DVC STB TV Map Info Digital Contents PC Audio DVD Telephone Outdoor SD MMC SD MMC Introduction – Ubiquitous Computing Environments How to coordinate ? Source: ETRI (Electronics and Telecommunications Research Institute), 2006
Ubiquitous Web Services Any Devices Any Network Any Service Introduction – Ubiquitous Computing Environments Source: ETRI (Electronics and Telecommunications Research Institute), 2006
We need to… • Make the devices web-services enabled • Use open standards • Provide event chaining mechanism Introduction – limitations Focus on device ONLY Define their own protocol & device description standard No support coordination
1 3 5 Conditional response & event filtering Temporal reaction Transitive rule 2 4 Event forwarding/broadcasting/multicasting Logical expression of events and actions Introduction – Requirements of New Language Adopt Event-Condition-Action Mechanism
WS-ECA Language – ECA Overview • General structure of ECA Rule • Examples of ECA Rules • (conditional response) • on e1 if c1 do a1 • on e1 if c2 do a2 • (transitive property) on e1 if c1 do{on e2 if c2 do a2} • Rule 1: on e1 if c1 do a1 (e1’) cf.action a1 generate internal event e1’ • Rule 2: on e1’^e2 if c2 do a2 • (logical operation) • Event on(e1^e2) | e3 if c1 do a1 • Condition on e1 if c1|(c2^~c3) do a1 • Action on e1 if c1 do a1|(a2^a3) onevent if condition do action
WS-ECA Language – WS-ECA • WS-ECA Rules • Variables • Event • primitive & composite events • Condition • Action • primitive & composite actions WS-ECA Rules Variables Device variables Event variables ECA Rule Events Time events Event Service events External events Condition Internal events Action Actions Generate intEvent Generate extEvent Invoke Service
Event Primitive internal external absolute Time periodic relative service before after Composite disjunction conjunction sequential negation WS-ECA Language – Event • Event • triggers a rule
WS-ECA Language – Condition • Condition • boolean statement • XPath expression • Variables • specific elements of an event • state of device • Extension functions • getVariable • getDateTime <condition expression="/alarm/today/@holiday='no'"/> Variable device variable event variable
Action Primitive invokeService createExtEvent createIntEvent Composite disjunction conjunction WS-ECA Language – Action • Actions • instructions executed when a triggered rule is activated
Event sources WS-ECA Rules Variables Device variables Device WS-Eventing Web service providers Event variables ECA Rule WS-ECA Rules WS-ECA Rules WS-ECA Rules Events Time events Event Services Service events Service invocation External events Condition Internal events Action Device Actions WS-Eventing WS-ECA Rules WS-ECA Rules WS-ECA Rules Generate intEvent Generate extEvent Invoke Service Services Service invocation The Framework of WS-ECA • WS-Eventing & SOAP • Use XML-Family standards • Web services in devices
Alarm Clock • Event: ‘get-up time’ event, ‘n minutes before get-up time’ event • Rice Cooker • Event: State of the cooker (‘out-of-rice’ and ‘cook_completion’) • Service: cook • Coffee Maker • Service: make coffee Example –“morning cook service” • A user set the get-up time to 7:00 AM on the alarm clock before sleeping. • The clock informs the rice cooker of ’20 minutes before get-up’. • The cooker starts to cook, and if rice is not enough, it alerts to the user at his/her get-up time. • When the cook is completed, the cooker informs the coffee maker, and the coffee maker will start to prepare a morning coffee after 10 minutes.
svcEvent(before cook()) if rice is not enough cook() intEvent(out_of_rice) extEvent(20min before ‘get-up’) svcEvent(after cook()) extEvent(‘getting-up’) if cooking is completed alert() extEvent(cook_completion) extEvent(get-up) after intEvent(out_of_rice) timeEvent (10min after cook_completion & getting-up) invokeService(makeCoffee()) Example –“morning cook service” get-up time=7:00AM alarm.xml
Rule Conflict Detection • ECA Rules in Ubiquitous Service Devices • WS-ECA rules can be defined by multiple users and registered to distributed devices. • Some rules may have discrepancies with each other and they may cause conflicts. • Service Constraints • a set of service invocation actions that are not allowed to occur at the same time. e.g. 1) radio.turnUp() & radio.turnDown() e.g. 2) heater.trunOn() & air conditioner.turnOn() • Global Rule Manager (GRM) • analyzing the defined rules for devices at build-time • resolving any rule conflicts at run-time
Rule Conflict Detection • Static Conflict • triggering rules cause a conflict • detect & resolve at build-time e.g.) rule 1: on e1 if c1 do radio.turnOn(); rule2: on e1 if c1 do radio.turnOff(); • Dynamic Conflict • triggering rules MAY cause a conflict • detect & resolve at run-time e.g.) rule 1: on e1∧e2 if c1 do radio.turnOn(); rule 2: on e1∧e3 if c1 do radio.turnDown(); Flowchart of rule generation and execution
Conclusions • ECA Rules in Ubiquitous Service Computing • WS-ECA: Rule description Language • Advantages of WS-ECA in Ubiquitous Computing • Active functionality of service devices • Stateless and light interaction • Decentralized rule processing based on ECA rules • Future Work • Develop conflict detection and resolution algorithm • Make language standard
Thank You ! Seung-Kyun Han Digital Interactions Lab. Seoul National University, Korea jackleg83@gmail.com Jonghun Park Digital Interactions Lab. Seoul National University, Korea jonghun@snu.ac.kr Kang Chan Lee Protocol Eng. Center ETRI, Korea chan@etri.re.kr Jae-Yoon Jung ASRI Seoul National University, Korea jjyjung@gmail.com