Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Gremlin-ATL: a Scalable Model Transformation Framework

1.126 visualizaciones

Publicado el

Gremlin-ATL presentation at ASE 2017.

  • Inicia sesión para ver los comentarios

  • Sé el primero en recomendar esto

Gremlin-ATL: a Scalable Model Transformation Framework

  1. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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

×