Automated Code-Smell Detection in Microservices Through Static Analysis: A Case Study
Open Access
- 3 November 2020
- journal article
- research article
- Published by MDPI AG in Applied Sciences
- Vol. 10 (21) , 7800
Abstract
Microservice Architecture (MSA) is becoming the predominant direction of new cloud-based applications. There are many advantages to using microservices, but also downsides to using a more complex architecture than a typical monolithic enterprise application. Beyond the normal poor coding practices and code smells of a typical application, microservice-specific code smells are difficult to discover within a distributed application setup. There are many static code analysis tools for monolithic applications, but tools to offer code-smell detection for microservice-based applications are lacking. This paper proposes a new approach to detect code smells in distributed applications based on microservices. We develop an MSANose tool to detect up to eleven different microservice specific code smells and share it as open-source. We demonstrate our tool through a case study on two robust benchmark microservice applications and verify its accuracy. Our results show that it is possible to detect code smells within microservice applications using bytecode and/or source code analysis throughout the development process or even before its deployment to production.Keywords
Funding Information
- National Science Foundation (1854049)
- Red Hat Research (https://research.redhat.com/)
This publication has 53 references indexed in Scilit:
- When and Why Your Code Starts to Smell Bad2015
- An Empirical Study of Architectural Change in Open-Source Software Systems2015
- SeByte: Scalable clone and similarity search for bytecodeScience of Computer Programming, 2014
- Aspect-driven, data-reflective and context-aware user interfaces designACM SIGAPP Applied Computing Review, 2013
- Code smells as system-level indicators of maintainability: An empirical studyJournal of Systems and Software, 2013
- Upload your program, share your model2012
- Are automatically-detected code anomalies relevant to architectural modularity?2012
- From a domain analysis to the specification and detection of code and design smellsFormal Aspects of Computing, 2010
- Comparison and evaluation of code clone detection techniques and tools: A qualitative approachScience of Computer Programming, 2009
- A Domain Analysis to Specify Design Defects and Generate Detection Algorithms2008