Reusability in MLOps: Leveraging Ports and Adapters to Build a Microservices Architecture for the Maritime Domain

Reading time: 5 minute
...

📝 Original Info

  • Title: Reusability in MLOps: Leveraging Ports and Adapters to Build a Microservices Architecture for the Maritime Domain
  • ArXiv ID: 2512.08657
  • Date: 2025-12-09
  • Authors: ** - Renato Cordeiro Ferreira – Jheronimus Academy of Data Science (JADS), Tilburg University (TiU), ’s‑Hertogenbosch, Netherlands (ORCID: 0000‑0001‑7296‑7091) - Aditya Dhinavahi – Jheronimus Academy of Data Science (JADS), Technical University of Eindhoven (TU/e), ’s‑Hertogenbosch, Netherlands (ORCID: 0009‑0004‑5203‑551X) - Rowanne Trapmann – Jheronimus Academy of Data Science (JADS), Technical University of Eindhoven (TU/e), ’s‑Hertogenbosch, Netherlands (ORCID: 0000‑0001‑5746‑4154) - Willem‑Jan van den Heuvel – Jheronimus Academy of Data Science (JADS), Tilburg University (TiU), ’s‑Hertogenbosch, Netherlands (ORCID: 0000‑0003‑2929‑413X) **

📝 Abstract

ML-Enabled Systems (MLES) are inherently complex since they require multiple components to achieve their business goal. This experience report showcases the software architecture reusability techniques applied while building OCEAN GUARD, an MLES for anomaly detection in the maritime domain. In particular, it highlights the challenges and lessons learned to reuse the PORTS AND ADAPTERS pattern to support building multiple microservices from a single codebase. This experience report hopes to inspire software engineers, machine learning engineers, and data scientists to apply the HEXAGONAL ARCHITECTURE pattern to build their MLES.

💡 Deep Analysis

Figure 1

📄 Full Content

Reusability in MLOps: Leveraging Ports and Adapters to Build a Microservices Architecture for the Maritime Domain Renato Cordeiro Ferreira Jheronimus Academy of Data Science (JADS) Tilburg University (TiU) ’s-Hertogenbosch, The Netherlands 0000-0001-7296-7091 Aditya Dhinavahi Jheronimus Academy of Data Science (JADS) Technical University of Eindhoven (TU/e) ’s-Hertogenbosch, The Netherlands 0009-0004-5203-551X Rowanne Trapmann Jheronimus Academy of Data Science (JADS) Technical University of Eindhoven (TU/e) ’s-Hertogenbosch, The Netherlands 0000-0001-5746-4154 Willem-Jan van den Heuvel Jheronimus Academy of Data Science (JADS) Tilburg University (TiU) ’s-Hertogenbosch, The Netherlands 0000-0003-2929-413X Abstract—ML-Enabled Systems (MLES) are inherently complex since they require multiple components to achieve their business goal. This experience report showcases the software architecture reusability techniques applied while building OCEAN GUARD, an MLES for anomaly detection in the maritime domain. In particular, it highlights the challenges and lessons learned to reuse the PORTS AND ADAPTERS pattern to support building multiple microservices from a single codebase. This experience report hopes to inspire software engineers, machine learning engineers, and data scientists to apply the HEXAGONAL ARCHITECTURE pattern to build their MLES. Index Terms—MLOps, Software Architecture, Ports and Adapters, Machine Learning-Enabled Systems, Reusability, Maritime Domain, Experience Report. I. INTRODUCTION Maritime transport is important for the functioning of global trade and commerce. Operations in the maritime domain are dynamic and complex for multiple reasons, including vulnerable weather and sea conditions, movement across international boundaries, and compliance with varying regulatory frameworks [1]. The maritime industry faces the challenge of illicit trade, which is a threat to peace and security [2], [3]. Among existing products that identify potential illegal activity at sea, the OCEAN GUARD tool is an extensible Machine Learning– Enabled System (MLES) whose goal is to analyze and detect anomalies across multiple types of data [4]. This study was financed in part by the Coordenac¸˜ao de Aperfeic¸oamento de Pessoal de N´ıvel Superior – Brasil (CAPES) – Finance Code 001. It also received support from the MARIT-D project, co-funded from the Internal Security Fund – Police programme under grant agreement no. 101114216. This experience report describes the software architecture reusability techniques used to develop the OCEAN GUARD tool. It builds upon our first description of the system [4], detailing how our development team applied the PORTS AND ADAPTERS pattern to implement multiple microservices of the MLES from a single monorepo codebase. II. FUNDAMENTALS This section introduces the key concepts and techniques used throughout the paper. A. Machine Learning–Enabled Systems (MLES) MLES are software systems that include components based on Machine Learning (ML) as part of their business logic [5], [6]. OCEAN GUARD is an MLES because it uses ML to implement anomaly detection techniques over maritime data. MLES are complex systems because they rely on multiple components to achieve their task [5]. The usage of different component types and their most common roles has been summarized in different reference architectures available in the literature [7], [8]. The OCEAN GUARD tool follows the reference architecture proposed by Ferreira [9], as detailed in section V. B. Hexagonal Architecture The HEXAGONAL ARCHITECTURE pattern, also known as the PORTS AND ADAPTERS pattern, was first described by Cockburn [10]. Its goal is to decouple the application’s core business logic from external dependencies [11], such as storage or presentation. arXiv:2512.08657v1 [cs.SE] 9 Dec 2025 This pattern is commonly described for implementing microservices [12], [13]. The code of an application that follows the HEXAGONAL ARCHITECTURE pattern usually can be divided in three layers: • core, which implements the business logic, usually by following Domain-Driven Design patterns [14]; • ports, which defines contracts for the interaction between the core and external dependencies; and • adapters, which implement the contracts defined by the ports, communicating with the external dependencies. Moreover, such an application requires an entry point that can connect these components via DEPENDENCY INJECTION [11]. The OCEAN GUARD tool has microservices implemented using the HEXAGONAL ARCHITECTURE pattern, as detailed in section VI. III. RELATED LITERATURE Few works in the literature focus on the use of microservices for MLOps. Searching with the keywords “Maritime Microservices with MLOps” on Google Scholar does not provide any meaningful related results. A search for the keywords “Microservices with MLOps” and “Maritime Microservices” results in few related results. Liu et al. [15] proposes the use of microservices to efficiently serve mari

📸 Image Gallery

data_flow.drawio.png services-anomaly_detector.drawio.png services-api.drawio.png services-core.drawio.png services-data_ingestor.drawio.png services-data_loader.drawio.png services-data_processor.drawio.png services-legend.drawio.png

Reference

This content is AI-processed based on open access ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut