Abstract
Migrating a monolithic application to a microservice architecture can benefit from automated methods that accelerate migration and improve the results of decomposition. One of the current approaches that guide software architects on the migration is to group monolith domain entities into microservices, using the sequences of accesses of the monolith functionalities to the domain entities. In this paper, we enrich the sequence of accesses solution by applying code vectorization to the monolith, using the Code2Vec neural network model. We apply Code2Vec to vectorize the monolith functionalities. We propose two strategies to represent a functionality, one by aggregating its call graph method vectors and the other by extending the sequence of accesses approach with vectorization of the accessed entities. To evaluate these strategies, we compare the proposed strategies with the sequence of accesses strategy and an existing approach that uses class vectorization. We run all these strategies over a large set of codebases and then compare the results of their decompositions in terms of cohesion, coupling, and complexity.
This work was partially supported by Fundação para a Ciência e Tecnologia (FCT) through projects UIDB/50021/2020 (INESC-ID) and PTDC/CCI-COM/2156/2021 (DACOMICO).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Abdellatif, M., et al.: A taxonomy of service identification approaches for legacy software systems modernization. J. Syst. Softw. 173, 110868 (2021). https://doi.org/10.1016/j.jss.2020.110868
Al-Debagy, O., Martinek, P.: A microservice decomposition method through using distributed representation of source code. Scalable Comput. Pract. Exp. 22(1), 39–52 (2021). https://doi.org/10.12694/scpe.v22i1.1836
Alon, U., Zilberstein, M., Levy, O., Yahav, E.: code2vec: learning distributed representations of code. Proc. ACM Program. Lang. 3(POPL), 1–29 (2019). https://doi.org/10.1145/3290353
Andrade, B., Santos, S., Silva, A.R.: From monolith to microservices: static and dynamic analysis comparison (2022). https://doi.org/10.48550/ARXIV.2204.11844
Brito, M., Cunha, J., Saraiva, J.: Identification of microservices from monolithic applications through topic modelling. In: Proceedings of the ACM Symposium on Applied Computing, pp. 1409–1418 (2021). https://doi.org/10.1145/3412841.3442016
Hammad, M., Banat, R.H.: Automatic class decomposition using clustering. In: Proceedings - 2021 IEEE 18th International Conference on Software Architecture Companion, ICSA-C 2021, pp. 78–81 (2021). https://doi.org/10.1109/ICSA-C52384.2021.00019
Jin, W., Liu, T., Cai, Y., Kazman, R., Mo, R., Zheng, Q.: Service candidate identification from monolithic systems based on execution traces. IEEE Trans. Softw. Eng. 47(5), 987–1007 (2021). https://doi.org/10.1109/TSE.2019.2910531
Lloyd, S.P.: Least squares quantization in PCM. IEEE Trans. Inf. Theory 28, 129–136 (1982). https://doi.org/10.1109/TIT.1982.1056489
Lopes, T., Silva, A.R.: Monolith microservices identification: Towards an extensible multiple strategy tool. In: 2023 IEEE 20th International Conference on Software Architecture Companion (ICSA-C), pp. 127–131 (2023). https://doi.org/10.1109/ICSA-C57050.2023.00034
Ma, S.P., Chuang, Y., Lan, C.W., Chen, H.M., Huang, C.Y., Li, C.Y.: Scenario-based microservice retrieval using Word2Vec. In: Proceedings - 2018 IEEE 15th International Conference on e-Business Engineering, ICEBE 2018, pp. 239–244 (2018). https://doi.org/10.1109/ICEBE.2018.00046
Martin, R.C.: Agile Software Development: Principles, Patterns, and Practices. Pearson, USA (2002)
Mazlami, G., Cito, J., Leitner, P.: Extraction of microservices from monolithic software architectures. Proceedings - 2017 IEEE 24th International Conference on Web Services, ICWS 2017, pp. 524–531 (2017). https://doi.org/10.1109/ICWS.2017.61
Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space (2013). https://doi.org/10.48550/ARXIV.1301.3781
Nunes, L., Santos, N., Rito Silva, A.: From a monolith to a microservices architecture: an approach based on transactional contexts. In: Bures, T., Duchien, L., Inverardi, P. (eds.) ECSA 2019. LNCS, vol. 11681, pp. 37–52. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-29983-5_3
Santos, N., Silva, A.R.: A complexity metric for microservices architecture migration. In: 2020 IEEE International Conference on Software Architecture (ICSA), pp. 169–178 (2020). https://doi.org/10.1109/ICSA47634.2020.00024
Santos, S., Silva, A.R.: Microservices identification in monolith systems: functionality redesign complexity and evaluation of similarity measures. J. Web Eng. 21, 1543–1582 (2022). https://doi.org/10.13052/jwe1540-9589.2158
Welch, B.L.: The generalization of ‘Student’s’ problem when several different population variances are involved. Biometrika 34(1–2), 28–35 (1947). https://doi.org/10.1093/biomet/34.1-2.28
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Faria, V., Silva, A.R. (2023). Code Vectorization and Sequence of Accesses Strategies for Monolith Microservices Identification. In: Garrigós, I., Murillo Rodríguez, J.M., Wimmer, M. (eds) Web Engineering. ICWE 2023. Lecture Notes in Computer Science, vol 13893. Springer, Cham. https://doi.org/10.1007/978-3-031-34444-2_2
Download citation
DOI: https://doi.org/10.1007/978-3-031-34444-2_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-34443-5
Online ISBN: 978-3-031-34444-2
eBook Packages: Computer ScienceComputer Science (R0)