Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Code Vectorization and Sequence of Accesses Strategies for Monolith Microservices Identification

  • Conference paper
  • First Online:
Web Engineering (ICWE 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13893))

Included in the following conference series:

  • 886 Accesses

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).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://javaparser.org/.

  2. 2.

    https://github.com/spring-projects/spring-data-jpa/network/dependents.

  3. 3.

    List available in 0. The Data of https://github.com/socialsoftware/mono2micro/blob/feature/code2vec/README.md.

  4. 4.

    https://github.com/socialsoftware/mono2micro/tree/feature/code2vec.

References

  1. 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

    Article  Google Scholar 

  2. 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

    Article  Google Scholar 

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

    Article  Google Scholar 

  8. Lloyd, S.P.: Least squares quantization in PCM. IEEE Trans. Inf. Theory 28, 129–136 (1982). https://doi.org/10.1109/TIT.1982.1056489

    Article  MathSciNet  MATH  Google Scholar 

  9. 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

  10. 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

  11. Martin, R.C.: Agile Software Development: Principles, Patterns, and Practices. Pearson, USA (2002)

    Google Scholar 

  12. 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

  13. 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

  14. 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

    Chapter  Google Scholar 

  15. 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

  16. 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

    Article  Google Scholar 

  17. 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

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to António Rito Silva .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics