Microservices adoption anti-pattern: Trying to fly before you can walk
microservices adoption anti-patternsSo far in this series I’ve covered the following anti-patterns
Another anti-pattern that I’ve observed is Trying to fly before you can walk. It occurs when an organization attempts to adopt the microservice architecture (an advanced technique) without (or not committing to) practicing basic software development techniques, such as clean code, good design, and automated testing.
Quite often, management continues to be focussed on schedule and features and consequently overlooks key software quality attributes, such as maintainability, testability and code coverage.
Consequences
Trying to adopt microservices without practicing the basics of software development is likely to lead to disappointment. The microservice architecture requires good design skills and test automation. A badly designed microservice architecture that lacks automated tests is likely to be worse than a monolith. Moreover, messy code will reduce your ability to deliver software rapidly and frequently.
A better approach
When adopting microservices, an organization needs to embrace fundamentals, such as:
- Clean code - implement automated code quality enforcement as part of the deployment pipeline
- Automated testing - developers must be required to write automated tests as part of development. While test coverage is not the best metric, it should also be enforced by the deployment pipeline. Also, while test-driven development (TDD) is not mandatory, an organization might want to require it initially in order to instill the testing habit.
-
Design skills - such as object-oriented design (OOD) or Domain-driven design (DDD). Services must have stable, well-designed APIs. Also, in order to avoid creating a distributed monolith, which requires numerous services to be changed in lock step, developers need to have the design skills to carefully define service boundaries and responsibilities.
- Read my Microservices patterns book
- Read or watch my O’Reilly Software Architecture conference keynote
- Talk to me about my microservices consulting and training services including how I can help you create a microservices migration roadmap for your organization
- Learn more about microservices at adopt.microservices.io