<!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>Hypersonic { Model Analysis as a Service</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vlad Acretoaie</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Harald Storrle</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Applied Mathematics and Computer Science, Technical University of</institution>
          <country country="DK">Denmark</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Hypersonic is a Cloud-based tool that proposes a new approach to the deployment of model analysis facilities. It is implemented as a RESTful Web service API o ering analysis features such as model clone detection. This approach allows the migration of resource intensive analysis algorithms from monolithic desktop modeling tools to a wide range of mobile and Web-based clients. As a technology demonstrator, a Web application acting as a client for the Hypersonic API has been implemented and made publicly available.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The vast majority of modeling tools are currently deployed as rich client desktop
applications. Some tools, such as those based on the Eclipse Modeling Framework
(EMF), bene t from rich plug-in ecosystems. Others, such as the MagicDraw
modeling environment [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], o er built-in access to remote resources (e. g. a
version control server). However, recent years have seen the rich client architecture
demonstrating its limitations, causing many areas of computing to consider more
exible alternatives. A notable example are Cloud-based architectures, which
involve the deployment of computationally intensive tasks to a centralized and
fully transparent shared pool of con gurable computing resources. Lightweight
clients access these resources via protocols such as RESTful Web services [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ],
giving rise to the \Software as a Service (SaaS)" paradigm. The adoption of this
paradigm in the area of modeling tools is so far remarkably limited.
      </p>
      <p>
        In this context, we have proposed Hypersonic [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], a RESTful Web service API
o ering model analysis facilities including clone detection, model di erence
computation, and model size computation. Model analysis is a particularly suitable
application area for a service-oriented architecture, since analysis algorithms
often demand extensive resources. The service-based approach to modeling tools is
illustrated in Fig. 1: a subset of the model processing features deployed locally in
a rich client architecture may instead be o ered as services by several providers,
while existing remote components such as model repositories remain una ected.
      </p>
      <p>This approach bene ts all the involved stakeholders. For modelers, it
supports access to scalable computational resources running the latest version of
the modeling tool, as well as the option to mix-and-match services o ered by
di erent providers. For tool providers, it facilitates cross-device support and
mitigates the distribution of unlicensed software. Furthermore, entry barriers for new
providers are lowered. For IT administrators, a service-based architecture brings
a reduction in installation and maintenance workloads. Finally, the Model-Based
Software Development (MBSD) community can expect improved standards
compliance and an accelerated knowledge transfer between research and industry.</p>
      <p>The comparatively few drawbacks of a service-based approach are caused
by its distributed nature. Uploading large models may create a performance
bottleneck, while new security and privacy aspects come into play. Nevertheless,
these drawbacks are common to most Software as a Service (SaaS) solutions,
and have not undermined this architecture style's acceptance.</p>
      <sec id="sec-1-1">
        <title>Client</title>
      </sec>
      <sec id="sec-1-2">
        <title>Provider 1</title>
      </sec>
      <sec id="sec-1-3">
        <title>Client</title>
      </sec>
      <sec id="sec-1-4">
        <title>Provider 1</title>
        <p>. . .</p>
      </sec>
      <sec id="sec-1-5">
        <title>Client</title>
      </sec>
      <sec id="sec-1-6">
        <title>Provider k</title>
        <p>. . .</p>
      </sec>
      <sec id="sec-1-7">
        <title>Provider x</title>
      </sec>
      <sec id="sec-1-8">
        <title>Provider y</title>
      </sec>
      <sec id="sec-1-9">
        <title>Provider 1</title>
      </sec>
      <sec id="sec-1-10">
        <title>Provider 1</title>
        <p>d
n
e
g
e
L</p>
      </sec>
      <sec id="sec-1-11">
        <title>Component suitable for deployment to remote server</title>
      </sec>
      <sec id="sec-1-12">
        <title>Component suitable for deployment to local client</title>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Hypersonic</title>
      <p>
        The Hypersonic API
The architecture of the Hypersonic API is presented in Fig. 2. Following the
REST architectural style, it exposes resources for clients to interact with via
HTTP requests. The API currently supports MagicDraw UML models (support
for EMF and Simulink [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] models is also planned). API response messages
contain the analysis results encoded as JSON [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] documents.
      </p>
      <p>
        The Hypersonic API is implemented as a wrapper around the MACH model
analysis engine [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], though from a conceptual standpoint any other model
analysis engine may be used. The RESTful API component handles HTTP
interactions with clients, delegating processing tasks to the MACH engine. All uploaded
API
client
.xmi
HTTP
HTTP
.json
      </p>
      <p>XMI2PL</p>
      <p>.xmi</p>
      <sec id="sec-2-1">
        <title>RESTful</title>
        <p>API
call(…)
[…]
.pl</p>
      </sec>
      <sec id="sec-2-2">
        <title>MACH</title>
        <p>.pl</p>
      </sec>
      <sec id="sec-2-3">
        <title>Model warehouse</title>
        <p>
          models pass though the XMI2PL component, which performs a format
translation from the MDXML format to the Prolog-based le format described in [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
Once translated, models are stored in a dedicated warehouse. The MACH
component supports operations such as clone detection, model di erencing, model
size computation, and basic model querying [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. These operations can be applied
to models stored in the warehouse. Analysis results are encoded by the RESTful
API component as JSON documents to be consumed by the API client.
        </p>
        <p>
          All processing components are executed inside a single instance of the
SWIProlog [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] runtime. The compact representation of models as fact databases
facilitates the e ective in-memory processing of large models. Since some analysis
operations (e. g. model size computation) are embarrassingly parallel, splitting
very large models into several fact databases and executing several SWI-Prolog
instances in parallel is possible, though currently not supported.
As a technology demonstrator, a simple, mobile device friendly Web application
acting as a client for the Hypersonic API1 has been implemented. The
application, written entirely in client-side JavaScript, currently supports uploading
a local model to the Hypersonic model warehouse and requesting a clone
detection report, which it subsequently displays in tabular form. The sample API
client exempli es our vision for Web service driven modeling tools: using Web
2.0 technologies and standards (REST, JavaScript, JSON) to enable advanced
model analysis operations to be performed outside the constraints of the desktop
and of traditional modeling environments.
1 The application is available at http://www.compute.dtu.dk/~rvac/hypersonic.
Due to the increase in size of industrially relevant models, as well as the increase
in complexity of the operations performed on them, the need for service-based,
Cloud-enabled modeling tools has become apparent [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. The main driver in this
direction is the promise of performance and scalability gains for modeling
activities such as model warehousing [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ], querying [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], and transformation [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
        </p>
        <p>
          That being said, service-based model analysis has yet to receive signi
cant attention in the literature. The closest related proposal is the EMF-REST
project [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], aimed at automatically generating RESTful Web service interfaces
for EMF models, much like existing EMF tools generate Java APIs for such
models. However, while it does provide basic model manipulation operations,
EMF-REST is not primarily designed as a model analysis tool.
4
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Ongoing Developments</title>
      <p>The Hypersonic API is undergoing development with the aim of reaching feature
parity with the MACH command-line model analysis tool. Once this is achieved,
the API will be deployed to a private Cloud platform. We plan to eventually
extend the API operations beyond model analysis, into the realm of model querying
and model transformation. In parallel, we will work towards creating an
ecosystem of API clients, including smartphone/tablet apps and modeling tool plug-ins
(see Fig. 4). For these proposals to become practical solutions, security aspects
such as user authentication and model access control must be addressed.</p>
      <p>Smartphone app</p>
      <p>Web app
Desktop client
Modeling tool
plug-in
HTTP</p>
      <p>Hypersonic API</p>
      <p>MACH</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Vlad</given-names>
            <surname>Acretoaie</surname>
          </string-name>
          and Harald Storrle. Hypersonic:
          <article-title>Model Analysis and Checking in the Cloud</article-title>
          .
          <source>In Proc. 2nd Ws. Scalability in Model Driven Engineering (BigMDE'14)</source>
          , volume
          <volume>1206</volume>
          <source>of CEUR-WS</source>
          , pages
          <volume>6</volume>
          {
          <fpage>13</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Jordi</given-names>
            <surname>Cabot</surname>
          </string-name>
          .
          <article-title>EMF-REST</article-title>
          . http://emf-rest.com, retrieved
          <volume>26</volume>
          .08.
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Caue</given-names>
            <surname>Clasen</surname>
          </string-name>
          ,
          <source>Marcos Didonet Del Fabro</source>
          ,
          <string-name>
            <given-names>and Massimo</given-names>
            <surname>Tisi</surname>
          </string-name>
          .
          <article-title>Transforming Very Large Models in the Cloud: a Research Roadmap</article-title>
          .
          <source>In Proc. First Intl. Ws. ModelDriven Engineering on and for the Cloud (CloudMDE'12)</source>
          , pages
          <fpage>3</fpage>
          {
          <fpage>12</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. Roy Thomas Fielding.
          <article-title>Architectural Styles and the Design of Network-based Software Architectures</article-title>
          .
          <source>PhD thesis</source>
          , University of California, Irvine,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Internet</given-names>
            <surname>Engineering Task</surname>
          </string-name>
          <article-title>Force (IETF)</article-title>
          .
          <source>IETF RFC</source>
          <volume>7159</volume>
          :
          <string-name>
            <surname>The JavaScript Object Notation (JSON) Data Interchange Format</surname>
          </string-name>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Benedek</given-names>
            <surname>Izso</surname>
          </string-name>
          , Gabor Szarnyas, Istvan Rath, and Daniel Varro.
          <article-title>IncQuery-D: Incremental Graph Search in the Cloud</article-title>
          .
          <source>In Proc. 1st Ws. Scalability in Model Driven Engineering (BigMDE'13)</source>
          , pages
          <fpage>4</fpage>
          <issue>:1</issue>
          {
          <issue>4</issue>
          :
          <fpage>4</fpage>
          , New York, NY, USA,
          <year>2013</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Dimitrios</surname>
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Kolovos</surname>
          </string-name>
          ,
          <string-name>
            <surname>Louis M. Rose</surname>
            , Nicholas Matragkas, Richard F. Paige, Esther Guerra, Jesus Sanchez Cuadrado, Juan De Lara, Istvan Rath, Daniel Varro, Massimo Tisi, and
            <given-names>Jordi</given-names>
          </string-name>
          <string-name>
            <surname>Cabot</surname>
          </string-name>
          .
          <article-title>A Research Roadmap Towards Achieving Scalability in Model Driven Engineering</article-title>
          .
          <source>In Proc. 1st Ws. Scalability in Model Driven Engineering (BigMDE'13)</source>
          , pages
          <fpage>2</fpage>
          <issue>:1</issue>
          {2:
          <fpage>10</fpage>
          , New York, NY, USA,
          <year>2013</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8. NoMagic, Inc.
          <source>MagicDraw UML 17.0</source>
          .3. http://www.nomagic.com/products/ magicdraw, retrieved
          <volume>26</volume>
          .08.
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Javier</given-names>
            <surname>Espinazo</surname>
          </string-name>
          <string-name>
            <surname>Pagan</surname>
          </string-name>
          , Jesuss Sanchez Cuadrado, and
          <article-title>Jesus Garc a Molina. Morsa: A Scalable Approach for Persisting and Accessing Large Models</article-title>
          .
          <source>In Proc. 14th Intl. Conf. Model Driven Engineering Languages and Systems (MODELS'11)</source>
          , volume
          <volume>6981</volume>
          <source>of LNCS</source>
          , pages
          <volume>77</volume>
          {
          <fpage>92</fpage>
          . Springer Berlin Heidelberg,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Harald</surname>
          </string-name>
          <article-title>Storrle. Towards Clone Detection in UML Domain Models</article-title>
          .
          <source>J. Softw. Syst. Model.</source>
          ,
          <volume>12</volume>
          (
          <issue>2</issue>
          ),
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Harald</surname>
          </string-name>
          <article-title>Storrle. UML Model Analysis and Checking with MACH</article-title>
          .
          <source>In Proc. 4th Intl. Ws. Academic Softw. Development Tools and Techniques (WASDETT'13)</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>The</surname>
            <given-names>MathWorks</given-names>
          </string-name>
          , Inc. Simulink. http://www.mathworks.se/products/simulink/,
          <source>retrieved 26.08</source>
          .
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Jan</surname>
            <given-names>Wielemaker</given-names>
          </string-name>
          , Tom Schrijvers,
          <string-name>
            <given-names>Markus</given-names>
            <surname>Triska</surname>
          </string-name>
          , and Torbjorn Lager.
          <source>SWI-Prolog. Theory and Practice of Logic Programming</source>
          ,
          <volume>12</volume>
          (
          <issue>1-2</issue>
          ):
          <volume>67</volume>
          {
          <fpage>96</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>