monolithic-to-microservice  by spring-cloud-alibaba-group

Automated microservice decomposition for Java monoliths

Created 1 year ago
352 stars

Top 80.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

MicroWeaver automates the decomposition of monolithic Java applications into microservices. It targets engineers and researchers modernizing legacy systems, offering a hybrid AI-driven approach that simplifies the transition and provides structured evaluation and visualization.

How It Works

MicroWeaver employs a hybrid analysis strategy, integrating static code analysis and dynamic dependency tracing with machine learning. It uses Graph Neural Networks (GNNs) for encoding code structure and LLM embeddings for semantic understanding. This is followed by constraint optimization and optional LLM Agent refinement for optimal microservice partitioning, aiming for high cohesion and low coupling.

Quick Start & Requirements

  • Primary Install/Run: Clone the repo, create a Conda environment (conda env create -f environment.yml, conda activate MicroWeaver), and configure LLM API keys (e.g., export DASHSCOPE_API_KEY=your-dashscope-api-key). For Linux/macOS, bash run.sh executes the full pipeline for sample applications. Alternatively, individual phases can be run using Python modules (e.g., python -m microweaver.input_builder.main) after setting environment variables like APP_NAME and NUM_CLUSTERS.
  • Non-default Prerequisites: Python 3.12+, CUDA 12.6 (recommended for GPU acceleration), Conda, and Java JDK 21+ (required for static/dynamic analysis). Building Java analysis tools (./mvnw package) is optional but recommended for input building.
  • Estimated Setup: Moderate, involving environment setup, potential compilation of Java tools, and LLM API key configuration.

Highlighted Details

  • Four-Phase Pipeline: Automates input building (static/dynamic analysis, LLM descriptions), microservice splitting (GNN, semantic encoding, constraint optimization), evaluation (structural/semantic metrics), and visualization (interactive diagrams, charts, tables).
  • Advanced Decomposition: Leverages R-GAT for structural encoding, BAAI/bge-m3 for semantic vectors, and OR-Tools for multi-objective optimization.
  • Interactive Visualization: Provides a two-level interactive architecture diagram with drill-down, alongside detailed evaluation charts and tables.
  • Built-in Samples: Includes pre-processed data for five classic Java monolithic applications (daytrader, acmeair, jpetstore, plants, trainticket) for immediate experimentation.

Maintenance & Community

No specific details regarding maintenance status, notable contributors, sponsorships, or community channels (e.g., Discord, Slack) are provided in the README.

Licensing & Compatibility

The license type and any compatibility notes for commercial use or closed-source linking are not specified in the README.

Limitations & Caveats

The README does not explicitly detail limitations, alpha status, or known bugs. Decomposition effectiveness depends on static/dynamic analysis quality and LLM semantic understanding.

Health Check
Last Commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Elvis Saravia Elvis Saravia(Founder of DAIR.AI).

DeepCode by HKUDS

0.0%
17k
AI agents transform ideas into production-ready code
Created 1 year ago
Updated 1 day ago
Feedback? Help us improve.