Reusability in MLOps: Leveraging Ports and Adapters to Build a Microservices Architecture for the Maritime Domain
Renato Cordeiro Ferreira, Aditya Dhinavahi, Rowanne Trapmann, Willem-Jan van den Heuvel
TL;DR
<3-5 sentence high-level summary> This experience report addresses building a maritime anomaly-detection MLES using Ports and Adapters within a Hexagonal Architecture. It proposes a monorepo-driven, microservices approach enabling multiple end-to-end services from a single codebase, with explicit data flows across Data Ingestor, Data Processor, Data Loader, Anomaly Detector, and API. It discusses challenges in generality and separation of concerns and distills lessons on compatibility, extensibility, and incremental development to guide future reusable, domain-specific MLES architectures. The work provides practical guidance for engineers implementing scalable, reusable MLES in the maritime domain and demonstrates how architectural patterns can accelerate parallel development across teams.
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.
