The moment we introduce strong coupling between our services, we lose the potential advantages of a microservice architecture:
We can no longer deploy services independently,
Our teams will spend more time in sync meetings than in the code, and
The system becomes incredibly hard to maintain. It’s expensive.
At the same time, it’s harder to reason about dependencies in a distributed microservice system than a traditional monolith. Part of the reason is that static dependency analyzers tend to break down: in a microservice architecture, there aren’t any explicit dependencies in the code, only indirect dependencies via API calls and messages exchanged over a network.
This article addresses the challenge by introducing the concept of a Change Coupling analysis. Change Coupling is a behavioral code analysis technique that uncovers logical dependencies across servicesandteam boundaries. Let’s see it in action.
Prioritize Dependencies that cross Team Boundaries
Tighly coupled services are problematic in general, but there are different circles in any dependency hell. In particular, dependencies between services that cross team boundaries are expensive and immediately creates delivery bottlenecks. Change coupling lets you visualize those dependencies:
Adam Tornhill is a programmer who combines degrees in engineering and psychology. He’s the founder and CTO of CodeScene where he designs tools for code analysis. Adam is also a recognized international speaker and the author of multiple technical books, including the best selling Your Code as a Crime Scene and Software Design X-Rays. Adam’s other interests include modern history, music, retro computing, and martial arts.
Subscribe to our newsletter
Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Semper neque enim rhoncus vestibulum at maecenas.
Ut sociis dignissim.
Latest Articles
6X improvement over SonarQube - Raising the Maintainability bar
CodeScene surpasses SonarQube by 6 times on the public software maintainability dataset, scoring 83% vs. SonarQube's 13.3% using F-score.
CodeScene is a proud sponsor of Pink Programming
We're proud sponsors of Pink Programming, Sweden’s largest community for women and non-binary programmers.
AI Coding Assistants: Introducing CodeScene AI Generated Code Refactoring
AI Coding Assistants: Let's introduce you to AI generated code refactoring. Read more and join the Beta testing program.