<!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>Inter-platform Interoperability for Zero Defects Platforms - API Gateway</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Marc Dorchain</string-name>
          <email>marc.dorchain@softwareag.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jonas Schmitt</string-name>
          <email>jonas.schmitt@softwareag.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Klotilda Muca</string-name>
          <email>klotilda.muca@softwareag.com</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Director Research Software AG</institution>
          ,
          <addr-line>Altenkesselerstrasse 17, 66115 Saarbrücken</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Master Student Research Software AG</institution>
          ,
          <addr-line>Altenkesselerstrasse 17, 66115 Saarbrücken</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Researcher Software AG</institution>
          ,
          <addr-line>Altenkesselerstrasse 17, 66115 Saarbrücken</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Background: Zero Defects Manufacturing Platforms will be integrated with external Internet of-Things platforms of commercial manufacturers as well as other (research) projects. In doing so, the data sources available there should be usable as well as the integration of security measures to ensure controlled and frictionless cross-platform access for everybody. Objective: This paper describes an implementation approach of making use of open standards as an example of good design patterns and architecture and gives a short impression of the performance reachable by following these practices compared with other solutions. Method: Using a prototype implementation and conducting a systematic performance study. Results: A prototype implementation by making use of open standards (e.g. Swagger) and opensource tools (e.g. Spring framework) that have been evaluated. Conclusion: The results provide a reference to developers to design a system to enable controlled and smooth cross-platform access in manufacturing environment.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>be important from a business perspective of the platform owner if he can see how often an API is
going to be called from a supplier or a customer outside of its organization.</p>
      <p>It’s an example of how an API Gateway proxy server can be implemented with the help of Spring
Cloud Gateway and extended with individual functionalities. It is also covered how to establish a
database connection with Spring Data and how to convert custom classes into specific database
formats. With Spring Security and OAuth 2 helper libraries, it was possible to implement
authentication and authorization of incoming requests on arbitrarily configurable authorization
servers.</p>
      <p>A Proof-of-Concept implementation has been developed and evaluation of the performance of
implementation against some alternative solutions (commercial and non-commercial) has been
made: • Direct call
• NGINX [8]
• Spring Cloud Gateway [9]
• Netflix Zuul [10]
• webMethods API Gateway (closed source/commercial product) [11]
The performance results are based measuring request latencies during increasement of the number
of parallel accesses.</p>
    </sec>
    <sec id="sec-2">
      <title>2. API Management and Gateway</title>
      <p>A microservices-based integration architecture requires new patterns for event-based
communication, micro gateways for policy enforcement, and network-level controls to be managed
with a service mesh.</p>
      <p>All examined tools and components more or less fulfill all aspects besides the direct calls which
have been added as a reference point only. Finally, performance evaluation (Table 1) has been done
against a commercial product.</p>
    </sec>
    <sec id="sec-3">
      <title>2.1. Functional aspects</title>
      <p>The functional aspects of a possible implementation do all follow the following sequence
diagram, that shows the access of an external API by using an API gateway (Figure 3)Figure 2.</p>
      <p>Assuming the use of OAuth 2 as a common protocol for authorization request as a de-facto
standard is used the procedure of registering clients and/or APIs needs to be handled dynamically.
The sequence is following the simple logical structure of an atomic functional requirement to
technically receive a response and is not including any other functional requirements like specific
user interaction designs vice versa:
• Request
• Validate access token e.g. via OAuth 2
• Transfer modified request
• Reply</p>
      <p>NGINX is a popular open-source proxy and web server software that can be used at the application
level for HTTP and email, as well as at the transport level for TCP/UDP. It runs as a Linux or Windows
service and is controlled via configuration files and process signals.</p>
      <p>However, this type of configuration complicates the ability to dynamically add or delete new
APIs or routes, as described in the concept. For that reason the use of NGINX [5] has been discarded
and no reference implementation has been included in the performance evaluation.</p>
      <p>Spring Cloud Gateway [9] is a project that provides a set of libraries for building an API Gateway.
It aims to provide an effective way to route to APIs and provide support for security,
monitoring/metrics, and resiliency. It is based on Spring Framework and Spring Boot and thus runs
on Windows, Mac, Linux.</p>
      <p>Netflix Zuul [10] is a gateway service that provides dynamic routing, monitoring, resiliency and
stress testing, authentication, and security, and more. It is written in Java and thus runs on Windows,
Mac, Linux.</p>
      <p>webMethods API Gateway [11] is a commercial tool that provides capabilities to perform all the
administration and API related tasks such as creating APIs, defining and activating policies, creating
applications, and consuming APIs as well as security and policies.</p>
    </sec>
    <sec id="sec-4">
      <title>2.2. Performance Evaluation</title>
      <p>As a test API endpoint, the non-existent endpoint https://google.com/error has been used for the
following reasons: it always returns a HTTP 404 error page; and is provided by the large internet
company Google, so that a constant and reproducibility response time can be expected even under
heavier loads.</p>
      <p>As a test tool Apache Bench4 is used, a command-line program that measures connection and
response times of HTTP servers, while maintaining parallel connections. A call for a measurement
follows the following command line pattern:
ab -c &lt;number of parallel calls&gt; -n &lt;total number of calls&gt; \
-H "Authorization: Bearer &lt;JWT&gt;" "http://&lt;Gateway URL&gt;/error"</p>
      <p>All measurements have been executed on a laptop with Intel i5 9th generation, 16 GB memory (OS
Windows 10).</p>
      <p>The best results of a category and concurrency level are marked in green, the worst in red. It
becomes clear that Spring Cloud Gateway takes the least amount of time per request at almost all
stages. Spring Cloud Gateway provides a set of libraries for building an API Gateway on top of the
Spring and Spring Boot Framework[9]. However, it must also be considered that some tools could
possibly perform better in these areas if executed on better and more hardware resources, as some
tools are designed for larger installations. But that has not been part of this study.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>The ZDZW project has received funding from the European Union’s Horizon Europe program
under grant agreement No 101057404. Views and opinions expressed are, however, those of the
author(s) only and do not necessarily reflect those of the European Union. Neither the European
Union nor the granting authority can be held responsible for them.</p>
      <sec id="sec-5-1">
        <title>Platform technologies of the project ZDZW: https://www.zdzw</title>
        <p>project.eu/outcomes/ SPRING Data: https://spring.io/projects/spring-data/
SPRING Security: https://spring.io/projects/spring-security/
SPRING Cloud Gateway: https://spring.io/projects/spring-cloud-gateway/
Swagger Parser: https://github.com/swagger-api/swagger-parser</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Declaration on Generative AI</title>
      <sec id="sec-6-1">
        <title>The author(s) have not employed any Generative AI tools.</title>
        <p>[3] Walls, Craig. Spring in action. Simon and Schuster, 2022.
[4] Spilca, Laurentiu. Spring security in action. Simon and Schuster, 2020.
[5] Nguyen, Quy, and Oras F. Baker. Applying Spring Security Framework and OAuth2 To Protect</p>
        <p>Microservice Architecture API. J. Softw. 14.6 (2019): 257-264.
[6] Trebichavský, Richard. "API Gateways and Microservice Architectures." 2021.
[7] Apache Bench 2024. URL: https://httpd.apache.org/docs/2.4/programs/ab.html
[8] Nginx. URL: https://en.wikipedia.org/wiki/Nginx
[9] SPRING Cloud Gateway. URL: https://spring.io/projects/spring-cloud-gateway/
[10] Netflix Zuul. URL: https://github.com/Netflix/zuul/wiki
[11] webMethods API Gateway 2024. URL: https://www.softwareag.cloud/site/product/webmethods
api.html</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Carnell</surname>
          </string-name>
          , John, and Illary Huaylupo Sánchez.
          <article-title>Spring microservices in action</article-title>
          .
          <source>Simon and Schuster</source>
          ,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Tudose</surname>
            , Catalin,
            <given-names>Christian</given-names>
          </string-name>
          <string-name>
            <surname>Bauer</surname>
            , and
            <given-names>Gavin</given-names>
          </string-name>
          <string-name>
            <surname>King</surname>
          </string-name>
          .
          <article-title>Java persistence with spring data and hibernate</article-title>
          .
          <source>Simon and Schuster</source>
          ,
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>