SlideShare a Scribd company logo
Mogwaï: a Framework to Handle
Complex Queries on Large Models
Jordi Cabot
ICREA-UOC
jordi.cabot@icrea.cat
Gwendal Daniel
Inria - Mines Nantes & Lina
gwendal.daniel@inria.fr
Gerson Sunyé
Inria - Mines Nantes & Lina
gerson.sunye@inria.fr
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 2
Introduction
● Complex and large models
– Civil Engineering
– Biology
– Reverse Engineering
● Need to provide solutions to
– Store them
– Query them efficiently
– Transform them
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 3
Model Persistence
● Default serialization mechanism: XMI
– Verbose
● Large monolithic files
– Files have to be entirely parsed
● Increases memory consumption
– No advanced features
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 4
Model Persistence
● Several solutions to overcome model persistence
limitations
– CDO, Morsa, EMF-Fragment, NeoEMF
● Problems
– Low-level model handling APIs
– Fragmented queries on the database
– Intermediate objects
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 5
Model Persistence
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
A.allInstances().name
get(a1)
get(a1,name)
...
get(an)
get(an,name)
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 6
Model Persistence
● Why don't we query directly the database?
– Manually writing database-level queries is hard
● Need to learn a new query language
● Database expertise vs. Modeling expertise
● Unknown model representation
● Solution: generate them!
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 7
Mogwaï
● Generate graph database queries from OCL expressions
● Bypass modeling framework API
● Single execution of the query
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 8
Mogwaï
● The OCL to express model queries
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
Package.allInstances()
p1.contents
p1.contents→
select(e | e.name = 'c1')
// p1
// [ c1,c2 ]
// c1
p1 : Package
name : 'p1'
c1 : Class
name : 'c1'
c2 : Class
name : 'c2'
contents contents
Package
+ name : String
Class
+ name : String
contents
*
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 9
Mogwaï
● The Gremlin Language to express database queries
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
1
class="Package"
4
name="c1"
5
name="c2"
2
class="Class"
3
name="p1"
instanceof
instanceof
instanceof
contents
contents
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 10
Mogwaï
● The Gremlin Language to express database queries
– Graph traversal DSL
– Composed of processing steps
– Generic query language for graph databases
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
g.idx(''metaclasses'')[[name:''Package'']]
.inE(''instanceOf'').outV
g.v(3).outE(''contents'').inV
g.v(3).outE(''contents'').inV
.filter{it.name = ''c1''}
// v(1)
// [v(4),v(5)]
// v(4)
1
class="Package"
4
name="c1"
5
name="c2"
2
class="Class"
3
name="p1"
instanceof
instanceof
instanceof
contents
contents
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 11
Mogwaï
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
● Translate OCL queries into Gremlin traversals
– Map OCL expressions to Gremlin steps
– Merge created steps into a (several) traversal(s)
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 12
Mogwaï
● Map OCL expressions to Gremlin steps
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
1
class="Package"
4
name="c1"
5
name="c2"
2
class="Class"
3
name="p1"
instanceof
instanceof
instanceof
contents
contents
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 13
Mogwaï
● Merge created steps into a traversal
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 14
Mogwaï
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
● OCL Transformation Example
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 15
Mogwaï
● Query generation and execution
● Delegates query computation to the database
● Returns graph elements to the persistence layer
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 16
Mogwaï
● Benchmarks
– Model containing 2 million elements
– Up to 20 times faster than other query approaches
– Consume up to 75 times less memory
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
A B
0
50
100
150
200
250
300
350
Query Execution Time (s)
IncQuery
OCL
Mogwaï
A B
0
100
200
300
400
500
600
Query Memory Consumption (MB)
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 17
Conclusion
● Model Persistence Frameworks
– Not designed to compute model queries efficiently
– Write manually database-level queries is hard
● Mogwaï Framework
– Translates OCL queries into Gremlin traversals
– Positive results
– Not adapted to small models
– Needs to be integrated
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 18
Conclusion
● Future Work
– Integration in state of the art tools
– Target other NoSQL databases / storage schema
– Use the Mogwaï to access graph databases using OCL
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 19
Questions?
• Introduction
• Model Persistence
• Mogwaï
• Conclusion
Websites / Repositories
NeoEMF: neoemf.com
Mogwaï: github.com/atlanmod/Mogwai
https://github.com/atlanmod
Thank you for your attention!
https://github.com/SOM-Research

More Related Content

Similar to Mogwaï: A Framework to Handle Complex Queries on Large Models

PrefetchML: a Framework for Prefetching and Caching models
PrefetchML: a Framework for Prefetching and Caching modelsPrefetchML: a Framework for Prefetching and Caching models
PrefetchML: a Framework for Prefetching and Caching models
Jordi Cabot
 
IWMW 2005: Publish And Be Damned Re-purposing In The Real World
IWMW 2005: Publish And Be Damned Re-purposing In The Real WorldIWMW 2005: Publish And Be Damned Re-purposing In The Real World
IWMW 2005: Publish And Be Damned Re-purposing In The Real World
IWMW
 
J2EE6_DevelopWebServices_00_Preample
J2EE6_DevelopWebServices_00_PreampleJ2EE6_DevelopWebServices_00_Preample
J2EE6_DevelopWebServices_00_PreampleMichael Mountrakis
 
Making Linked Data SPARQL with the InterMine Biological Data Warehouse
Making Linked Data SPARQL with the InterMine Biological Data WarehouseMaking Linked Data SPARQL with the InterMine Biological Data Warehouse
Making Linked Data SPARQL with the InterMine Biological Data Warehouse
Justin Clark-Casey
 
EURO Conference 2015 - Automated Timetabling
EURO Conference 2015 - Automated TimetablingEURO Conference 2015 - Automated Timetabling
EURO Conference 2015 - Automated Timetabling
Dionisio Chiuratto Agourakis
 
mlcourse.ai, introduction, course overview
mlcourse.ai, introduction, course overviewmlcourse.ai, introduction, course overview
mlcourse.ai, introduction, course overview
Yury Kashnitsky
 
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case StudyPLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PROIDEA
 
Data ops in practice - Swedish style
Data ops in practice - Swedish styleData ops in practice - Swedish style
Data ops in practice - Swedish style
Lars Albertsson
 
SWAD Timeline 4:3
SWAD Timeline 4:3SWAD Timeline 4:3
SWAD Timeline 4:3
Antonio Cañas Vargas
 
Swad Timeline
Swad TimelineSwad Timeline
Swad Timeline
Antonio Cañas Vargas
 
2017 Q2 uPortal Open Source Support Briefing
2017 Q2 uPortal Open Source Support Briefing2017 Q2 uPortal Open Source Support Briefing
2017 Q2 uPortal Open Source Support Briefing
Benito Gonzalez
 
StorPool Presents at Cloud Field Day 9
StorPool Presents at Cloud Field Day 9StorPool Presents at Cloud Field Day 9
StorPool Presents at Cloud Field Day 9
StorPool Storage
 
Chain-Of-Thought Prompting.pptx
Chain-Of-Thought Prompting.pptxChain-Of-Thought Prompting.pptx
Chain-Of-Thought Prompting.pptx
atharva553835
 
polystore_NYC_inrae_sysinfo2021-1.pdf
polystore_NYC_inrae_sysinfo2021-1.pdfpolystore_NYC_inrae_sysinfo2021-1.pdf
polystore_NYC_inrae_sysinfo2021-1.pdf
Rim Moussa
 
Avogadro 2 and Open Chemistry
Avogadro 2 and Open ChemistryAvogadro 2 and Open Chemistry
Avogadro 2 and Open Chemistry
Marcus Hanwell
 
Creating a developer pipeline by teaching gateway technologies
Creating a developer pipeline by teaching gateway technologiesCreating a developer pipeline by teaching gateway technologies
Creating a developer pipeline by teaching gateway technologies
Marlon Pierce
 
Link your Way to Successful Content Management with MadCap Flare
Link your Way to Successful Content Management with MadCap FlareLink your Way to Successful Content Management with MadCap Flare
Link your Way to Successful Content Management with MadCap Flare
Denise Kadilak
 
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
IstvanKoren
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
Neo4j
 
Why Java ?
Why Java ?Why Java ?
Why Java ?
Omar Bashir
 

Similar to Mogwaï: A Framework to Handle Complex Queries on Large Models (20)

PrefetchML: a Framework for Prefetching and Caching models
PrefetchML: a Framework for Prefetching and Caching modelsPrefetchML: a Framework for Prefetching and Caching models
PrefetchML: a Framework for Prefetching and Caching models
 
IWMW 2005: Publish And Be Damned Re-purposing In The Real World
IWMW 2005: Publish And Be Damned Re-purposing In The Real WorldIWMW 2005: Publish And Be Damned Re-purposing In The Real World
IWMW 2005: Publish And Be Damned Re-purposing In The Real World
 
J2EE6_DevelopWebServices_00_Preample
J2EE6_DevelopWebServices_00_PreampleJ2EE6_DevelopWebServices_00_Preample
J2EE6_DevelopWebServices_00_Preample
 
Making Linked Data SPARQL with the InterMine Biological Data Warehouse
Making Linked Data SPARQL with the InterMine Biological Data WarehouseMaking Linked Data SPARQL with the InterMine Biological Data Warehouse
Making Linked Data SPARQL with the InterMine Biological Data Warehouse
 
EURO Conference 2015 - Automated Timetabling
EURO Conference 2015 - Automated TimetablingEURO Conference 2015 - Automated Timetabling
EURO Conference 2015 - Automated Timetabling
 
mlcourse.ai, introduction, course overview
mlcourse.ai, introduction, course overviewmlcourse.ai, introduction, course overview
mlcourse.ai, introduction, course overview
 
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case StudyPLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
PLNOG 6: Piotr Modzelewski, Bartłomiej Rymarski - Product Catalogue - Case Study
 
Data ops in practice - Swedish style
Data ops in practice - Swedish styleData ops in practice - Swedish style
Data ops in practice - Swedish style
 
SWAD Timeline 4:3
SWAD Timeline 4:3SWAD Timeline 4:3
SWAD Timeline 4:3
 
Swad Timeline
Swad TimelineSwad Timeline
Swad Timeline
 
2017 Q2 uPortal Open Source Support Briefing
2017 Q2 uPortal Open Source Support Briefing2017 Q2 uPortal Open Source Support Briefing
2017 Q2 uPortal Open Source Support Briefing
 
StorPool Presents at Cloud Field Day 9
StorPool Presents at Cloud Field Day 9StorPool Presents at Cloud Field Day 9
StorPool Presents at Cloud Field Day 9
 
Chain-Of-Thought Prompting.pptx
Chain-Of-Thought Prompting.pptxChain-Of-Thought Prompting.pptx
Chain-Of-Thought Prompting.pptx
 
polystore_NYC_inrae_sysinfo2021-1.pdf
polystore_NYC_inrae_sysinfo2021-1.pdfpolystore_NYC_inrae_sysinfo2021-1.pdf
polystore_NYC_inrae_sysinfo2021-1.pdf
 
Avogadro 2 and Open Chemistry
Avogadro 2 and Open ChemistryAvogadro 2 and Open Chemistry
Avogadro 2 and Open Chemistry
 
Creating a developer pipeline by teaching gateway technologies
Creating a developer pipeline by teaching gateway technologiesCreating a developer pipeline by teaching gateway technologies
Creating a developer pipeline by teaching gateway technologies
 
Link your Way to Successful Content Management with MadCap Flare
Link your Way to Successful Content Management with MadCap FlareLink your Way to Successful Content Management with MadCap Flare
Link your Way to Successful Content Management with MadCap Flare
 
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
 
Why Java ?
Why Java ?Why Java ?
Why Java ?
 

Recently uploaded

Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
gharris9
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Dutch Power
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Matjaž Lipuš
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
Frederic Leger
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
amekonnen
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Dutch Power
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
kkirkland2
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
eCommerce Institute
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AwangAniqkmals
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
gharris9
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Rosie Wells
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 

Recently uploaded (19)

Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 

Mogwaï: A Framework to Handle Complex Queries on Large Models

  • 1. Mogwaï: a Framework to Handle Complex Queries on Large Models Jordi Cabot ICREA-UOC jordi.cabot@icrea.cat Gwendal Daniel Inria - Mines Nantes & Lina gwendal.daniel@inria.fr Gerson Sunyé Inria - Mines Nantes & Lina gerson.sunye@inria.fr
  • 2. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 2 Introduction ● Complex and large models – Civil Engineering – Biology – Reverse Engineering ● Need to provide solutions to – Store them – Query them efficiently – Transform them • Introduction • Model Persistence • Mogwaï • Conclusion
  • 3. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 3 Model Persistence ● Default serialization mechanism: XMI – Verbose ● Large monolithic files – Files have to be entirely parsed ● Increases memory consumption – No advanced features • Introduction • Model Persistence • Mogwaï • Conclusion
  • 4. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 4 Model Persistence ● Several solutions to overcome model persistence limitations – CDO, Morsa, EMF-Fragment, NeoEMF ● Problems – Low-level model handling APIs – Fragmented queries on the database – Intermediate objects • Introduction • Model Persistence • Mogwaï • Conclusion
  • 5. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 5 Model Persistence • Introduction • Model Persistence • Mogwaï • Conclusion A.allInstances().name get(a1) get(a1,name) ... get(an) get(an,name)
  • 6. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 6 Model Persistence ● Why don't we query directly the database? – Manually writing database-level queries is hard ● Need to learn a new query language ● Database expertise vs. Modeling expertise ● Unknown model representation ● Solution: generate them! • Introduction • Model Persistence • Mogwaï • Conclusion
  • 7. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 7 Mogwaï ● Generate graph database queries from OCL expressions ● Bypass modeling framework API ● Single execution of the query • Introduction • Model Persistence • Mogwaï • Conclusion
  • 8. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 8 Mogwaï ● The OCL to express model queries • Introduction • Model Persistence • Mogwaï • Conclusion Package.allInstances() p1.contents p1.contents→ select(e | e.name = 'c1') // p1 // [ c1,c2 ] // c1 p1 : Package name : 'p1' c1 : Class name : 'c1' c2 : Class name : 'c2' contents contents Package + name : String Class + name : String contents *
  • 9. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 9 Mogwaï ● The Gremlin Language to express database queries • Introduction • Model Persistence • Mogwaï • Conclusion 1 class="Package" 4 name="c1" 5 name="c2" 2 class="Class" 3 name="p1" instanceof instanceof instanceof contents contents
  • 10. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 10 Mogwaï ● The Gremlin Language to express database queries – Graph traversal DSL – Composed of processing steps – Generic query language for graph databases • Introduction • Model Persistence • Mogwaï • Conclusion g.idx(''metaclasses'')[[name:''Package'']] .inE(''instanceOf'').outV g.v(3).outE(''contents'').inV g.v(3).outE(''contents'').inV .filter{it.name = ''c1''} // v(1) // [v(4),v(5)] // v(4) 1 class="Package" 4 name="c1" 5 name="c2" 2 class="Class" 3 name="p1" instanceof instanceof instanceof contents contents
  • 11. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 11 Mogwaï • Introduction • Model Persistence • Mogwaï • Conclusion ● Translate OCL queries into Gremlin traversals – Map OCL expressions to Gremlin steps – Merge created steps into a (several) traversal(s)
  • 12. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 12 Mogwaï ● Map OCL expressions to Gremlin steps • Introduction • Model Persistence • Mogwaï • Conclusion 1 class="Package" 4 name="c1" 5 name="c2" 2 class="Class" 3 name="p1" instanceof instanceof instanceof contents contents
  • 13. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 13 Mogwaï ● Merge created steps into a traversal • Introduction • Model Persistence • Mogwaï • Conclusion
  • 14. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 14 Mogwaï • Introduction • Model Persistence • Mogwaï • Conclusion ● OCL Transformation Example
  • 15. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 15 Mogwaï ● Query generation and execution ● Delegates query computation to the database ● Returns graph elements to the persistence layer • Introduction • Model Persistence • Mogwaï • Conclusion
  • 16. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 16 Mogwaï ● Benchmarks – Model containing 2 million elements – Up to 20 times faster than other query approaches – Consume up to 75 times less memory • Introduction • Model Persistence • Mogwaï • Conclusion A B 0 50 100 150 200 250 300 350 Query Execution Time (s) IncQuery OCL Mogwaï A B 0 100 200 300 400 500 600 Query Memory Consumption (MB)
  • 17. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 17 Conclusion ● Model Persistence Frameworks – Not designed to compute model queries efficiently – Write manually database-level queries is hard ● Mogwaï Framework – Translates OCL queries into Gremlin traversals – Positive results – Not adapted to small models – Needs to be integrated • Introduction • Model Persistence • Mogwaï • Conclusion
  • 18. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 18 Conclusion ● Future Work – Integration in state of the art tools – Target other NoSQL databases / storage schema – Use the Mogwaï to access graph databases using OCL • Introduction • Model Persistence • Mogwaï • Conclusion
  • 19. 01/06/2016 Mogwaï: a Framework to Handle Complex Queries on Large Models - G. Daniel 19 Questions? • Introduction • Model Persistence • Mogwaï • Conclusion Websites / Repositories NeoEMF: neoemf.com Mogwaï: github.com/atlanmod/Mogwai https://github.com/atlanmod Thank you for your attention! https://github.com/SOM-Research