VIATRA 3: A Reactive Model Transformation Platform

413 views

Published on

New VIATRA framework built on EMF powered by EMF-IncQuery (https://www.eclipse.org/incquery/) has been presented at the ICMT 2015 conference (http://www.di.univaq.it/diruscio/sites/ICMT2015/).

Published in: Software
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
413
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 6 minutes
  • VIATRA 3: A Reactive Model Transformation Platform

    1. 1. VIATRA 3: A Reactive Model Transformation Platform Gábor Bergmann, István Dávid, Ábel Hegedüs, Ákos Horváth, István Ráth, Zoltán Ujhelyi and Dániel Varró IncQuery Labs Ltd. Budapest University of Technology and Economics University of Antwerp 7/22/2015 ICMT 2015, L’Aquila, Italy 1
    2. 2. Reactive model-driven applications Interference between functions Commonalities • Queries, rules, scheduling, conflicts User interaction (modify) SRC TRG Batch transformation Incremental transformation Live validation Live views Derived features 7/22/2015 ICMT 2015, L’Aquila, Italy 2
    3. 3. Separation of concerns Reactive Transformation Framework Observed events Controlled events Actions What has changed? When to react? Perform in consistent state 7/22/2015 ICMT 2015, L’Aquila, Italy 3
    4. 4. Examples of events and actions Reactive Transformation Framework Observed events Controlled events Actions • Model modified • Match appeared • Event sequence identified • „Run” button pushed • Consistent state reached after editing • Transaction committed • Modify model • Add error marker • Update view • Send e-mail 7/22/2015 ICMT 2015, L’Aquila, Italy 4
    5. 5. Main concepts Reactive Transformation Framework Observed events Controlled events Actions • Event source • Event occurrence (type, data) • Life cycle • Jobs • Scheduler Rule specifications • Agenda • Executor • Conflict resolver 7/22/2015 ICMT 2015, L’Aquila, Italy 5
    6. 6. Query language Xtend (Java) Language example pattern someCondition( param1, param2 ) {...} val rule = createRule().precondition(someCondition). action[ match | // perform action ].build val incrRule = createRule().precondition(someCondition). lifecycle(ActivationLifecycles.incremental). action(::Appeared)[ match | // perform action]. action(::Disappeared)[ match | // perform action]. build Event data 7/22/2015 ICMT 2015, L’Aquila, Italy 6
    7. 7. Query language Xtend (Java) pattern someCondition( param1, param2 ) {...} val rule = createRule().precondition(someCondition). action[ match | // perform action ].build val incrRule = createRule().precondition(someCondition). lifecycle(ActivationLifecycles.incremental). action(::Appeared)[ match | // perform action]. action(::Disappeared)[ match | // perform action]. build Language example Rule specification 7/22/2015 ICMT 2015, L’Aquila, Italy 7
    8. 8. Query language Xtend (Java) pattern someCondition( param1, param2 ) {...} val rule = createRule().precondition(someCondition). action[ match | // perform action ].build val incrRule = createRule().precondition(someCondition). lifecycle(ActivationLifecycles.incremental). action(::Appeared)[ match | // perform action]. action(::Disappeared)[ match | // perform action]. build Language example Observed events 7/22/2015 ICMT 2015, L’Aquila, Italy 8
    9. 9. Query language Xtend (Java) pattern someCondition( param1, param2 ) {...} val rule = createRule().precondition(someCondition). action[ match | // perform action ].build val incrRule = createRule().precondition(someCondition). lifecycle(ActivationLifecycles.incremental). action(::Appeared)[ match | // perform action]. action(::Disappeared)[ match | // perform action]. build Language example Job specification 7/22/2015 ICMT 2015, L’Aquila, Italy 9
    10. 10. Query language Xtend (Java) pattern someCondition( param1, param2 ) {...} val rule = createRule().precondition(someCondition). action[ match | // perform action ].build val incrRule = createRule().precondition(someCondition). lifecycle(ActivationLifecycles.incremental). action(::Appeared)[ match | // perform action]. action(::Disappeared)[ match | // perform action]. build Language example Activation state-event transitions 7/22/2015 ICMT 2015, L’Aquila, Italy 10
    11. 11. Query language Xtend (Java) pattern someCondition( param1, param2 ) {...} val rule = createRule().precondition(someCondition). action[ match | // perform action ].build val incrRule = createRule().precondition(someCondition). lifecycle(ActivationLifecycles.incremental). action(::Appeared)[ match | // perform action]. action(::Disappeared)[ match | // perform action]. build Language example Jobs associated with event types 7/22/2015 ICMT 2015, L’Aquila, Italy 11
    12. 12. Batch transformation Event-driven transformation Activation life cycles Phases Disabled Appear Update Fire Disappear Initial Enabled Transitions Updated /updateJob /appearJobAppeared Disappeared Fired /disappearJob /action Appeared Only feature of event data object has changed 7/22/2015 ICMT 2015, L’Aquila, Italy 12
    13. 13. Conflict resolution Multiple actions available • Different activations in the same rule • Activations of different rules Which activation to execute next? Conflict resolver can be selected • Global conflict set: deals with all rules • Scoped conflict set: selected rules 7/22/2015 ICMT 2015, L’Aquila, Italy 13
    14. 14. VIATRA Features 7/22/2015 ICMT 2015, L’Aquila, Italy 14
    15. 15. EMF-IncQuery and VIATRA EMF-IncQuery • Latest release 1.0: 2015. 06. 30 (graduation) • “an incremental model query engine” New VIATRA • Latest release 0.7: 2015. 06. 30 • “an event-driven and reactive model transformation platform” • High-performance model transformation engine o built on IncQuery technology • Unique feature: o supports batch + incremental transformation o over a unified virtual machine infrastructure (EVM) • Full Java and EMF compatibility • Tightly integrated into Xtend 7/22/2015 ICMT 2015, L’Aquila, Italy 15
    16. 16. But there is more… Complex Event-Processing Engine • Specify reactions upon detecting complex sequences of events • Xtext based language Design Space Exploration Framework • Explore design candidates as models satisfying multiple criteria Model obfuscator • Remove sensitive information from confidential models Coming soon • MWE2 integration for transformation chains • Debugger for reactive transformations 7/22/2015 ICMT 2015, L’Aquila, Italy 16
    17. 17. Evaluation Performance benchmarks 7/22/2015 ICMT 2015, L’Aquila, Italy 17
    18. 18. Test scenario Different transformation variants • Batch o Simple and optimized o Plain EMF-IncQuery and VIATRA • Incremental o Change monitor based o EVM: explicit traceability and query result based (QRT) o VIATRA: query based Executions • First transformation execution • Small modification + (re)execution Scale SRC Objects SRC References TRG Objects TRG References Trace Objects Trace References SUM Objects SUM References 1 395 772 366 736 354 720 1 115 2 228 2 849 1 821 773 1 535 762 1 535 2 384 4 891 4 1 694 4 697 1 534 2 972 1 522 3 056 4 750 10 725 8 3 604 17 111 3 266 6 108 3 254 6 520 10 124 29 739 16 7 820 89 193 7 124 12 395 7 112 14 236 22 056 115 824 32 17 714 594 181 16 308 24 837 16 297 32 605 50 319 651 623 64 43 795 4 424 529 40 960 50 028 40 948 81 908 125 703 4 556 465 Different model scenarios • Industrial (presented below) • Client-Server • Publish-Subscribe Environment • New machine with 16 GB RAM Parameters • 10 GB Heap • Maximum 10 minutes execution times for complete chain Trace model’s size similar to target model 7/22/2015 ICMT 2015, L’Aquila, Italy 18
    19. 19. Runtime for first transformation Batch IncQuery + Batch VIATRA are the fastest Incremental approaches are within ~200% Logarithmic scale! 7/22/2015 ICMT 2015, L’Aquila, Italy 19
    20. 20. Modification and second transformation As expected incremental transformation does well in (re)execution Logarithmic scale! 7/22/2015 ICMT 2015, L’Aquila, Italy 20
    21. 21. Conclusions - New VIATRA Reactive Model Transformation Platform Flexibility and wide range of possible applications Performance and scalability Internal DSLs and easy integration 7/22/2015 ICMT 2015, L’Aquila, Italy 21
    22. 22. Final points 22 VIATRA • Version 0.7 is available • Generic transformation engine for batch and incremental transformation chains • http://www.eclipse.org/viatra/ The examples with all test results and more details are available form • https://github.com/IncQueryLabs/incquery-examples-cps/ Your contributions (feedback, forum posts, ideas, bugzillas, patches) are very welcome! • To what direction should we enhance the demonstrator and the VIATRA transformation API? 7/22/2015 ICMT 2015, L’Aquila, Italy

    ×