Skip to main content

Scalable Queries and Model Transformations with the Mogwaï Tool

  • Conference paper
  • First Online:
Theory and Practice of Model Transformation (ICMT 2018)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 10888))

Abstract

Scalability of modeling frameworks has become a major issue hampering MDE adoption in the industry. Specifically, scalable model persistence, as well as efficient query and transformation engines, are two of the key challenges that need to be addressed to enable the support for very large models in current applications. In this paper we demonstrate Mogwaï, a tool designed to efficiently compute queries and transformations (expressed in OCL and ATL) over models stored in NoSQL databases. Mogwaï relies on a translational approach that maps constructs of the supported input languages to Gremlin, a generic NoSQL query language, and a model to datastore mapping allowing to compute the generated query on top of several datastores. The produced queries are computed on the database side, benefiting of all its optimizations, improving the execution time and reducing the memory footprint compared to standard solutions. The Mogwaï tool is released as a set of open source Eclipse plugins and is fully available online.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/atlanmod/Mogwai.

  2. 2.

    atlanmod.github.io/Mogwai.

  3. 3.

    http://git.eclipse.org/c/modisco.

References

  1. Barmpis, K., Kolovos, D.: Hawk: towards a scalable model indexing architecture. In: Proceedings of the 1st BigMDE Workshop, pp. 6–9. ACM (2013)

    Google Scholar 

  2. Bruneliere, H., Cabot, J., Dupé, G., Madiot, F.: MoDisco: a model driven reverse engineering framework. Inf. Softw. Technol. 56(8), 1012–1032 (2014)

    Article  Google Scholar 

  3. Daniel, G., Jouault, F., Sunyé, G., Cabot, J.: Gremlin-ATL: a scalable model transformation framework. In: Proceedings of the 32nd ASE Conference, pp. 462–472. IEEE (2017)

    Google Scholar 

  4. Daniel, G., Sunyé, G., Benelallam, A., Tisi, M., Vernageau, Y., Gómez, A., Cabot, J.: NeoEMF: a multi-database model persistence framework for very large models. Sci. Comput. Program. 149, 9–14 (2017)

    Article  Google Scholar 

  5. G. Daniel, G. Sunyé, and J. Cabot. Mogwaï: a framework to handle complex queries on large models. In: Proceedings of the 10th RCIS Conference, pp. 225–237. IEEE (2016)

    Google Scholar 

  6. Eclipse Foundation. MDT OCL (2018). http://www.eclipse.org/modeling/mdt/?project=ocl

  7. Eclipse Foundation. The CDO Model Repository (CDO) (2018). http://www.eclipse.org/cdo/

  8. Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: a model transformation tool. Sci. Comput. Programm. 72(1), 31–39 (2008)

    Article  MathSciNet  Google Scholar 

  9. Kolovos, D.S., Paige, R.F., Polack, F.A.C.: The epsilon object language (EOL). In: Rensink, A., Warmer, J. (eds.) ECMDA-FA 2006. LNCS, vol. 4066, pp. 128–142. Springer, Heidelberg (2006). https://doi.org/10.1007/11787044_11

    Chapter  Google Scholar 

  10. OMG. QVT Specification (2017). http://www.omg.org/spec/QVT

  11. OMG. OCL Specification (2018). http://www.omg.org/spec/OCL

  12. Tinkerpop. The Gremlin Language (2018). www.gremlin.tinkerpop.com

  13. Ujhelyi, Z., Bergmann, G., Hegedüs, Á., Horváth, Á., Izsó, B., Ráth, I., Szatmári, Z., Varró, D.: EMF-INCQUERY: an integrated development environment for live model queries. Sci. Comput. Program. 98, 80–99 (2015)

    Article  Google Scholar 

  14. Whittle, J., Hutchinson, J., Rouncefield, M.: The state of practice in model-driven engineering. IEEE Softw. 31(3), 79–85 (2014)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gwendal Daniel .

Editor information

Editors and Affiliations

Appendix A Demonstration Overview

Appendix A Demonstration Overview

The demonstration presents two typical use cases where the Mogwaï framework significantly improves the execution time and memory consumption of an application computing OCL queries and ATL transformations on top of large models.

First, we briefly introduce the sample model, that is a real-world model obtained by applying model driven reverse engineering techniques on an existing code base. The manipulated model contains around 80 000 elements representing a Java application. Figure 3 shows an excerpt of the metamodel describing the sample. Note that the complete metamodel can be found in the MoDisco repositoryFootnote 3.

Fig. 3.
figure 3

Excerpt of the MoDisco Java metamodel

Then, we present a set of OCL queries to compute against this model. An example of such query is provided in Listing 1.1, that describes the protectedMethod query, which finds in the model all the MethodDeclarations that have a protected Modifier. We show in the demonstration how to initialize and configure the Mogwaï engine to translate and run the query from an existing Java application (Fig. 4). In parallel, we show how the query is computed using the regular Eclipse MDT-OCL interpreter embedded with Eclipse, and emphasize the differences.

figure a
Fig. 4.
figure 4

Running OCL queries with Mogwaï

Then, we introduce a simple model-to-model transformation defined with the ATL language to compute on top of the sample model (Listing 1.2). This transformation extracts all the ClassDeclaration instances from the input model and maps them to the Table construct of the output metamodel, and sets a unique key that allows to identify a ClassDeclaration instance. A second rule is responsible of transforming each MethodDeclaration into a Column representing the number of calls to the method.

In the demonstration, we show the required steps to initialize the Mogwaï engine with the transformation and compute it against the database storing the model (Fig. 5). In addition, we show how the output model can be stored in another data representation using a different Model Mapping Implementation. We also compare the execution time of computing the transformation using the regular ATL engine with Mogwaï, and show that using our approach can bring significant improvements in terms of execution time.

figure b
Fig. 5.
figure 5

Running ATL queries with Mogwaï

Finally, the key points of the tool will be summarized and some remarks on the integration into existing modeling application will be provided. All the presented examples and models will be publicly available on the Mogwai GitHub repository. In addition, a video summarizing the key points of the demonstration is available online at https://youtu.be/_nTBPJMVRQY.

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Daniel, G., Sunyé, G., Cabot, J. (2018). Scalable Queries and Model Transformations with the Mogwaï Tool. In: Rensink, A., Sánchez Cuadrado, J. (eds) Theory and Practice of Model Transformation. ICMT 2018. Lecture Notes in Computer Science(), vol 10888. Springer, Cham. https://doi.org/10.1007/978-3-319-93317-7_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-93317-7_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-93316-0

  • Online ISBN: 978-3-319-93317-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics