Rodrigo Laigner, Ana Carolina Almeida, Wesley K. G. Assunção, Yongluan Zhou
Microservices emerged as a popular architectural style over the last decade. Although designed to be self-contained, microservices must communicate to realize business capabilities, creating dependencies among their data and functionalities. Developers then resort to asynchronous, event-based communication to fulfill such dependencies while reducing coupling. However, developers are often oblivious to the inherent challenges of the event-based communication paradigm, leading to pitfalls that ultimately prompt them to reconsider adopting microservices. To make matters worse, the literature is scarce on the practices and challenges of designing, implementing, testing, monitoring, and troubleshooting event-based microservices. To fill this gap, this article provides the first comprehensive characterization of event management practices and challenges in microservices, based on a repository-mining study of over 8,000 Stack Overflow questions. We find that developers encounter a gamut of problems, including handling large event payloads, modeling event schemas, auditing and debugging event flows, and managing event dependencies and ordering constraints, suggesting that current practices and technologies do not sufficiently serve developers. We review the state of the art and practice through the lens of unveiled challenges and provide actionable implications for developers, providers, and researchers. As a result, our study will support advancing event management solutions in microservices.