The AESOP FP7 project Jerker Delsing, Jens Eliasson, Per Lindgren, - - PowerPoint PPT Presentation

the aesop fp7 project
SMART_READER_LITE
LIVE PREVIEW

The AESOP FP7 project Jerker Delsing, Jens Eliasson, Per Lindgren, - - PowerPoint PPT Presentation

The AESOP FP7 project Jerker Delsing, Jens Eliasson, Per Lindgren, Pawe Pietrzak, Rumen Kyusakov, Henrik Mkitaavola, +Jonas Gustafsson, etc. 1 The AESOP FP7 project Swedish partners LKAB, MIDROC,LTU/EISLAB + ProcessIT


slide-1
SLIDE 1

1

The AESOP FP7 project

Jerker Delsing, Jens Eliasson, Per Lindgren, Paweł Pietrzak, Rumen Kyusakov, Henrik Mäkitaavola, +Jonas Gustafsson, etc.

slide-2
SLIDE 2

2

The AESOP FP7 project

  • Swedish partners

– LKAB, MIDROC,LTU/EISLAB + ProcessIT

  • European partners

– Large companies

  • Schneider
  • SAP
  • Honeywell
  • Microsoft-EMIC

– Research Organizations

  • Fho-Embden
  • IFAK
  • TUT (Tampere)
slide-3
SLIDE 3

3

The AESOP FP7 project

  • SOA Architecture

– E.g., described in Technologies for SOA-based Distributed Large Scale Process Monitoring and Control Systems (Schneider/Fr, Fho-Emden/De, LTU/Se, SAP/De, Honeywell/Cz, Microsoft-Emic/De)

  • EISLAB

– Lightweight SOA

  • 6LoWPAN, CoAP, EXI (LTU + Schneider + Ifak)
  • TinyOS+CRO -> TOSPRO scheduling (LTU)

– Complex event processing for SOA

  • CRO + CEP (LTU + Microsoft-Emic)
slide-4
SLIDE 4

4

Motivation

  • Pushing monitoring & control

down to embedded devices

Local “intelligence”

  • Inherently event-based

Control systems traditionally scan-based current trend towards event-based

  • Better responsiveness

Can act directly when an event occurs independent of scan time

  • Minimize network traffic,

save bandwidth, etc.

  • A. Colombo and S. Karnouskos, Towards the factory of the future:

A service-oriented cross-layer infrastructure, in ICT Shaping The World - A Scientific View, The European Telecommunications Standards Institute (ETSI). John Wiley and Sons Ed., April 2009, ch. 6.

Sensors ¡ Web ¡servers ¡ Feeds ¡

CEP CEP CEP CEP CEP CEP CEP CEP

Complex Analytics & Data Mining

slide-5
SLIDE 5

5

Complex | Event | Processing

  • Complex

– Made up of multiple detailed parts.

  • Event

– Something that happens

  • Processing

– A series of events to produce a result Source: Wiktionary.org

slide-6
SLIDE 6

6

Events and Complex Events

  • Basic (atomic) events

– A: church bells ringing, – B: the appearance of a man in a tuxedo with a woman in a flowing white gown, – C: rice flying through the air – Complex event: wedding? W = WHEN ALL (A, B, C)

slide-7
SLIDE 7

7

Events and Complex Events

Events may have a Duration (start/stop)

W = WHEN ALL (A, B, C) A B C W Time

slide-8
SLIDE 8

8

Complex Event Processing

  • Most applications today in Business world

– Algorithmic stock-trading – Detection of credit-card fraud.

  • Etc.

Business aspects, e.g., Microsoft

  • R. Barga, H. Caituiro-Monge, …, Event Correlation and Pattern Detection in
  • CEDR. Springer Berlin / Heidelberg, 2006, vol. 4254, pp.

Theoretical aspects, e.g., MDH

  • J. Carlson and B. Lisper, A resource-efficient event algebra Science of

Computer Programming, vol. 75, no. 12, pp. 1215–1234, December 2010.

slide-9
SLIDE 9

9

CEP vs SQL

SQL queries typically

  • “one shot” (new queries created dynamically)
  • return a result
  • operate on database (relatively static)

CEP queries typically

  • typically act as a filter (standing query)
  • produce event when matching
  • operate on streaming data (dynamic)
slide-10
SLIDE 10

10

Complex Event Processing in “Our World”

  • Combines data from multiple

sources

  • Infer events or patterns that

suggest more complicated circumstances. The goal:

  • Identify meaningful events (such as opportunities or threats)
  • Respond, either by emitting new events or taking some action.
slide-11
SLIDE 11

11

Embedded System

  • Designed for specific purpose
  • Often operating under real-time constraints
  • Limited resources

– CPU – Memory – Communication bandwidth

slide-12
SLIDE 12

12

CEDR - CRO

  • CEDR : Complex Event Detection and Response

– Query language used commercially (Microsoft) – Capture event types and order

  • CRO : Concurrent Reactive Objects

– Execution and concurrency model – React to atomic events – Between events: idle – Built in notion of time

slide-13
SLIDE 13

13

CEDR

EVENT < query name > WHEN < event expression > WHERE < correlation expression > OUTPUT< instance transformation conditions >

slide-14
SLIDE 14

14

CEDR - WHEN

  • ALL(E1 , . . . , Ek )
  • ANY(E1 , . . . , Ek )
  • SEQUENCE(E1 , . . . , Ek )
  • UNLESS(E1 , E2 , t)
  • etc.
slide-15
SLIDE 15

15

CEDR (Cont’d)

WHERE

  • Correlation between values in events payload

Example: EVENT Temperature_alarm WHEN Any(Water_temp, Air_temp) AS x WHERE x.temperature > 100 OUTPUT Alarm x.ID

slide-16
SLIDE 16

16

Concurrent Reactive Objects

  • Reactivity

– React to external stimuli or internal events

  • Objects and state encapsulation

– All states are encapsulated in objects O1, … , On

  • Message passing and specification of timing

behavior

– ASYNC(O, m, t) : Asynchronous (may be delayed) – SYNC(O,m) : Synchronous call returns with a result

  • Execution model behind the Timber language

and the TinyTimber C-code API.

slide-17
SLIDE 17

17

CRO/Timber - Example

slide-18
SLIDE 18

18

Event Processing in CRO

CEDR query into a CRO program EVENT Master_alarm WHEN UNLESS(ANY(High_temp,High_press) AS x, Button pressed , 10 seconds) (for the working example we omit payload)

slide-19
SLIDE 19

19

An Event Expression Tree

WHEN UNLESS(ANY(High_temp,High_press) AS x, Button pressed , 10 seconds)

slide-20
SLIDE 20

20

CEDR - CRO

O1 High_Temp O2 High_Temp O3 ANY O5 UNLESS O4 Button_Pressed 10 seconds WHEN UNLESS(ANY(High_temp,High_press), Button pressed , 10 seconds)

slide-21
SLIDE 21

21

CEDR - CRO

slide-22
SLIDE 22

22

Towards a Lightweight Complex Event Processing Engine for Embedded Systems

IECON 2012 : 38th Annual Conference of the IEEE Industrial Electronics Society Pawel Pietrzak, Per Lindgren, Henrik Mäkitaavola

  • Lightweight and efficient implementation in TinyTimber

(C-Code API to CRO kernel)

– Simple states, no queues (besides inside kernel) – Static structure facilitates analysis

  • Subset of CEDR rules (easily extendable)

Future work

  • Support dynamic queries
  • Support re-occurring/overlapping events
  • Support real-time constraints
slide-23
SLIDE 23

23

CEP in Monitoring and Control Systems

  • CEP for Monitoring and Control

– Powerful mechanism to process streaming data (events can be time triggered, similar to scan-based) – Inherent support for event based control – Can connect loosely coupled Systems of Systems

  • Requirements (quality)

– Accurate time of event occurrence – Bound & small delay of delivery

  • processing and communication, boils down to
  • scheduling of nodes and channels
  • data representation
slide-24
SLIDE 24

24

Challenges to solve

  • Traditional CEP only deals with time in order to

correlate events, not the time to process and deliver

  • Scheduling (prioritizing) is at best achieved through

assigning priority to a thread that process the query

– Time separated from query – Non compositional

  • D. Anicic, P. Fodor, S. …, Ep-sparql: a unified language for event processing and

stream reasoning in Proceedings of the 20th international conference on World wide web, ser. WWW ’11. New York, NY, USA: ACM, 2011, pp. 635–644.

  • R. Barga, H. Caituiro-Monge, …, Event Correlation and Pattern Detection in CEDR.

Springer Berlin / Heidelberg, 2006, vol. 4254, pp. 919–930

slide-25
SLIDE 25

25

Real-Time Complex Event Processing using Concurrent Reactive Objects

Extends our prior work to address

– non-deterministic (out of order) execution improves schedulability – reoccurring events and overlapping timing windows relaxes the assumption that a query must be restarted after completion, multiple overlapping matches can now be handled – real-time properties allows CEP processing under hard real-time requirements

slide-26
SLIDE 26

26

Our approach

  • CRO Timing model

Message should be processed within execution window Each clause (sub-expression) is associated with a message

time baseline deadline event permissible execution window execution

tbefore tafter

UNLESS5 ANY3, High temp1 High press2 Button pressed4

10s

slide-27
SLIDE 27

27

CEP encoding of unless in CRO-model

UNLESS5 ANY3, High temp1 High press2 Button pressed4

10s

  • w is the window size (in this example 10s)
  • Button_pressed operate under the deadline d1
  • d2 is the deadline for processing the unless query
  • by schdeuling the accept at w+d1 we can ensure

that outstanding Button_pressed events inside w have been processed.

  • a triggering event (ANY) will be processed within

w+d1+d2 (end-end deadline for the processing) Deadlines can be either synthesized (from top level quieries) or derived (i.e., allowing timing of external hard-/software to be accounted for.) The notion of deadlines allows timing requirements to be fully compositional.

slide-28
SLIDE 28

28

CEP encoding of unless in Timber

UNLESS5 ANY3, High temp1 High press2 Button pressed4

10s

unless e w d1 d2 = class tmr = new timer abortT := [] start = before w + d1 action after w + d1 send accept drop = before d1 action abortT := (<- tmr.sample) : abortT accept = before d2 action t = <-tmr.sample if elem True (map (inW t) abortT) then send e.drop else send e.accept abortT := (filter (inWOrL t) abortT) where inW t at = (at > t-w-d1) && (at < t-d1) inWOrL t at = at > t-w-d1-d2 result Cep {..}

slide-29
SLIDE 29

29

CEP encoding of unless in Timber

unless e w d1 d2 = class tmr = new timer abortT := [] start = before w + d1 action after w + d1 send accept drop = before d1 action abortT := (<- tmr.sample) : abortT accept = before d2 action t = <-tmr.sample if elem True (map (inW t) abortT) then send e.drop else send e.accept abortT := (filter (inWOrL t) abortT) where inW t at = (at > t-w-d1) && (at < t-d1) inWOrL t at = at > t-w-d1-d2 result Cep {..}

  • w d1 and d2 are parameters to the class
  • timing specification directly in the language,

before and after constructs

  • … rest is just implementation ….
slide-30
SLIDE 30

30

Real-Time Complex Event Processing using Concurrent Reactive Objects

  • Only a subset of CEDR rules have been

implemented but shows proof on concept

  • Differs to traditional CEP by being point-point

instead of broadcasting

  • i.e., sender is aware of listener
  • Ok for static systems (like typical ES)
  • dynamic queries requires registration of

listeners (not currently implemented)

slide-31
SLIDE 31

31

Future work: A SOA Approach to Delay and Jitter Tolerant Distributed Real-Time Complex Event Processing Accepted to:

22nd IEEE International Symposium on Industrial Electronics

Per Lindgren, Rumen Kyusakov, Jens Eliasson, Henrik Mäkitaavola, Paweł Pietrzak

  • Addresses

– Architecture for SOA and CEP in factory automation – Distributed and heterogeneous CEP processing – Real-time aspects are highlighted

  • accurate time-stamping of physical events

in a distributed system

  • end-to-end timing including communication

and CEP query processing

slide-32
SLIDE 32

32

Future Work

  • Implementation and use-case studies

– Process monitoring and control applications

  • Control in System of Systems

– Further investigate SoS CEP for control

  • Patterns/Templates for CEP in Timber

– Facilitate design of CEP queries

  • Automatic generation of CRO/Timber CEP

from domain specific language (e.g., CEDR)

slide-33
SLIDE 33

33

Further Questions

per.lindgren@ltu.se