SlideShare a Scribd company logo
1 of 19
Download to read offline
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 modelsJordi 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 WorldIWMW
 
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 WarehouseJustin Clark-Casey
 
mlcourse.ai, introduction, course overview
mlcourse.ai, introduction, course overviewmlcourse.ai, introduction, course overview
mlcourse.ai, introduction, course overviewYury 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 StudyPROIDEA
 
Data ops in practice - Swedish style
Data ops in practice - Swedish styleData ops in practice - Swedish style
Data ops in practice - Swedish styleLars Albertsson
 
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 BriefingBenito 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 9StorPool Storage
 
Chain-Of-Thought Prompting.pptx
Chain-Of-Thought Prompting.pptxChain-Of-Thought Prompting.pptx
Chain-Of-Thought Prompting.pptxatharva553835
 
polystore_NYC_inrae_sysinfo2021-1.pdf
polystore_NYC_inrae_sysinfo2021-1.pdfpolystore_NYC_inrae_sysinfo2021-1.pdf
polystore_NYC_inrae_sysinfo2021-1.pdfRim Moussa
 
Avogadro 2 and Open Chemistry
Avogadro 2 and Open ChemistryAvogadro 2 and Open Chemistry
Avogadro 2 and Open ChemistryMarcus 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 technologiesMarlon 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 FlareDenise 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 Neo4jNeo4j
 

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

Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfOracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfSkillCertProExams
 
Breathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxBreathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxFamilyWorshipCenterD
 
OC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaOC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaRahsaan L. Browne
 
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxThe Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxMogul Press
 
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfKinben Innovation Private Limited
 
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxDAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxFamilyWorshipCenterD
 
Understanding Poverty: A Community Questionnaire
Understanding Poverty: A Community QuestionnaireUnderstanding Poverty: A Community Questionnaire
Understanding Poverty: A Community Questionnairebazilnaeem7
 
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfMicrosoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfSkillCertProExams
 
ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024SkillCertProExams
 
Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.bazilnaeem7
 

Recently uploaded (10)

Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfOracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
 
Breathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxBreathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptx
 
OC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa AnaOC Streetcar Final Presentation-Downtown Santa Ana
OC Streetcar Final Presentation-Downtown Santa Ana
 
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxThe Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
 
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
 
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxDAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
 
Understanding Poverty: A Community Questionnaire
Understanding Poverty: A Community QuestionnaireUnderstanding Poverty: A Community Questionnaire
Understanding Poverty: A Community Questionnaire
 
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfMicrosoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
 
ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024
 
Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.
 

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