socialsoftware / mono2micro

MIT License
9 stars 11 forks source link

Mono2Micro

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.

Architecture

1. Collectors

2. Spring Boot Server (Backend)

3. Fast API Server (Scripts)

4. User Inteface (Frontend)

Setup

Pre-Requisites

Spring Boot Server Setup

Fast API Server Setup

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

Run manually

1. To run the Collectors:

cd collectors/
see README.md for each collector

2. To run the Spring Boot Server:

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

3. To run the Fast API Server:

cd scripts/
pip install -r requirements.txt
python main.py

4. To run the Frontend:

cd frontend/
npm install --legacy-peer-deps
npm start

Run using Docker

docker-compose build
docker-compose up

Run using Docker, clean install

docker-compose build --no-cache
docker-compose up --build

Run using Docker and rebuild only backend service after changes

docker-compose build
docker-compose up -d
docker compose up --no-deps -d --build backend

Accessing Web Service

The web service can be accessed in http://localhost:3000 and the mongoDB contents in http://localhost:8081

Experimentation Data

Evaluation package

Looking for a reproducible evaluation package? It's available here.

Publications Data

License

This project is licensed under the MIT License - see the LICENSE file for details.