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ï Framework Handles 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ï Framework Handles 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

Quality by design.. ppt for RA (1ST SEM
Quality by design.. ppt for  RA (1ST SEMQuality by design.. ppt for  RA (1ST SEM
Quality by design.. ppt for RA (1ST SEMCharmi13
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxAsifArshad8
 
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRRINDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRRsarwankumar4524
 
cse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitycse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitysandeepnani2260
 
proposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerproposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerkumenegertelayegrama
 
Application of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxApplication of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxRoquia Salam
 
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptxerickamwana1
 
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Sebastiano Panichella
 
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityDon't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityApp Ethena
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...漢銘 謝
 
Internship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SEInternship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SESaleh Ibne Omar
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRachelAnnTenibroAmaz
 
General Elections Final Press Noteas per M
General Elections Final Press Noteas per MGeneral Elections Final Press Noteas per M
General Elections Final Press Noteas per MVidyaAdsule1
 
A Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air CoolerA Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air Coolerenquirieskenstar
 
Chizaram's Women Tech Makers Deck. .pptx
Chizaram's Women Tech Makers Deck.  .pptxChizaram's Women Tech Makers Deck.  .pptx
Chizaram's Women Tech Makers Deck. .pptxogubuikealex
 
GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE
 
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...Sebastiano Panichella
 

Recently uploaded (17)

Quality by design.. ppt for RA (1ST SEM
Quality by design.. ppt for  RA (1ST SEMQuality by design.. ppt for  RA (1ST SEM
Quality by design.. ppt for RA (1ST SEM
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
 
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRRINDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
 
cse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitycse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber security
 
proposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerproposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeeger
 
Application of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxApplication of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptx
 
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
 
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
 
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityDon't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
 
Internship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SEInternship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SE
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
 
General Elections Final Press Noteas per M
General Elections Final Press Noteas per MGeneral Elections Final Press Noteas per M
General Elections Final Press Noteas per M
 
A Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air CoolerA Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air Cooler
 
Chizaram's Women Tech Makers Deck. .pptx
Chizaram's Women Tech Makers Deck.  .pptxChizaram's Women Tech Makers Deck.  .pptx
Chizaram's Women Tech Makers Deck. .pptx
 
GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024
 
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
 

Mogwaï Framework Handles 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