Mogwaï: Querying large models via an OCL to NoSQL / GraphDB transformation

Our recent work: “Mogwaï: a Framework to Handle Complex Queries on Large Models” has been recently presented at RCIS 2016. In short Mogwaï is framework to store large models in a GraphDB NoSQL backend (thanks to NeoEMF) and efficiently query those models by means of a OCL to Gremlin (a query language for some NoSQL databases) transformation.

You can read a short intro the paper and see the presentation below or read the full paper in pdf form here.


While Model Driven Engineering is gaining more industrial interest, scalability issues when managing large models have become a major problem in current modeling frameworks. Scalable model persistence has been achieved by using NoSQL backends for model storage, but existing modeling framework APIs have not evolved accordingly, limiting NoSQL query performance benefits. In this paper we present the Mogwaï, a scalable and efficient model query framework based on a direct translation of OCL queries to Gremlin, a query language supported by several NoSQL databases. Generated Gremlin expressions are computed inside the database itself, bypassing limitations of existing framework APIs and improving overall performance, as confirmed by our experimental results showing an improvement of execution time up to a factor of 20 and a reduction of the memory overhead up to a factor of 75 for large models.

The following figure highlights the differences between the “Mogwaï execution mode” and standard EMF API calls where the initial complex OCL expressions is decomposed in small individual element accesses in comparison with the Mogwai approach where the same query is natively executed on the backend for better efficiency. This also reduces the number of intermediate objects reified to build the output.

Mogwai execution architecture

Comparing Mogwaï execution vs standard Eclipse EMF API requests

As further work we plan to work on a Mogwai extension with update capabilities so that you could also use it to efficiently perform bulk updates on your data (mixing OCL with some imperative constructs) and adapting it to other NoSQL query languages / databases, like OpenCypher




Credits for the featured image go to Inti


Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Share This