<!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>
      <journal-title-group>
        <journal-title>Symposium on Software Performance, November</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Monitoring - Experiences With Micrometer and Asset Administration Shells</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Miguel G. Casado</string-name>
          <email>miguel.gomez@alumnos.uva.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Holger Eichelberger</string-name>
          <email>eichelberger@sse.uni-hildesheim.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Software Systems Engineering, Universität Hildesheim</institution>
          ,
          <addr-line>31141 Hildesheim</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Valladolid</institution>
          ,
          <addr-line>47002 Valladolid</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <volume>0</volume>
      <fpage>9</fpage>
      <lpage>10</lpage>
      <abstract>
        <p>Industry 4.0/IIoT setups are often distributed and consist of hundreds of sensors, devices or machines. Nowadays, powerful edge devices enable the execution of software services like Artificial Intelligence close to production machines to reduce latency. Although several supporting Industry 4.0 platforms do exist, industrial stakeholders aim for more open, interoperable and vendor-neutral solutions. In this paper, we focus on the monitoring of runtime properties in Industry 4.0 for services and (edge) devices. We propose a realization based on existing components like Micrometer, MQTT and upcoming standards such as the Asset Administration Shell. We discuss patterns for their integration, the impact of the patterns on performance in terms of an experiment as well as experiences that we made so far.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The digitization of industry increases the performance of technical systems and their processes,
but also their complexity. Particular complexity arises as Industry 4.0 installations are
inherently distributed. In such settings, edge devices allow for handling the high data frequencies
and volumes provided by sensors and production machines. Moreover, modern edge devices
enable the safe execution of hard real-time machine control operations and (soft real-time) IT
functionality, such as Artificial Intelligence (AI).</p>
      <p>In the BMWi-funded project IIP-Ecosphere1, we research approaches to address typical
shortcomings in Industry 4.0 systems regarding openness, interoperability, or vendor-neutrality.
At the heart of IIP-Ecosphere, we develop a prototypical AI-enabling Industry 4.0 platform
that allows for exploring the approaches developed in the project. As a core functionality,
the platform shall automatically deploy and manage (AI-)services in a uniform manner on
heterogeneous resources such as edge devices, on-premise servers, or cloud resources.</p>
      <p>
        Within this context, we focus in this paper on a runtime monitoring approach for (AI-)services.
Our research question is: How to design and realize eficient resource and service monitoring in
an open, interoperable and vendor-neutral manner? Our approach combines a recent Industry
nEvelop-O
LGOBE
CEUR
Workshop
Proceedings
4.0 information/interface model, the Asset Administration Shell (AAS) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], with protocols such
as MQTT or AMQP2 and a vendor neutral monitoring frontend (Micrometer3).
      </p>
      <p>For these components, we introduce three integration patterns and analyze them in a
performance experiment. While a local integration of monitoring and AAS performs best, it implies
also higher resource usage, a potential obstacle for resource-constrained edge devices. In
contrast, a distributed installation increases response times. We show that a combination with
publish-subscribe protocols helps balancing resource usage and response time.</p>
      <p>Structure of the paper: In Section 2, we provide background information on used standards
and technologies. We present our approach to Industry 4.0 resource and service monitoring in
Section 3 and discuss initial experimental results in Section 4. In Section 5, we briefly outline
related work, and in Section 6 we conclude the paper and give an outlook on future work.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>In this section, we introduce standards and technologies that we selected to meet the goals of
IIP-Ecosphere. For the realization, we aim at maximizing the use of Open Source.</p>
      <p>Micrometer is an Open Source vendor-neutral application metrics facade with support for
monitoring tools like Prometheus or Dynatrace. Micrometer defines so-called meters such as
timers, gauges, or counters, which also carry their unit of monitoring, e.g., items/s.</p>
      <p>
        A range of protocols is used in IIoT, including (legacy) machine protocols such as Fieldbus (the
ifeld level is not in our scope as stated in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]) to Message Queuing Telemetry Transport (MQTT)
or Advanced Message Queuing Protocol (AMQP). MQTT and AMQP are publish-subscribe
protocols for the transport of binary payloads via a broker server.
      </p>
      <p>! " #$ % &amp;</p>
      <p>
        Recently, the Asset Administration Shell (AAS) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] was defined to uniformly model
Industry 4.0 ”assets”, i.e., products, machines, their digital twins, or even software components.
AAS is currently in a standardization driven by industrial groups in diferent countries, e.g., the
Industrial Digital Twin Association (IDTA) in Germany or the Smart Manufacturing Profiles
initiative in the U.S. Although AAS is rather new and still in development, the IIP-Ecosphere
      </p>
      <sec id="sec-2-1">
        <title>2https://mqtt.org/, https://www.amqp.org/ 3https://micrometer.io/</title>
        <p>partners opted for an extensive exploration. Essentially, as illustrated in Figure 1, an AAS is a
nested structure containing typed properties, operations or references between elements. An
AAS can be static, dynamic regarding values or structures, or active through callable operations.</p>
        <p>Eclipse BaSyx4 is the de-facto AAS reference implementation. In BaSyx, an AAS is represented
as a REST structure that can be served by a local process or deployed to a remote server.
Properties and operations can be realized through functors attached to an AAS that perform
local or remote method invocation, e.g., via the BaSyx Virtual Automation Bus (VAB) protocol.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Approach</title>
      <p>
        Our goal is to collect runtime monitoring data reflecting the resource usage and performance
of devices and services in Industry 4.0 installations. A realization shall provide access to the
monitored information for individual devices and services, but also serve as a basis for eficient
aggregation over all elements in an installation. Moreover, IIP-Ecosphere imposes further
requirements [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], among them in particular: 1) AAS shall be used for all component/service
interfaces, 2) IIoT protocols such as MQTT or AMQP can be used instead of AAS, e.g., for soft
realtime streaming, 3) monitoring operations shall be faster than a typical 8 ms machine pace,
4) (de facto) standards shall be used wherever possible to foster interoperability.
      </p>
      <p>
        To realize the monitoring approach, we made some basic decisions (cf. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] for more details):
For representing runtime measures in an uniform fashion, we rely on Micrometer. However,
Micrometer focuses on local meters, i.e., there is limited built-in support to access remote/published
meters. Thus, we propose a set of proxy instances, which can be loaded with JSON information
obtained from published meters, e.g., through a REST client. Further, the monitoring results
shall be represented in terms of AAS structures as illustrated in Figure 1, which may also
contain JSON. This allows client implementations, e.g., the AASX Package Explorer5, to access
monitored properties through polling as desired by our stakeholders. Alternative forms, e.g.,
pushing of the data through publish-subscribe, can be realized side-by-side.
      </p>
      <p>The mentioned components can be combined in several ways, implying individual
performance impacts. Figure 2 illustrates some alternative patterns, all including services with defined</p>
      <sec id="sec-3-1">
        <title>4https://www.eclipse.org/basyx/</title>
        <p>5https://www.eclass.eu/anwendung/verwaltungsschale.html
meters on the device side, either a local or remote AAS to represent the monitored data, and a
client reading the remote meters via Micrometer proxies. Our patterns are:
a) A local AAS executing the Micrometer environment, which, in turn, observes the services.</p>
        <p>The AAS polls the monitored data when a property is accessed, i.e., its functors perform
local calls. To publish the AAS, an HTTP server process must be running on the device.
b) A remote AAS communicating through a (light-weight) AAS implementation server on
the device. As in a), the data is polled, here through (VAB) remote method calls.
c) Remote pub-sub AAS: A scheduled task on the device publishes the data on a channel
 . The AAS subscribes to  and holds the received data in a local cache bound to the
AAS property functors. If communication from the AAS to the device is needed, e.g., to
reconfigure the monitoring, a protocol as in b) can additionally be used.</p>
        <p>As a BaSyx AAS is represented as a REST structure, all patterns access the AAS from the client
through REST. Patterns a) and b) exclusively rely on AAS functionality and particularly follow
the examples provided by BaSyx. In contrast, in pattern c) we connect device and AAS/client
using asynchronous communication and transform the polling from pattern b) into an approach
that relies on local calls to a cache instead of remote method invocations. In this pattern, further
components can subscribe to the channel and operate even without access to the AAS. Patterns
a) and b) may also be combined with some form of pushing, which we do not detail here.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results</title>
      <p>To analyze the eficiency of the patterns introduced in Section 3, we present now an experimental
evaluation of the individual response times. We realized the patterns as variants of the same
Java code6. As basis, we use a simple workload in terms of two interconnected Spring Cloud
Stream services (Spring version 3.1.1). The Micrometer (version 1.6.4) instances represent more
than 50 default Spring and custom meters. A BaSyx AAS (github version of January 2021)
defines a representative structure of properties and operations for all variants. A client reads
the AAS through our Micrometer proxies and records the individual response times.</p>
      <p>
        We use the local AAS pattern as baseline. However, Spring and BaSyx conflict when being
executed in the same JVM. Thus, we use corresponding meters without service workload as
fallback baseline. For the remote AAS pattern, the client polls meter data via VAB. As the meters
are published by Spring in terms of REST by default, we opted for a VAB implementation server
that accesses the meter information through an internal REST client [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. For the pub-sub AAS,
a regular task publishes a JSON summary of the meters via AMQP (HiveMQ client 2020.4).
      </p>
      <p>
        As experimental environment, we use Windows 10 (Dell 7490, Intel i7-8650U, 1.9MHz, 32
GByte RAM, Open JDK 13+33) to emulate a development setting and Ubuntu Linux 20.04
(VMWare VM with 6 vCores on a Xeon E5-2650v4, 2.2GHz, 12 GByte RAM, Open JDK 13.0.7)
as a server environment. Both setups use local network only. A single iteration of a variant
reads 62 AAS properties representing gauges, counters and timers. Initial experiments in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
      </p>
      <sec id="sec-4-1">
        <title>6Replication package https://doi.org/10.5281/zenodo.5571817</title>
        <p>indicated, that the measurements stabilize at around 175 iterations, probably due to caching
or JVM/JIT settling operations. Here, we perform 200 iterations for each variant. To prevent
warm-up outliers, we exclude the results of first two iterations per variant.</p>
        <p>local a)
Gauges VAB b)</p>
        <p>AMQP c)
local a)
Timer VAB b)</p>
        <p>AMQP c)
local a)
Counter VAB b)</p>
        <p>AMQP c)</p>
        <p>Windows
avg [ms]
1,3
5,5
1,2
0,8
5,5
1,6
0,6
3,6
1,1</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Related Work</title>
      <p>
        We addressed a combination Industry 4.0 protocols, Micrometer and AAS. For IIoT protocols,
a body of work is published with a certain focus on MQTT. Two interesting related works
are [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] on broker performance for IoT edge computing and [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] on MQTT protocol latency over
diferent gateways. Regarding Micrometer, publications typically focus on applications, e.g., in
the context of Spring [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Further, there is an increasing amount of publications on AAS and,
in particular, BaSyx. Currently, the focus there is on evaluating maintainability [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] or on use
cases/demonstrators [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. According to our knowledge, there is currently no work that combines
AAS, Micrometer and IIoT protocols for the monitoring of resource or software services.
      </p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusions</title>
      <p>Industry 4.0 systems do not only require complex, distributed setups, but sometimes also the use
of prescribed protocols and standards. Moreover, future Industry 4.0 systems aim at increased
openness, interoperability and vendor-neutrality. In this context, we analyzed whether Asset
Administration Shells, Micrometer and protocols such as MQTT or AMQP can be combined to
realize eficient runtime monitoring of resource and service properties. We proposed three basic
integration patterns and discussed the impact on the performance in terms of an experiment.
In essence, a more complex publish-subscribe implementation can outperform techniques that
are (mostly) shipped with the utilized implementation frameworks. Moreover, eficient updates
of meters may require specific attention, e.g., asynchronous schedules.</p>
      <p>In future, we plan to explore the scalability of the approach when monitoring a larger set of
devices. On the one side, an overview of all monitored values through an Asset Administration
Shell is demanded by our stakeholders and can be provided as shown in this work. On the other
side, we expect that a realization of further platform components, e.g., a monitoring aggregator,
can eficiently be achieved through an integrated publish-subscribe approach.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>IIP-Ecosphere is partially supported by the German Ministry of Economics and Energy (BMWi),
grant 01MK20006D.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Bader</surname>
          </string-name>
          , E. Barnstedt,
          <string-name>
            <given-names>H.</given-names>
            <surname>Bedenbender</surname>
          </string-name>
          , et al.,
          <source>Details of the Asset Administration Shell</source>
          ,
          <year>2020</year>
          . URL: https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/Details_ of_the_Asset_Administration_
          <article-title>Shell_Part1_V3</article-title>
          .html.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>H.</given-names>
            <surname>Eichelberger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sauer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. S.</given-names>
            <surname>Ahmadian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Schicktanz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dewes</surname>
          </string-name>
          , G. Palmer,
          <string-name>
            <given-names>C.</given-names>
            <surname>Niederée</surname>
          </string-name>
          ,
          <string-name>
            <surname>IIP-Ecosphere Platform</surname>
            <given-names>Requirements</given-names>
          </string-name>
          ,
          <year>2021</year>
          .
          <source>doi:1 0 . 5 2 8 1 / z e n o d o . 4 4</source>
          <volume>8 5 7 7 4 .</volume>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M. G.</given-names>
            <surname>Casado</surname>
          </string-name>
          ,
          <article-title>Service and device monitoring on devices in IIP-</article-title>
          <string-name>
            <surname>Ecosphere</surname>
          </string-name>
          ,
          <year>2021</year>
          . URL: https://sse.uni-hildesheim.de/studium-lehre/beispiele-guter-ausarbeitungen/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>H.</given-names>
            <surname>Koziolek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Grüner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Rückert</surname>
          </string-name>
          ,
          <article-title>A Comparison of MQTT Brokers for Distributed IoT Edge Computing</article-title>
          ,
          <source>in: Software Architecture</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>352</fpage>
          -
          <lpage>368</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S. B.</given-names>
            <surname>Kenitar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Marouane</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mounir</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Younes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. G.</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          ,
          <article-title>Evaluation of the MQTT Protocol Latency over Diferent Gateways</article-title>
          ,
          <source>in: Intl. Conf. on Smart City Applications</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>F.</given-names>
            <surname>Gutierrez</surname>
          </string-name>
          , Monitoring, Apress,
          <year>2021</year>
          , pp.
          <fpage>383</fpage>
          -
          <lpage>397</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>K.</given-names>
            <surname>Esper</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Schnicke</surname>
          </string-name>
          ,
          <article-title>Evaluation of the Maintainability Aspect of Industry 4.0 Serviceoriented Production</article-title>
          ,
          <source>in: Intl. Conf. on Industry 4</source>
          .0,
          <string-name>
            <given-names>Artificial</given-names>
            <surname>Intelligence</surname>
          </string-name>
          , and Communications Technology,
          <year>2020</year>
          , pp.
          <fpage>8</fpage>
          -
          <lpage>14</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>F.</given-names>
            <surname>Schnicke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Kuhn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. O.</given-names>
            <surname>Antonino</surname>
          </string-name>
          ,
          <source>Enabling Industry 4</source>
          .
          <article-title>0 Service-Oriented Architecture Through Digital Twins</article-title>
          ,
          <source>in: Software Architecture</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>490</fpage>
          -
          <lpage>503</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>