SlideShare a Scribd company logo
1 of 14
Download to read offline
Gremlin-ATL: a Scalable Model
Transformation Framework
Gwendal DANIEL
Inria, IMT Atlantique, LS2N
gwendal.daniel@inria.fr
Frédéric JOUAULT
ESEO
frederic.jouault@eseo.fr
Gerson SUNYE
Inria, IMT Atlantique, LS2N
gerson.sunye@inria.fr
Jordi CABOT
ICREA - UOC
jordi.cabot@icrea.cat
Introduction
• Complex and large models
• Civil Engineering
• Biology
• Reverse Engineering
• Need to provide solutions to
• Store large models
• Efficiently query them
• Compute complex transformations
2G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Model Persistence
• Default serialization mechanism: XMI
• Scalable model persistence frameworks
• Use databases to store models
• Relational: CDO
• NoSQL: Morsa, NeoEMF
• Low memory footprint
3G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Modeling API
Modeling
Framework
DatabaseModeler
Model Persistence
API Call1
…
API Calln
Model
Transformation
Transformation
Engine
Modeling
Framework
Database
rule myRule {
from pp : In!Person
to ee: Out!Entity (
name <- p.name
)
}
get(pp1)
get(pp1, name)
create(ee1, Entity)
set(ee1, name)
…
get(ppn)
get(ppn, name)
create(een, Entity)
set(een, name)
Typical Model
Transformation Tool
Under the hood
4
Low-level modeling API
→ Not aligned with the
database capabilities
Fragmented queries
→ Not efficient
→ Remote database
Intermediate objects
→ Memory consumption
→ Execution time overhead
G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Model Persistence
• Not efficient to compute model queries and transformations
• Why can’t we write database queries manually?
• Modern persistence frameworks typically rely on NoSQL databases
• Multiple query languages, data representation, etc
• Low-level queries are hard to understand and maintain
• Modeling expertise vs. Database expertise
• Solution: generate them!
5G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Gremlin-ATL
• Generate database queries from model transformations
• Bypass modeling framework APIs
• Benefit of all the query capabilities of the backend
6
ATLtoGremlin
Transformation
Gremlin
Traversal
DatabaseATL Transformation
G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
rule myRule {
from pp : In!Person
to ee: Out!Entity (
name <- pp.name
)
}
g.idx(‘’metaclasses’’)[[name:Person]].transform{
ee = g.createVertex(Entity);
e.addEdge(‘’instanceof’’,
g.idx(‘’metaclasses’’)[[name:Entity]]
ee.name = it.name
}.iterate();
Database
Gremlin-ATL
Transformation Tool
Under the hood
Gremlin-ATL
• Input: ATL
• Well-known in the modeling
community
• Hybrid language
• Transformation rules
• Embeds OCL
rule myRule {
from pp : In!Person (
not pp.name.isEmpty()
)
to ee : Out!Entity(
name ← pp.name
}
7G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Gremlin-ATL
• Output: Gremlin
• Multi-database query language
• Graph traversals
• Easily extensible
• Native Neo4j support, OrientDB …
• NeoEMF/Graph
g.idx(‘metaclasses’)[[name:Person]].inE(‘instanceOf’).outV
.filter{!it.name.isEmtpy()}
.transform{
ee = g.createVertex();
ee.addEdge(‘instanceOf’, g.idx(‘metaclasses’)[[name:Entity]]);
ee.name = it.name;
}.iterate()
8G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
rule myRule {
from pp : In!Person (
not pp.name.isEmpty()
)
to ee : Out!Entity(
name ← pp.name
)
}
Gremlin-ATL
• 3 steps process
• Map ATL constructs to their Gremlin equivalent
• Merge the created Gremlin constructs into a script
• Send the script to the database
9
g.idx(‘metaclasses’)[[name:Person]].inE(‘instanceOf’).outV
.filter{!it.name.isEmtpy()}
.transform{
ee = g.createVertex();
ee.addEdge(‘instanceOf’, g.idx(‘metaclasses’)[[name:Entity]]);
ee.name = it.name;
}.iterate()
G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Evaluation
10
0
50000
100000
150000
200000
250000
300000
set1 set2 set3 set4
Java2KDM Execution Time (ms)
ATL Gremlin-ATL
OutOfMemory
G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Models containing 6000 to 3,5M elements
Java2KDM Transformation
NeoEMF/Graph
Evaluation
11G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Models containing 6000 to 3,5M elements
Java2KDM Transformation
NeoEMF/Graph
0
100
200
300
400
500
600
set1 set2 set3 set4
Java2KDM Memory Consumption (MB)
ATL Gremlin-ATL
OutOfMemory
Conclusion
• Benefits
• No query fragmentation / intermediate objects
• Positive results on large models
• Extensible architecture (see our article)
• Drawbacks
• Less efficient than existing solutions for small / in-memory models
• Need to be manually integrated
• Tightly coupled to the model persistence framework
12G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Conclusion
• Future Work
• Extend our mapping
• Reuse schema inferrence approaches
• Ease the integration of other persistence frameworks / data sources
• Gremlin-ATL to express data migration operations
• Promising results on the Neo4j panama paper database (see our article)
13G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
Question?
Thank you for your attention!
Websites / Repositories
NeoEMF: neoemf.com
Gremlin-ATL: github.com/atlanmod/mogwai
https://github.com/SOM-Research
https://github.com/AtlanMod
14G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework

More Related Content

Similar to Gremlin-ATL: a Scalable Model Transformation Framework

Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital.AI
 
Tensors Are All You Need: Faster Inference with Hummingbird
Tensors Are All You Need: Faster Inference with HummingbirdTensors Are All You Need: Faster Inference with Hummingbird
Tensors Are All You Need: Faster Inference with HummingbirdDatabricks
 
Deep learning and streaming in Apache Spark 2.2 by Matei Zaharia
Deep learning and streaming in Apache Spark 2.2 by Matei ZahariaDeep learning and streaming in Apache Spark 2.2 by Matei Zaharia
Deep learning and streaming in Apache Spark 2.2 by Matei ZahariaGoDataDriven
 
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017StampedeCon
 
Object- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkObject- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkESUG
 
IncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudIncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudGábor Szárnyas
 
functional groovy
functional groovyfunctional groovy
functional groovyPaul King
 
Introduction to c_plus_plus
Introduction to c_plus_plusIntroduction to c_plus_plus
Introduction to c_plus_plusSayed Ahmed
 
Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)Sayed Ahmed
 
Multiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier DominguezMultiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier DominguezBig Data Spain
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Doris Chen
 
Multi-model Databases and Tightly Integrated Polystores
Multi-model Databases and Tightly Integrated PolystoresMulti-model Databases and Tightly Integrated Polystores
Multi-model Databases and Tightly Integrated PolystoresJiaheng Lu
 
Finding Your Place in the Cosmos - Azure Cosmos DB
Finding Your Place in the Cosmos - Azure Cosmos DBFinding Your Place in the Cosmos - Azure Cosmos DB
Finding Your Place in the Cosmos - Azure Cosmos DBEric Potter
 
Schema management with Scalameta
Schema management with ScalametaSchema management with Scalameta
Schema management with ScalametaLars Albertsson
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.pptDevliNeeraj
 

Similar to Gremlin-ATL: a Scalable Model Transformation Framework (20)

Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
 
Tensors Are All You Need: Faster Inference with Hummingbird
Tensors Are All You Need: Faster Inference with HummingbirdTensors Are All You Need: Faster Inference with Hummingbird
Tensors Are All You Need: Faster Inference with Hummingbird
 
Deep learning and streaming in Apache Spark 2.2 by Matei Zaharia
Deep learning and streaming in Apache Spark 2.2 by Matei ZahariaDeep learning and streaming in Apache Spark 2.2 by Matei Zaharia
Deep learning and streaming in Apache Spark 2.2 by Matei Zaharia
 
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
 
Object- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkObject- Relational Persistence in Smalltalk
Object- Relational Persistence in Smalltalk
 
IncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudIncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the Cloud
 
functional groovy
functional groovyfunctional groovy
functional groovy
 
Introduction to c_plus_plus
Introduction to c_plus_plusIntroduction to c_plus_plus
Introduction to c_plus_plus
 
Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)Introduction to c_plus_plus (6)
Introduction to c_plus_plus (6)
 
MDE in Practice
MDE in PracticeMDE in Practice
MDE in Practice
 
Multiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier DominguezMultiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier Dominguez
 
Templates
TemplatesTemplates
Templates
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
Multi-model Databases and Tightly Integrated Polystores
Multi-model Databases and Tightly Integrated PolystoresMulti-model Databases and Tightly Integrated Polystores
Multi-model Databases and Tightly Integrated Polystores
 
Finding Your Place in the Cosmos - Azure Cosmos DB
Finding Your Place in the Cosmos - Azure Cosmos DBFinding Your Place in the Cosmos - Azure Cosmos DB
Finding Your Place in the Cosmos - Azure Cosmos DB
 
Schema management with Scalameta
Schema management with ScalametaSchema management with Scalameta
Schema management with Scalameta
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 

Recently uploaded

Early Modern Spain. All about this period
Early Modern Spain. All about this periodEarly Modern Spain. All about this period
Early Modern Spain. All about this periodSaraIsabelJimenez
 
miladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxmiladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxCarrieButtitta
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringSebastiano Panichella
 
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.KathleenAnnCordero2
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSebastiano Panichella
 
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC  - NANOTECHNOLOGYPHYSICS PROJECT BY MSC  - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC - NANOTECHNOLOGYpruthirajnayak525
 
Event 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxEvent 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxaryanv1753
 
The Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationThe Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationNathan Young
 
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxmavinoikein
 
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
 
Anne Frank A Beacon of Hope amidst darkness ppt.pptx
Anne Frank A Beacon of Hope amidst darkness ppt.pptxAnne Frank A Beacon of Hope amidst darkness ppt.pptx
Anne Frank A Beacon of Hope amidst darkness ppt.pptxnoorehahmad
 
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
 
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...漢銘 謝
 
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
 
Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Escort Service
 
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...marjmae69
 
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comSaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comsaastr
 
Genshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxGenshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxJohnree4
 

Recently uploaded (20)

Early Modern Spain. All about this period
Early Modern Spain. All about this periodEarly Modern Spain. All about this period
Early Modern Spain. All about this period
 
miladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxmiladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptx
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software Engineering
 
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
PAG-UNLAD NG EKONOMIYA na dapat isaalang alang sa pag-aaral.
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
 
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC  - NANOTECHNOLOGYPHYSICS PROJECT BY MSC  - NANOTECHNOLOGY
PHYSICS PROJECT BY MSC - NANOTECHNOLOGY
 
Event 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxEvent 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptx
 
The Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationThe Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism Presentation
 
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptx
 
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
 
Anne Frank A Beacon of Hope amidst darkness ppt.pptx
Anne Frank A Beacon of Hope amidst darkness ppt.pptxAnne Frank A Beacon of Hope amidst darkness ppt.pptx
Anne Frank A Beacon of Hope amidst darkness ppt.pptx
 
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
 
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...
 
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
 
Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170
 
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
 
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.comSaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
SaaStr Workshop Wednesday w/ Kyle Norton, Owner.com
 
Genshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxGenshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptx
 

Gremlin-ATL: a Scalable Model Transformation Framework

  • 1. Gremlin-ATL: a Scalable Model Transformation Framework Gwendal DANIEL Inria, IMT Atlantique, LS2N gwendal.daniel@inria.fr Frédéric JOUAULT ESEO frederic.jouault@eseo.fr Gerson SUNYE Inria, IMT Atlantique, LS2N gerson.sunye@inria.fr Jordi CABOT ICREA - UOC jordi.cabot@icrea.cat
  • 2. Introduction • Complex and large models • Civil Engineering • Biology • Reverse Engineering • Need to provide solutions to • Store large models • Efficiently query them • Compute complex transformations 2G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
  • 3. Model Persistence • Default serialization mechanism: XMI • Scalable model persistence frameworks • Use databases to store models • Relational: CDO • NoSQL: Morsa, NeoEMF • Low memory footprint 3G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework Modeling API Modeling Framework DatabaseModeler
  • 4. Model Persistence API Call1 … API Calln Model Transformation Transformation Engine Modeling Framework Database rule myRule { from pp : In!Person to ee: Out!Entity ( name <- p.name ) } get(pp1) get(pp1, name) create(ee1, Entity) set(ee1, name) … get(ppn) get(ppn, name) create(een, Entity) set(een, name) Typical Model Transformation Tool Under the hood 4 Low-level modeling API → Not aligned with the database capabilities Fragmented queries → Not efficient → Remote database Intermediate objects → Memory consumption → Execution time overhead G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
  • 5. Model Persistence • Not efficient to compute model queries and transformations • Why can’t we write database queries manually? • Modern persistence frameworks typically rely on NoSQL databases • Multiple query languages, data representation, etc • Low-level queries are hard to understand and maintain • Modeling expertise vs. Database expertise • Solution: generate them! 5G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
  • 6. Gremlin-ATL • Generate database queries from model transformations • Bypass modeling framework APIs • Benefit of all the query capabilities of the backend 6 ATLtoGremlin Transformation Gremlin Traversal DatabaseATL Transformation G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework rule myRule { from pp : In!Person to ee: Out!Entity ( name <- pp.name ) } g.idx(‘’metaclasses’’)[[name:Person]].transform{ ee = g.createVertex(Entity); e.addEdge(‘’instanceof’’, g.idx(‘’metaclasses’’)[[name:Entity]] ee.name = it.name }.iterate(); Database Gremlin-ATL Transformation Tool Under the hood
  • 7. Gremlin-ATL • Input: ATL • Well-known in the modeling community • Hybrid language • Transformation rules • Embeds OCL rule myRule { from pp : In!Person ( not pp.name.isEmpty() ) to ee : Out!Entity( name ← pp.name } 7G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
  • 8. Gremlin-ATL • Output: Gremlin • Multi-database query language • Graph traversals • Easily extensible • Native Neo4j support, OrientDB … • NeoEMF/Graph g.idx(‘metaclasses’)[[name:Person]].inE(‘instanceOf’).outV .filter{!it.name.isEmtpy()} .transform{ ee = g.createVertex(); ee.addEdge(‘instanceOf’, g.idx(‘metaclasses’)[[name:Entity]]); ee.name = it.name; }.iterate() 8G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
  • 9. rule myRule { from pp : In!Person ( not pp.name.isEmpty() ) to ee : Out!Entity( name ← pp.name ) } Gremlin-ATL • 3 steps process • Map ATL constructs to their Gremlin equivalent • Merge the created Gremlin constructs into a script • Send the script to the database 9 g.idx(‘metaclasses’)[[name:Person]].inE(‘instanceOf’).outV .filter{!it.name.isEmtpy()} .transform{ ee = g.createVertex(); ee.addEdge(‘instanceOf’, g.idx(‘metaclasses’)[[name:Entity]]); ee.name = it.name; }.iterate() G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
  • 10. Evaluation 10 0 50000 100000 150000 200000 250000 300000 set1 set2 set3 set4 Java2KDM Execution Time (ms) ATL Gremlin-ATL OutOfMemory G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework Models containing 6000 to 3,5M elements Java2KDM Transformation NeoEMF/Graph
  • 11. Evaluation 11G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework Models containing 6000 to 3,5M elements Java2KDM Transformation NeoEMF/Graph 0 100 200 300 400 500 600 set1 set2 set3 set4 Java2KDM Memory Consumption (MB) ATL Gremlin-ATL OutOfMemory
  • 12. Conclusion • Benefits • No query fragmentation / intermediate objects • Positive results on large models • Extensible architecture (see our article) • Drawbacks • Less efficient than existing solutions for small / in-memory models • Need to be manually integrated • Tightly coupled to the model persistence framework 12G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
  • 13. Conclusion • Future Work • Extend our mapping • Reuse schema inferrence approaches • Ease the integration of other persistence frameworks / data sources • Gremlin-ATL to express data migration operations • Promising results on the Neo4j panama paper database (see our article) 13G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework
  • 14. Question? Thank you for your attention! Websites / Repositories NeoEMF: neoemf.com Gremlin-ATL: github.com/atlanmod/mogwai https://github.com/SOM-Research https://github.com/AtlanMod 14G. Daniel - Gremlin-ATL: a Scalable Model Transformation Framework