A Microservice Decomposition Method Through Using Distributed Representation of Source Code

Authors

  • Omar Al-Debagy Department of Electronics Technology, Budapest University of Technology and Economics, Budapest, Hungary
  • Peter Martinek Department of Electronics Technology, Budapest University of Technology and Economics, Budapest, Hungary

DOI:

https://doi.org/10.12694/scpe.v22i1.1836

Keywords:

microservices, microservices decomposition, refactoring

Abstract

This research proposed a novel decomposition method for refactoring monolithic applications into microservices applications using a neural network model (code2vec) for creating code embeddings from the monolithic application source code. As a Result, semantically similar code embeddings are clustered through a hierarchical clustering algorithm to produce microservices candidates to resemble the domain model more efficiently. The quality characteristics of the results were measured using two metrics for measuring cohesion. These metrics were Cohesion at Message Level (CHM) and Cohesion at Domain Level (CHD). Also, four applications were used as test cases with different sizes ranging from small to big applications. The proposed method showed promising results in terms of cohesion when compared to other decomposition methods. The proposed method scored better scores in 5 out of 8 tests compared to other methods. Also, averaged CHD and CHM results were 0.52 and 0.76, respectively, for the proposed method, better results when compared to the other methods.

Downloads

Published

2021-02-09

Issue

Section

Research Papers