Tools to migrate a monolith to a microservices architecture, focusing on microservices identification, where the set of identified microservices minimizes the number of system transactions (microservices) associated with a business transaction, aiming to control introduction of relaxed consistency in the system.
Currently implemented for Spring-Boot monoliths that use FenixFramework and Spring Data ORMs.
- The collectors are responsible for collecting all the necessary data from a given codebase, either with static or dynamic analysis.
- The Spring Boot Server is responsible for managing all codebase information, evaluating decompositions, and recommend decompositions by generating all possible combinations to find the best parameters for each decomposition strategy.
- The Fast API Server is responsible for the clustering operations, and also to expose the Code2Vec model.
- The User Interface allows the user to create codebases by submitting the collectors data to the Spring Boot Server, and create and evaluate several decompositions.
- java 8+ (
java --version
) - nodejs 10+ (
node --version
) - npm 6+ (
npm --version
) - python 3.5+ (
python --version
) - pipenv 2022.6.7 (
pipenv --version
)
- Create the file
specific.properties
in backend/src/main/resources with the correct python command (example in filespecific.properties.example
) - Due to a limitation in SpringBoot documented in spring-projects/spring-boot#2895, .jar files cannot be generated with more than 655535 total files inside. Due to this, make sure the folder
/codebases
is empty before building the project.
cd scripts/
mkdir models
cd models
wget https://code2vec.s3.amazonaws.com/model/java-large-released-model.tar.gz
tar -xf java-large-released-model.tar.gz
cd collectors/
see README.md for each collector
cd backend/
mvn clean install -DskipTests
java -Djava.security.egd=file:/dev/./urandom -jar ./target/mono2micro-0.0.1-SNAPSHOT.jar
mvn -Dmaven.test.skip=true package # If there are ContextManager issues when refreshing the context
java -jar ./target/mono2micro-0.0.1-SNAPSHOT.jar
cd scripts/
pip install -r requirements.txt
python main.py
cd frontend/
npm install --legacy-peer-deps
npm start
docker-compose build
docker-compose up
docker-compose build --no-cache
docker-compose up --build
docker-compose build
docker-compose up -d
docker compose up --no-deps -d --build backend
The web service can be accessed in http://localhost:3000 and the mongoDB contents in http://localhost:8081
- The monolith codebases used by the spoon-callgraph, commit-collection and code2vec Collectors are available here.
- The monolith representations, Access and Repository Based, for some codebases are available here.
- The monolith representations, Code Embeddings generated using code2vec, for some codebased are available here.
Looking for a reproducible evaluation package? It's available here.
This project is licensed under the MIT License - see the LICENSE file for details.