Contract-Drift Detection in Event-Driven Microservices Using Runtime Message Semantics: A Literature Synthesis
Main Article Content
Abstract
Event-driven microservice architectures largely dispense with synchronous interfaces, in which producer and consumer services are bound to a shared interface at compile time, and rely instead on asynchronous message contracts that may evolve between services without explicit notice — a condition termed contract drift. This paper synthesises fourteen peer-reviewed and archival papers published between 2017 and 2022 across five domains: microservice architecture, consumer-driven contract testing, semantic versioning, runtime-verification theory, and distributed observability. The synthesis finds that prevailing assurance mechanisms operate predominantly offline and pre-deployment, and therefore cannot detect drift that emerges once a service is in production. Building on an established runtime-verification taxonomy, the paper proposes a structural-similarity measure and a type-agreement measure for quantifying the extent of contract drift; both are computed in flight against a registered baseline contract, and an alert is raised when their weighted combination exceeds a configurable threshold. The available evidence indicates pronounced recent interest in the problem — six of the fourteen papers synthesised were published in 2022 — and suggests that a decentralised, broker-side monitoring architecture is a viable design approach. Open challenges remain in baseline governance, behavioural drift detection, and the absence of standardised benchmarks for comparing runtime contract-monitoring techniques.
Article Details

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
References
[1] I. K. Aksakalli, T. Çelik, A. B. Can, and B. Tekinerdoğan, “Deployment and communication patterns in microservice architectures: A systematic literature review,” J. Syst. Softw., vol. 180, p. 111014, 2021, doi: 10.1016/j.jss.2021.111014.
[2] N. Dragoni et al., “Microservices: yesterday, today, and tomorrow,” Present ulterior Softw. Eng., pp. 195–216, 2017, doi: 10.1007/978-3-319-67425-4_12.
[3] J. Bogner, J. Fritzsch, S. Wagner, and A. Zimmermann, “Industry practices and challenges for the evolvability assurance of microservices: An interview study and systematic grey literature review,” Empir. Softw. Eng., vol. 26, no. 5, p. 104, 2021, doi: 10.1007/s10664-021-09999-9.
[4] J. Lehvä, N. Mäkitalo, and T. Mikkonen, “Consumer-driven contract tests for microservices: A case study,” in International Conference on Product-Focused Software Process Improvement, Springer, 2019, pp. 497–512. doi: 10.1007/978-3-030-35333-9_35.
[5] I. Kohyarnejadfard, D. Aloise, S. V. Azhari, and M. R. Dagenais, “Anomaly detection in microservice environments using distributed tracing data analysis and NLP,” J. Cloud Comput., vol. 11, no. 1, p. 25, 2022, doi: 10.1186/s13677-022-00296-4.
[6] B. Li et al., “Enjoy your observability: an industrial survey of microservice tracing and analysis,” Empir. Softw. Eng., vol. 27, no. 1, p. 25, 2022, doi: 10.1007/s10664-021-10063-9.
[7] L. Ochoa, T. Degueule, J.-R. Falleri, and J. Vinju, “Breaking bad? semantic versioning and impact of breaking changes in maven central: An external and differentiated replication study,” Empir. Softw. Eng., vol. 27, no. 3, p. 61, 2022, doi: 10.1007/s10664-021-10052-y.
[8] L. Zhang et al., “Has my release disobeyed semantic versioning? static detection based on semantic differencing,” in Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering, 2022, pp. 1–12. doi: 10.1145/3551349.3556956.
[9] M. Kim, Q. Xin, S. Sinha, and A. Orso, “Automated test generation for rest apis: No time to rest yet,” in Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis, 2022, pp. 289–301. doi: 10.1145/3533767.3534401.
[10] Y. Liu et al., “Morest: Model-based restful api testing with execution feedback,” in Proceedings of the 44th International Conference on Software Engineering, 2022, pp. 1406–1417. doi: 10.1145/3510003.3510133.
[11] Y. Falcone, S. Krstić, G. Reger, and D. Traytel, “A taxonomy for classifying runtime verification tools,” Int. J. Softw. Tools Technol. Transf., vol. 23, no. 2, pp. 255–284, 2021, doi: 10.1007/s10009-021-00609-z.
[12] A. Francalanza, J. A. Pérez, and C. Sánchez, “Runtime verification for decentralised and distributed systems,” Lect. Runtime Verif. Introd. Adv. Top., pp. 176–210, 2018, doi: 10.1007/978-3-319-75632-5_6.
[13] M. Mettler, D. Mueller-Gritschneder, and U. Schlichtmann, “A distributed hardware monitoring system for runtime verification on multi-tile mpsocs,” ACM Trans. Archit. Code Optim., vol. 18, no. 1, pp. 1–25, 2020, doi: 10.1145/3430699.
[14] J. Fritzsch, J. Bogner, S. Wagner, and A. Zimmermann, “Microservices migration in industry: Intentions, strategies, and challenges,” in 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME), IEEE, 2019, pp. 481–490. doi: 10.1109/ICSME.2019.00081.