Refactoring Java Monoliths into Executable Microservice-Based Applications - Freitas, Francisco; Ferreira, André; Cunha, Jácome (Anais do Simpósio Brasileiro de Linguagens de Programação (SBLP), 2021)
In the last few years we have been seeing a drastic change in the way software is developed. Large-scale software projects are being assembled by a flexible composition of many (small) components possibly written in different programming languages and deployed anywhere in the cloud – the so-called microservice-based applications. The dramatic growth in popularity of microservice-based applications has pushed several companies to apply major refactorings to their software systems. However, this is a challenging task that may take several months or even years. We propose a methodology to automatically evolve a Java monolithic application into a microservice-based one. Our methodology receives the Java code and a proposition of microservices and refactors the original classes to make each microservice independent. Our methodology creates an API for each method call to classes that are in other services. The database entities are also refactored to be included in the corresponding service. The initial evaluation shows that our tool can successfully refactor 80% of the applications tested.