<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Scalable Model Edition, Query and Version Control Through Embedded Database Persistence</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Xabier De Carlos</string-name>
          <email>xdecarlos@ikerlan.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Goiuria Sagardui</string-name>
          <email>gsagardui@mondragon.edu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Salvador Trujillo</string-name>
          <email>strujillo@ikerlan.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IK4-Ikerlan Research Center</institution>
          ,
          <addr-line>P</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Mondragon Unibertsitatea</institution>
          ,
          <addr-line>Goiru 2, 20500 Arrasate</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Persisting and managing models larger than a few tens of megabytes using XMI introduces a signi cant time and memory footprint overhead to MDE work ows. Several approaches provide alternative persistence mechanisms based on databases that can be integrated with EMF. However, to the best of our knowledge there is less coverage of approaches on models persistence which include model querying, versioning and edition capabilities leveraging persistence capabilities. In this poster we present an approach that provides model persistence based on embedded databases. This approach aims to provide scalability through model edition, querying and versioning mechanisms that leverage database capabilities.</p>
      </abstract>
      <kwd-group>
        <kwd>Model Driven Development</kwd>
        <kwd>Large-Scale Models</kwd>
        <kwd>Run-Time Query Translation</kwd>
        <kwd>Version Control</kwd>
        <kwd>Model Edition</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>XML Metadata Interchange (XMI) is an XML-based model interchange format
standardised by the OMG, and the default model persistence format in the
widely-used Eclipse Modelling Framework (EMF). Being an XML-based format,
models stored in XMI need to be fully loaded in memory before they can be
queried or modi ed. As models grow in size, this can have a signi cant impact
both on the overall time needed to execute a query on a stored model, and on the
memory footprint of the host application. As such, there is a need for alternative
model persistence mechanisms that scale better in terms of speed and memory
footprint.</p>
      <p>
        Approaches like Morsa[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], Neo4EMF [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], MongoEMF [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or EMF Fragments
[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] have been proposed to provide alternative persistence mechanisms. These
approaches also provide integration with EMF and support querying models.
Integration is provided by implementing the Resource interface of EMF. Persistence
approaches provide persistence-speci c query languages that take advantage of
database capabilities. However, modelling engineers use query languages closer
to model-level, such as the Object Constraint Language (OCL) or the Epsilon
Object Language (EOL) to query models.
      </p>
      <p>
        Additionally, models are used within collaborative modelling environments
where di erent versions of models are managed and shared between developers.
Version Control Systems (VCSs) provide support for version management, and
di erent approaches have been proposed for version control of models. Some
approaches such as ModelCVS [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], AMOR [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], CDO [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] or EMFStore [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
provide model-speci c VCSs that allow performing version operations (i.e. commit,
update, locking, etc.) at model-level. However, most of these approaches
(ModelCVS, AMOR and EMFStore) are based on a central repository where XMI
models are stored. Consequently as XMI has scalability problems, these
approaches do not scale well. CDO also stores models in a centralised repository,
but at model-level. But it also has scalability problems, partially due to version
control [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        Other approaches like EMF Compare [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], EMF Di /Merge [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] or Epsilon
Comparison Language (ECL) and Epsilon Merging Language (EML) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] provide
model-level di erencing and merging. However we have not identi ed di
erencing/merging solutions that leverage database persistence capabilities.
2
      </p>
      <p>Contribution
While some approaches focus on providing persistence for large-scale models (i.e.
Morsa, Neo4EMF, etc.), other approaches focus on model-speci c VCSs (i.e.
EMFStore, ModelCVS, etc.). However, to the best of our knowledge, a database
persistence mechanism to be integrated with a distributed VCS (i.e. GIT) has not
been explored yet, and we believe that this mechanism can be a good alternative
for large-scale model versioning. Providing a persistence mechanism also implies
to implement model query and edition mechanisms. Consequently, as we are
looking for a scalable solution to be used for large-scale model persistence, version
control, edition and querying mechanisms should be scalable.</p>
      <p>We propose a persistence mechanism to be integrated within VCSs.
Scalability on version control, and model-level edition and querying is supported
through mechanisms that leverage capabilities of the database (i.e. partial load
and modi cations). The approach is divided in four parts: persistence (core of
the approach) and edition, query and version control layers that are created
around the persistence and leveraging its capabilities.
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Persistence</title>
      <p>While most of the existing approaches perform model versioning through
centralised repositories, we propose database based persistence of models to be
integrated within distributed VCSs. Persistence is based on single- le embedded
databases and it provides di erent bene ts: (i) drop-in replacement for XMI les
facilitating integration in a VCS and in modelling tools; (ii) partially load and
modify models; and (iii) model comparison at di erent levels ( le, database or
model levels).</p>
      <p>Work done and open issues. We have implemented a mechanism that persists
models in embedded and single- le relational databases. We have used H2 as
the database back-end. The designed data schema is metamodel-agnostic and
it supports persistence of models that conform to arbitrary metamodels. We
have validated the solution with positive results after performing preliminary
evaluation. Open issues related to this task are: (i) to perform a more complete
evaluation comparing performance with other database con gurations (indexes,
table views, cache, etc.) and also with other existing solutions; (ii) to improve
the database schema; (iii) to analyse alternative embedded database back-ends;
and (iv) to analyse how to persist more complex models (mega-models, models
with decorator models, etc.)
2.2</p>
    </sec>
    <sec id="sec-3">
      <title>Model-Level Query Layer</title>
      <p>While model-level query languages such as OCL or EOL are commonly used
by engineers, persistence-level query languages leverage capabilities of the used
persistence mechanism. To solve this issue, Model-Level Query Layer translates
at run-time model-level EOL queries to persistence-level (SQL). Performing
the translation at run-time provides transparency to the modelling engineers
that can specify and execute model-level queries without worrying on the used
persistence mechanism. In this way, the model-level queries are automatically
translated to a persistence-speci c query language, leveraging persistence
mechanism's capabilities.</p>
      <p>As Figure 1 illustrates, the run-time translation process parses query
expressions within the query program. Each query expression is translated at run-time.
Translated query is executed over the database (the model) only when the
information is required (by other queries or by the user).</p>
      <p>Work done and open issues. We have implemented a rst prototype that
translates EOL queries to SQL queries and also executes over the persistence
mechanism. Additionally, we have analysed the time required by the approach
for performing the query translation, concluding that the translation does not
imply a signi cant time overload. The prototype supports all the EOL
sentences that obtain information from models. Model modi cation sentences are
not supported, but we plan to support them in a future prototype. Moreover,
the prototype supports only EOL at model-level and SQL at persistence level.
For future work we plan to add extensibility, providing more query languages at
both sides.
2.3</p>
    </sec>
    <sec id="sec-4">
      <title>VCS Integration Layer</title>
      <p>The approach provides a database persistence mechanism to be used in
distributed mainstream VCSs. While source code di erencing/merging is natively
supported by VCSs (i.e. GIT or Subversion), they only support versioning models
at le-level. Thus, the VCS Integration Layer provides support for model-speci c
and scalable di erencing and merging.</p>
      <p>In this way, we propose a di erencing and merging mechanism that perform
the di erence and merge at di erent-levels. Figure 2 illustrates the proposed
strategy. As it is shown on the gure, a con ict appears when User2 pushes
a new model version to User1. Consequently, a di erence or merge should be
performed. Both versions (model.db) are a large-scale model persisted within an
embedded single- le database. Being so, versions are compared rst at le or
database level (step 1 ) and then the di erences are extracted (step 2 ). Finally,
di erences are used to load models partially on the di erencing/merging (step
3 ). These partial models only contain the information required to resolve the
con ict.</p>
      <p>Work done and open issues. We have described directions that we will
follow to provide a scalable model di erencing/merging solution which leverage
capabilities of the proposed persistence mechanism. However, the approach is
not yet implemented. Moreover we have to analyse feasibility to extend existing
di erencing/merging tools (i.e. EMF Compare) with this strategy.
2.4</p>
    </sec>
    <sec id="sec-5">
      <title>Tool Integration Layer</title>
      <p>Providing an alternative persistence mechanism requires the support of
integration with modelling tools, to be able to edit persisted models. The Tool
Integration Layer aims to provide integration of the persistence mechanism with EMF.
This layer will implement the Resource interface of EMF to integrate the
persistence mechanism with EMF. Moreover, scalable solutions for model edition
such as partial load or load on demand will be provided.</p>
      <p>Work done and open issues. We have described directions to be followed
to integrate persistence within EMF-based modelling tools and they will be
implemented in the future.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Espinazo</given-names>
            <surname>Pagan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Sanchez</surname>
          </string-name>
          <string-name>
            <surname>Cuadrado</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          ,
          <source>Garc</source>
          a Molina, J.:
          <article-title>Morsa: A Scalable Approach for Persisting and Accessing Large Models</article-title>
          . In Whittle, J.,
          <string-name>
            <surname>Clark</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kahne</surname>
          </string-name>
          , T., eds.:
          <source>Model Driven Engineering Languages and Systems. Volume 6981 of Lecture Notes in Computer Science</source>
          . Springer Berlin Heidelberg (
          <year>2011</year>
          )
          <volume>77</volume>
          {
          <fpage>92</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Benelallam</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gomez</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sunye</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tisi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Launay</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Neo4EMF, a Scalable Persistence Layer for EMF Models</article-title>
          .
          <source>In: ECMFA- European conference on Modeling Foundations and applications</source>
          , York, UK, Royaume-Uni, Springer (July
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Bryan</given-names>
            <surname>Hunt</surname>
          </string-name>
          :
          <article-title>Mongo EMF</article-title>
          . https://github.com/BryanHunt/mongo-emf
          <source>/wiki Accessed March</source>
          <volume>17</volume>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Scheidgen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Reference Representation Techniques for Large Models</article-title>
          .
          <source>In: Proceedings of the Workshop on Scalability in Model Driven Engineering. BigMDE '13</source>
          , New York, NY, USA, ACM (
          <year>2013</year>
          )
          <article-title>5:1{5:9</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Johannes Kepler University of Linz and Vienna University of Technology:
          <article-title>The ModelCVS Project</article-title>
          . http://www.modelcvs.org/versioning/index.html
          <source>Accessed June</source>
          <volume>23</volume>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Johannes Kepler University of Linz and Vienna University of Technology:
          <article-title>The AMOR Project</article-title>
          . http://www.modelversioning.org/index.php?option=com_
          <source>content&amp;view=article&amp;id=46&amp;Itemid=54 Accessed June</source>
          <volume>23</volume>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Eike</surname>
          </string-name>
          <article-title>Stepper: CDO Model Repository Overview</article-title>
          . http://www.eclipse.org/cdo/ documentation/ Accessed March 17,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8. EMFStore:
          <article-title>What is EMFStore and Why Should I Use It</article-title>
          ? https://eclipse.org/ emfstore/ Accessed June 21,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Pagan</surname>
            ,
            <given-names>J.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cuadrado</surname>
            ,
            <given-names>J.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Molina</surname>
            ,
            <given-names>J.G.</given-names>
          </string-name>
          :
          <article-title>A Repository for Scalable Model Management</article-title>
          .
          <source>Software &amp; Systems Modeling</source>
          (
          <year>2013</year>
          )
          <volume>1</volume>
          {
          <fpage>21</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <article-title>EMFCompare: Compare and Merge Your EMF Models</article-title>
          . http://www.eclipse. org/emf/compare/ Accessed June 06,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. Di /Merge, E.:
          <article-title>a Di /merge Component For Models</article-title>
          . http://eclipse.org/ diffmerge/ Accessed June 06,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Kolovos</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rose</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paige</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polack</surname>
            ,
            <given-names>F.A.</given-names>
          </string-name>
          :
          <source>The Epsilon Book. Structure</source>
          <volume>178</volume>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>