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.

Highlights

  • Microservices are becoming the preeminent architecture in modern enterprise applications [1].There are several advantages to utilizing this architecture, which have led to its rise in popularity [2].The distributed nature of a microservice-based application allows for greater autonomy of developer units

  • For the potentially wrong cut business microservices, we look for an unbalanced number of service objects, and, lastly, for wrongly cut data microservices, we look for an unbalanced number of entity objects

  • Code smells, which may not break the application in the immediate time-frame, can cause long-lasting problems for maintainability and efficiency later on

Read more

Summary

Introduction

Microservices are becoming the preeminent architecture in modern enterprise applications [1]. The distributed nature of a microservice-based application allows for greater autonomy of developer units While this provides greater flexibility for faster delivery, improved scalability, and benefits in existing problem domains [3], it presents the opportunity for code smells to be more readily created within the application. This paper shows that, when we augment static code analysis to recognize enterprise development constructs, we can effectively detect code smells in distributed microservice applications. Our prototype is based on code analysis and recognizes Java code along with Enterprise Java platform constructs and standards [6,7,8,9,10] It identifies the eleven microservice code smells targeted in this paper.

Related Work
Microservice Code Smell Catalogue
Code Analysis and Extension for Enterprise Architectures
Proposed Solution to Detect Code Smells
ESB Usage
Too Many Standards
Wrong Cuts
Not Having an API Gateway
Shared Persistency
Inappropriate Service Intimacy
Shared Libraries
Cyclic Dependency
5.10. API Versioning
Case Study
Train Ticket
Teacher Management System
Validity threats
Internal Threats
External Threats
Future Trends
Conclusions
An Abstract
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call