Post on 29-Nov-2014
description
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
davidi@inf.mit.bme.hu
1Currently at the University of Antwerp, Belgium2Budapest University of Technology and Economics, Hungary3Université de Montréal, Canada & McGill University, Canada
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
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
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
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
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
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
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
Changes vs Events
Structural Model Changes
Structural Model Changes
Structural Model Changes
Structural Model Changes
Structural Model ChangesViolates well-formednessconstraint (captured by a graph pattern: „circular”)
circular()
Structural Model ChangesViolates well-formednessconstraint (captured by a graph pattern: „circular”)
circular()
Remove a generalization (ANY)
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)
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
Change Events
Change Events
Change Events
newGen(A, B)-> newGen(B, C)-> newGen(C, A)
Change Events
newGen(A, B)-> newGen(B, C)-> newGen(C, A)
Complex event: specific sequence of atomic events
Change Events
newGen(A, B)-> newGen(B, C)-> newGen(C, A)
Complex event: specific sequence of atomic events
Change Events
newGen(A, B)-> newGen(B, C)-> newGen(C, A)
Complex event: specific sequence of atomic events
Remove the LASTgeneralization
A key issue
newGen(A, B)-> newGen(B, C)-> newGen(C, A)
How to detect more complex change events?
A key issue
newGen(A, B)-> newGen(B, C)-> newGen(C, A)
How to detect more complex change events?
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
Streaming transformations by CEP
newGen(A, B)-> ………-> newGen(C, A)
Streaming transformations by CEPUse also compound changes in complex event sequences!
newGen(A, B)-> ………-> newGen(C, A)
circular()
newGen(x, A)-> circular(A)
Streaming transformations by CEPUse also compound changes in complex event sequences!
newGen(x, A)-> circular(A)
Streaming transformations by CEPUse also compound changes in complex event sequences!
newGen(x, A)-> circular(A)
Streaming transformations by CEP
newGen(x, A)-> circular(A)
Use also compound changes in complex event sequences!
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
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
Analogy
State space spanned by the model snapshots
„Step” to next snapshot (length 1)
Analogy
State space spanned by the model snapshots
„Jump” to an arbitrary snapshot (length n)
Analogy
State space spanned by the model snapshots
„Walk” of steps
„Walk” ofsteps + jumps
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
Prototype tooling
Execution environment
Define graph patterns
Define (complex)
event patterns
Define actions (streaming
transformations)
reuses
reuses
Prototype tooling
Execution environment
EMF-IncQueryDefine
(complex) event patterns
Define actions (streaming
transformations)
reuses
reuses
Prototype tooling
Execution environment
EMF-IncQuery VEPL/CEP
Define actions (streaming
transformations)
reuses
reuses
VEPL: VIATRA Event Processing Language
Prototype tooling
Execution environment
EMF-IncQuery VEPL/CEP
VEPL/Actions
reuses
reuses
VEPL: VIATRA Event Processing Language
Prototype tooling
Execution environment
EMF-IncQuery VEPL/CEP
VEPL/Actions
reuses
reuses
Prototype tooling
VIATRA-CEP
EMF-IncQuery VEPL/CEP
VEPL/Actions
reuses
reuses
.org/viatra2
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
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
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
Conclusions