streaming model transformations by complex event processing

47
Budapest University of Technology and Economics Fault Tolerant Systems Research Group Streaming Model Transformations by Complex Event Processing István Dávid 1,2 , István Ráth 2 , Dániel Varró 2,3 [email protected] 1 Currently at the University of Antwerp, Belgium 2 Budapest University of Technology and Economics, Hungary 3 Université de Montréal, Canada & McGill University, Canada

Upload: istvan-david

Post on 29-Nov-2014

111 views

Category:

Science


1 download

DESCRIPTION

Presentation from the MoDELS 2014 conference.

TRANSCRIPT

Page 1: Streaming Model Transformations by Complex Event Processing

Budapest University of Technology and EconomicsFault Tolerant Systems Research Group

Streaming Model Transformationsby Complex Event Processing

István Dávid1,2, István Ráth2, Dániel Varró2,3

[email protected]

1Currently at the University of Antwerp, Belgium2Budapest University of Technology and Economics, Hungary3Université de Montréal, Canada & McGill University, Canada

Page 2: Streaming Model Transformations by Complex Event Processing

Motivation

Scalability is a key challenge in the state-of-the-art

Streaming models and transformations

o Native (or natural) streams

o Artificial (generated) streams

o Streaming transformations for live models

• Rapidly changing models

“a special kind of transformation in which the whole input model isnot completely available at the beginning of the transformation, butit is continuously generated”

Sánchez Cuadrado, J., Lara, J.: Streaming model transformations:Scenarios, challenges and initial solutions (2013) In Duddy, K.,Kappel, G., eds.: Theory and Practice of Model Transformations.Volume 7909 of Lecture Notes in Computer Science. Springer BerlinHeidelberg (2013) 116

Page 3: Streaming Model Transformations by Complex Event Processing

Motivation

Scalability is a key challenge in the state-of-the-art

Streaming models and transformations

o Native (or natural) streams

o Artificial (generated) streams

o Streaming transformations for live models

• Rapidly changing models

Page 4: Streaming Model Transformations by Complex Event Processing

Gesture recognition by live models

HW/SW stack for optical input: Kinect+jnect

Objectives

Capture postures

Identify gestures as series of postures

Define actions (transformations) on gestures

Page 5: Streaming Model Transformations by Complex Event Processing

Gesture recognition by live models

HW/SW stack for optical input: Kinect+jnect

Objectives

Capture postures

Identify gestures as series of postures

Define actions (transformations) on gestures

A live model in the background @25FPS

Page 6: Streaming Model Transformations by Complex Event Processing

Gesture recognition by live models

HW/SW stack for optical input: Kinect+jnect

Objectives

Capture postures

Identify gestures as series of postures

Define actions (transformations) on gestures

A live model in the background @25FPSStreaming model == Stream of change events

Page 7: Streaming Model Transformations by Complex Event Processing

Contributions

Language for Streaming MT

• Complex Event Processing Language

• Streaming Transformation Rules

Runtime for Streaming MT

• Execution semantics

• Prototype tooling

Feasibility study

• Case study

• Experimental evaluation

Page 8: Streaming Model Transformations by Complex Event Processing

Contributions

Language for Streaming MT

• Complex Event Processing Language

• Streaming Transformation Rules

Runtime for Streaming MT

• Execution semantics

• Prototype tooling

Feasibility study

• Case study

• Experimental evaluation

Page 9: Streaming Model Transformations by Complex Event Processing

Changes vs Events

Page 10: Streaming Model Transformations by Complex Event Processing

Structural Model Changes

Page 11: Streaming Model Transformations by Complex Event Processing

Structural Model Changes

Page 12: Streaming Model Transformations by Complex Event Processing

Structural Model Changes

Page 13: Streaming Model Transformations by Complex Event Processing

Structural Model Changes

Page 14: Streaming Model Transformations by Complex Event Processing

Structural Model ChangesViolates well-formednessconstraint (captured by a graph pattern: „circular”)

circular()

Page 15: Streaming Model Transformations by Complex Event Processing

Structural Model ChangesViolates well-formednessconstraint (captured by a graph pattern: „circular”)

circular()

Remove a generalization (ANY)

Page 16: Streaming Model Transformations by Complex Event Processing

Structural Model Changes

Change-driven transformations (CDT): react to

compound changes

Violates well-formednessconstraint (captured by a graph pattern: „circular”)

circular()

Remove a generalization (ANY)

Page 17: Streaming Model Transformations by Complex Event Processing

Structural Model ChangesViolates well-formednessconstraint (captured by a graph pattern: „circular”)

Remove the LASTgeneralization

circular()

Remove a generalization (ANY)

Change-driven transformations (CDT): react to

compound changes

Page 18: Streaming Model Transformations by Complex Event Processing

Change Events

Page 19: Streaming Model Transformations by Complex Event Processing

Change Events

Page 20: Streaming Model Transformations by Complex Event Processing

Change Events

newGen(A, B)-> newGen(B, C)-> newGen(C, A)

Page 21: Streaming Model Transformations by Complex Event Processing

Change Events

newGen(A, B)-> newGen(B, C)-> newGen(C, A)

Complex event: specific sequence of atomic events

Page 22: Streaming Model Transformations by Complex Event Processing

Change Events

newGen(A, B)-> newGen(B, C)-> newGen(C, A)

Complex event: specific sequence of atomic events

Page 23: Streaming Model Transformations by Complex Event Processing

Change Events

newGen(A, B)-> newGen(B, C)-> newGen(C, A)

Complex event: specific sequence of atomic events

Remove the LASTgeneralization

Page 24: Streaming Model Transformations by Complex Event Processing

A key issue

newGen(A, B)-> newGen(B, C)-> newGen(C, A)

How to detect more complex change events?

Page 25: Streaming Model Transformations by Complex Event Processing

A key issue

newGen(A, B)-> newGen(B, C)-> newGen(C, A)

How to detect more complex change events?

Page 26: Streaming Model Transformations by Complex Event Processing

A key issue

newGen(A, B) ->newGen(B, C) ->newGen(C, A)

newGen(A, B)-> ………-> newGen(C, A)

How to detect more complex change events?

Too many atomic events to process in the execution phase

Too many events to work with in design

phase

It would be nice to “pre-filter” the events

to work with

Page 27: Streaming Model Transformations by Complex Event Processing

Streaming transformations by CEP

newGen(A, B)-> ………-> newGen(C, A)

Page 28: Streaming Model Transformations by Complex Event Processing

Streaming transformations by CEPUse also compound changes in complex event sequences!

newGen(A, B)-> ………-> newGen(C, A)

circular()

newGen(x, A)-> circular(A)

Page 29: Streaming Model Transformations by Complex Event Processing

Streaming transformations by CEPUse also compound changes in complex event sequences!

newGen(x, A)-> circular(A)

Page 30: Streaming Model Transformations by Complex Event Processing

Streaming transformations by CEPUse also compound changes in complex event sequences!

newGen(x, A)-> circular(A)

Page 31: Streaming Model Transformations by Complex Event Processing

Streaming transformations by CEP

newGen(x, A)-> circular(A)

Use also compound changes in complex event sequences!

Page 32: Streaming Model Transformations by Complex Event Processing

Gesture recognition by live models

HW/SW stack for optical input: Kinect+jnect

Objectives

Capture postures

Identify gestures as series of postures

Define actions (transformations) on gestures

Graph patterns Complex event patterns

Page 33: Streaming Model Transformations by Complex Event Processing

Gesture recognition by live models

HW/SW stack for optical input: Kinect+jnect

Objectives

Capture postures

Identify gestures as series of postures

Define actions (transformations) on gestures

Graph patterns Complex event patterns

http://bit.ly/eclipsecon-kinect

Page 34: Streaming Model Transformations by Complex Event Processing

Analogy

State space spanned by the model snapshots

„Step” to next snapshot (length 1)

Page 35: Streaming Model Transformations by Complex Event Processing

Analogy

State space spanned by the model snapshots

„Jump” to an arbitrary snapshot (length n)

Page 36: Streaming Model Transformations by Complex Event Processing

Analogy

State space spanned by the model snapshots

„Walk” of steps

„Walk” ofsteps + jumps

Page 37: Streaming Model Transformations by Complex Event Processing

Contributions

Language for Streaming MT

• Complex Event Processing Language

• Streaming Transformation Rules

Runtime for Streaming MT

• Execution semantics

• Prototype tooling

Feasibility study

• Case study

• Experimental evaluation

Page 38: Streaming Model Transformations by Complex Event Processing

Prototype tooling

Execution environment

Define graph patterns

Define (complex)

event patterns

Define actions (streaming

transformations)

reuses

reuses

Page 39: Streaming Model Transformations by Complex Event Processing

Prototype tooling

Execution environment

EMF-IncQueryDefine

(complex) event patterns

Define actions (streaming

transformations)

reuses

reuses

Page 40: Streaming Model Transformations by Complex Event Processing

Prototype tooling

Execution environment

EMF-IncQuery VEPL/CEP

Define actions (streaming

transformations)

reuses

reuses

VEPL: VIATRA Event Processing Language

Page 41: Streaming Model Transformations by Complex Event Processing

Prototype tooling

Execution environment

EMF-IncQuery VEPL/CEP

VEPL/Actions

reuses

reuses

VEPL: VIATRA Event Processing Language

Page 42: Streaming Model Transformations by Complex Event Processing

Prototype tooling

Execution environment

EMF-IncQuery VEPL/CEP

VEPL/Actions

reuses

reuses

Page 43: Streaming Model Transformations by Complex Event Processing

Prototype tooling

VIATRA-CEP

EMF-IncQuery VEPL/CEP

VEPL/Actions

reuses

reuses

.org/viatra2

Page 44: Streaming Model Transformations by Complex Event Processing

Contributions

Language for Streaming MT

• Complex Event Processing Language

• Streaming Transformation Rules

Runtime for Streaming MT

• Execution semantics

• Prototype tooling

Feasibility study

• Case study

• Experimental evaluation

Page 45: Streaming Model Transformations by Complex Event Processing

Performance assessment

Stress test

o 2.9GHz processor, 4GB RAM

o The theoretical upper limit of processing performance

• Events should be processed faster than the new ones are generated

• Otherwise the system would saturate

EVENT STREAM VIATRA-CEP

replay

Graph patterns, complex event

patterns

Page 46: Streaming Model Transformations by Complex Event Processing

Performance assessment

Stress test

o 2.9GHz processor, 4GB RAM

o The theoretical upper limit of processing performance

• Events should be processed faster than the new ones are generated

• Otherwise the system would saturate

EVENT STREAM VIATRA-CEP

replay

Graph patterns, complex event

patterns

-theoretical upper limit: 24 bodies-approximately 24 000 complex events/sec-approximately 150 000 atomic events/sec

Page 47: Streaming Model Transformations by Complex Event Processing

Conclusions