Skip to main content

Identifying Domain-Based Cyclic Dependencies in Microservice APIs Using Source Code Detectors

  • Conference paper
  • First Online:
Software Architecture (ECSA 2021)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12857))

Included in the following conference series:

Abstract

Isolation, autonomy, and loose coupling are critical success factors of microservice architectures. Unfortunately, systems tend to become strongly coupled over time, sometimes even exhibiting cyclic communication chains, making the individual deployment of services challenging. Such chains are highly problematic when strongly coupled communication e.g. based on synchronous invocations is used, but also create complexity and maintenance issues in more loosely coupled asynchronous or event-based communication. Here, cycles only manifest on a conceptual or domain level, making them hard to track for algorithms that rely solely on static analysis. Accordingly, previous attempts to detect cycles either focused on synchronous communication or had to collect additional runtime data, which can be costly and time-consuming. We suggest a novel approach for identifying and evaluating domain-based cyclic dependencies in microservice systems based on modular, reusable source code detectors. Based on the architecture model reconstructed by the detectors, we derived a set of architectural metrics for detecting and classifying domain-based cyclical dependencies. By conducting two case studies on open-source microservice architectures, we validated the feasibility and applicability of our approach.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/pyparsing/pyparsing/.

  2. 2.

    https://github.com/Microservice-API-Patterns/LakesideMutual.

  3. 3.

    https://github.com/Microservice-API-Patterns/LakesideMutual.

  4. 4.

    Available as a separate branch under https://github.com/Microservice-API-Patterns/LakesideMutual/tree/spring-term-2020, last accessed on August 18, 2021.

  5. 5.

    https://github.com/dotnet-architecture/eShopOnContainers, commit hash 6012fb... from April 12, 2021.

  6. 6.

    https://www.rabbitmq.com/.

  7. 7.

    https://docs.microsoft.com/en-us/azure/service-bus-messaging/.

References

  1. Al-Mutawa, H.A., Dietrich, J., Marsland, S., McCartin, C.: On the shape of circular dependencies in java programs. In: 2014 23rd Australian Software Engineering Conference, pp. 48–57. IEEE (2014)

    Google Scholar 

  2. Assunção, W.K.G., Krüger, J., Mendonça, W.D.F.: Variability management meets microservices: six challenges of re-engineering microservice-based webshops. In: Proceedings of the 24th ACM Conference on Systems and Software Product Line, pp. 1–6. ACM, Montreal Quebec Canada (2020)

    Google Scholar 

  3. Brown, K., Woolf, B.: Implementation patterns for microservices architectures. In: Proceedings of the 23rd Conference on Pattern Languages of Programs, pp. 1–35 (2016)

    Google Scholar 

  4. Dragoni, N., et al.: Microservices: Yesterday, today, and tomorrow. arXiv:1606.04036 [cs], April 2017

  5. Engel, T., Langermeier, M., Bauer, B., Hofmann, A.: Evaluation of microservice architectures: a metric and tool-based approach. In: Mendling, J., Mouratidis, H. (eds.) CAiSE 2018. LNBIP, vol. 317, pp. 74–89. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-92901-9_8

    Chapter  Google Scholar 

  6. Esparrachiari, S., Reilly, T., Rentz, A.: Tracking and controlling microservice dependencies: dependency management is a crucial part of system and software design. Queue 16(4), 44–65 (2018)

    Article  Google Scholar 

  7. Garriga, M.: Towards a taxonomy of microservices architectures. In: Cerone, A., Roveri, M. (eds.) SEFM 2017. LNCS, vol. 10729, pp. 203–218. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-74781-1_15

    Chapter  Google Scholar 

  8. Granchelli, G., Cardarelli, M., Di Francesco, P., Malavolta, I., Iovino, L., Di Salle, A.: Towards recovering the software architecture of microservice-based systems. In: 2017 IEEE International Conference on Software Architecture Workshops (ICSAW), pp. 46–53. IEEE, Gothenburg, April 2017. ISBN 978-1-5090-4793-2

    Google Scholar 

  9. Hohpe, G., Woolf, B.: Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions. Addison-Wesley Professional, Boston (2004)

    Google Scholar 

  10. Johnson, D.B.: Finding all the elementary circuits of a directed graph. SIAM J. Comput. 4(1), 77–84 (1975). ISSN 0097–5397, 1095–7111

    Google Scholar 

  11. Kapferer, S., Zimmermann, O.: Domain-driven service design-context modeling, model refactoring and contract generation. In: Proceedings of the 14th Advanced Summer School on Service-Oriented Computing (SummerSOC’20) (to appear). Springer CCIS (2020)

    Google Scholar 

  12. Kleehaus, M., Uludağ, Ö., Schäfer, P., Matthes, F.: MICROLYZE: a framework for recovering the software architecture in microservice-based environments. In: Mendling, J., Mouratidis, H. (eds.) CAiSE 2018. LNBIP, vol. 317, pp. 148–162. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-92901-9_14

    Chapter  Google Scholar 

  13. Levcovitz, A., Terra, R., Valente, M.T.: Towards a Technique for Extracting Microservices from Monolithic Enterprise Systems. arXiv:1605.03175 [cs], May 2016

  14. Lilienthal, C.: Sustainable Software Architecture: Analyze and Reduce Technical Debt. dpunkt. verlag, Heidelberg (2019)

    Google Scholar 

  15. Lotz, J., Vogelsang, A., Benderius, O., Berger, C.: Microservice architectures for advanced driver assistance systems: a case-study. In: 2019 IEEE International Conference on Software Architecture Companion (ICSA-C), pp. 45–52. IEEE, Hamburg, Germany (2019). ISBN 978-1-72811-876-

    Google Scholar 

  16. Lübke, D., Zimmermann, O., Pautasso, C., Zdun, U., Stocker, M.: Interface evolution patterns: balancing compatibility and extensibility across service life cycles. In: Proceedings of the 24th European Conference on Pattern Languages of Programs - EuroPLop ’19, pp. 1–24. ACM Press, Irsee, Germany (2019). ISBN 978-1-4503-6206-1

    Google Scholar 

  17. Ma, S.P., Fan, C.Y., Chuang, Y., Liu, I.H., Lan, C.W.: Graph-based and scenario-driven microservice analysis, retrieval, and testing. Future Gener. Comput. Syst. 100, 724–735 (2019). ISSN 0167739X

    Google Scholar 

  18. McZara, J., Kafle, S., Shin, D.: Modeling and analysis of dependencies between microservices in devsecOps. In: 2020 IEEE International Conference on Smart Cloud (SmartCloud), pp. 140–147. IEEE, Washington DC, WA, USA, November 2020. ISBN 978-1-72816-547-9

    Google Scholar 

  19. Nadareishvili, I., Mitra, R., McLarty, M., Amundsen, M.: Microservice Architecture: Aligning Principles, Practices, and Culture. “O’Reilly Media, Inc.”, Sebastopol (2016)

    Google Scholar 

  20. Newman, S.: Building Microservices: Designing Fine-Grained Systems. 1st edn. O’Reilly Media, Beijing Sebastopol (2015). ISBN 978-1-4919-5035-7

    Google Scholar 

  21. Ntentos, E., Zdun, U., Plakidas, K., Meixner, S., Geiger, S.: Detector-based component model abstraction for microservice-based systems. Submitted for publication (2020)

    Google Scholar 

  22. Rademacher, F., Sachweh, S., Zündorf, A.: A modeling method for systematic architecture reconstruction of microservice-based software systems. In: Nurcan, S., Reinhartz-Berger, I., Soffer, P., Zdravkovic, J. (eds.) BPMDS/EMMSAD -2020. LNBIP, vol. 387, pp. 311–326. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-49418-6_21

    Chapter  Google Scholar 

  23. Ren, Z., et al.: Migrating web applications from monolithic structure to microservices architecture. In: Proceedings of the Tenth Asia-Pacific Symposium on Internetware, pp. 1–10. ACM, Beijing, September 2018. ISBN 978-1-4503-6590-1

    Google Scholar 

  24. Runeson, P., Höst, M.: Guidelines for conducting and reporting case study research in software engineering. Empirical Softw. Eng. 14(2), 131–164 (2009). ISSN 1382–3256, 1573–7616

    Google Scholar 

  25. Selmadji, A., Seriai, A.D., Bouziane, H.L., Oumarou Mahamane, R., Zaragoza, P., Dony, C.: From monolithic architecture style to microservice one based on a semi-automatic approach. In: 2020 IEEE International Conference on Software Architecture (ICSA), pp. 157–168. IEEE, Salvador, Brazil, March 2020. ISBN 978-1-72814-659-1

    Google Scholar 

  26. Soares de Toledo, S., Martini, A., Przybyszewska, A., Sjoberg, D.I.: Architectural technical debt in microservices: a case study in a large company. In: 2019 IEEE/ACM International Conference on Technical Debt (TechDebt), pp. 78–87. IEEE, Montreal, QC, Canada, May 2019. ISBN 978-1-72813-371-3

    Google Scholar 

  27. Taibi, D., Lenarduzzi, V.: On the definition of microservice bad smells. IEEE Softw. 35(3), 56–62 (2018)

    Article  Google Scholar 

  28. Taibi, D., Lenarduzzi, V., Pahl, C.: Architectural patterns for microservices: a systematic mapping study. In: Proceedings of the 8th International Conference on Cloud Computing and Services Science, pp. 221–232. SCITEPRESS - Science and Technology Publications, Funchal, Madeira, Portugal (2018). ISBN 978-989-758-295-0

    Google Scholar 

  29. Tarjan, R.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972)

    Article  MathSciNet  Google Scholar 

  30. Thones, J.: Microservices. IEEE Softw. 32(1), 116–116 (2015). ISSN 0740–7459

    Google Scholar 

  31. Vural, H., Koyuncu, M.: Does domain-driven design lead to finding the optimal modularity of a microservice? IEEE Access 9, 32721–32733 (2021). ISSN 2169–3536

    Google Scholar 

  32. Walker, A., Das, D., Cerny, T.: Automated code-smell detection in microservices through static analysis: a case study. Appl. Sci. 10(21), 7800 (2020). ISSN 2076–3417

    Google Scholar 

  33. Wolff, E.: Microservices: Flexible Software Architecture. Addison-Wesley, Boston (2017). 978-0-13-460241-7

    Google Scholar 

  34. Yin, R.K.: Case Study Research and Applications: Design and Methods. 6th edn. SAGE, Los Angeles (2018). 978-1-5063-3616-9

    Google Scholar 

  35. Zdun, U., Navarro, E., Leymann, F.: Ensuring and assessing architecture conformance to microservice decomposition patterns. In: Maximilien, M., Vallecillo, A., Wang, J., Oriol, M. (eds.) ICSOC 2017. LNCS, vol. 10601, pp. 411–429. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-69035-3_29

    Chapter  Google Scholar 

Download references

Acknowledgments

This work was supported by: FWF (Austrian Science Fund) project API-ACE: I 4268; FWF (Austrian Science Fund) project IAC\(^2\): I 4731-N; FFG (Austrian Research Promotion Agency) project DECO, no. 864707. Our work has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 952647 (AssureMOSS project).

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Patric Genfer or Uwe Zdun .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Genfer, P., Zdun, U. (2021). Identifying Domain-Based Cyclic Dependencies in Microservice APIs Using Source Code Detectors. In: Biffl, S., Navarro, E., Löwe, W., Sirjani, M., Mirandola, R., Weyns, D. (eds) Software Architecture. ECSA 2021. Lecture Notes in Computer Science(), vol 12857. Springer, Cham. https://doi.org/10.1007/978-3-030-86044-8_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-86044-8_15

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-86043-1

  • Online ISBN: 978-3-030-86044-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics