AI-Driven Legacy Application Modernization
Key Points
- Maja Vuković introduces Project Minerva for Modernization, which leverages AI and machine learning to automate the refactoring of legacy enterprise applications into microservices.
- Building on the large, multilingual code dataset from Project CodeNet, Minerva addresses common pitfalls of traditional refactoring such as tightly‑coupled classes, distributed monoliths, and broken distributed transactions.
- The approach combines advanced program analysis with AI‑driven partitioning to improve the quality and independence of generated microservices, enabling safer, more manageable migration paths.
- A practical example shows how naive call‑flow analysis might incorrectly split classes A, B, and C into separate services, while Minerva detects hidden shared state (e.g., common SQL handlers) that would require tighter coupling or redesign.
- By automating these insights, Minerva reduces the need for extensive manual rewrites, allowing teams to modernize legacy three‑tier systems more reliably and efficiently.
Sections
- Untitled Section
- Cargo Algorithm Optimizes Microservice Partitioning - The speaker explains that while a naïve split would place ticket classes A, B, and C into separate services, the Cargo algorithm from Project Minerva detects tight coupling between A and B, recommends bundling them into one microservice and isolating C, thereby improving partition quality, reducing latency, and boosting throughput in complex airline systems.
Full Transcript
# AI-Driven Legacy Application Modernization **Source:** [https://www.youtube.com/watch?v=2fszvFC-O2I](https://www.youtube.com/watch?v=2fszvFC-O2I) **Duration:** 00:05:51 ## Summary - Maja Vuković introduces Project Minerva for Modernization, which leverages AI and machine learning to automate the refactoring of legacy enterprise applications into microservices. - Building on the large, multilingual code dataset from Project CodeNet, Minerva addresses common pitfalls of traditional refactoring such as tightly‑coupled classes, distributed monoliths, and broken distributed transactions. - The approach combines advanced program analysis with AI‑driven partitioning to improve the quality and independence of generated microservices, enabling safer, more manageable migration paths. - A practical example shows how naive call‑flow analysis might incorrectly split classes A, B, and C into separate services, while Minerva detects hidden shared state (e.g., common SQL handlers) that would require tighter coupling or redesign. - By automating these insights, Minerva reduces the need for extensive manual rewrites, allowing teams to modernize legacy three‑tier systems more reliably and efficiently. ## Sections - [00:00:00](https://www.youtube.com/watch?v=2fszvFC-O2I&t=0s) **Untitled Section** - - [00:03:18](https://www.youtube.com/watch?v=2fszvFC-O2I&t=198s) **Cargo Algorithm Optimizes Microservice Partitioning** - The speaker explains that while a naïve split would place ticket classes A, B, and C into separate services, the Cargo algorithm from Project Minerva detects tight coupling between A and B, recommends bundling them into one microservice and isolating C, thereby improving partition quality, reducing latency, and boosting throughput in complex airline systems. ## Full Transcript
How do you modernize legacy enterprise applications without breaking anything?
Moving to microservices-based architectures may be easier than you think, or at least easier than it was a few years ago.
My name is Maja Vuković and today I will share with you how to use AI to automate application refactoring.
In 2021, we have launched Project CodeNet,
a dataset consisting of over 14 million code samples derived from half a billion lines of code in over 55 languages.
As the community of developers, engineers and researchers grew, there were new additions to the Project CodeNet.
One such advancement is Project Minerva for Modernization.
Project Minerva for Modernization tackles the challenges in automated application refactoring.
So let's take a look.
Typically, enterprise legacy systems have followed a three-tier application architecture,
starting with the top layer being UI, followed by business logic, which talks and interacts with one or more databases.
Within the business logic layer, there are multiple programs and classes
talking and depending on each other, and some of them may no longer be used.
Most of the traditional approaches to application refactoring aim to derive the more microservices architecture.
What does that mean, is that the business logic gets partitioned into multiple microservices,
each of which is meant to be more individual-- stand on its own --so that you can easier detect faults.
It's easier to have individual teams looking after them and it's more easier to manage them once deployed.
Each of them also talks to a separate database.
However, with existing algorithms, what sometimes might happen is that the classes that form these microservices,
they actually might be more tightly coupled, which results in a distributed monolith,
or requires additional rewrite to handle and orchestrate these dependencies.
Similar problems might arise from distributed transactions that get essentially broken as part of the modernization journey.
So with Project Minerva for Modernization, we tackle these challenges.
How does this work in practice?
We bring together innovation from program analysis,
coupled with advances in AI and machine learning to improve the partition quality of microservices.
We all know the complexities of the airline travel and booking the trips.
Let's step step back and look how typically an application would work.
Let's zoom into a couple of classes, such as classes A, B, and C.
Class A is order, Class B is buy ticket action, which calls and relies on the config ticket class.
Now, most of the algorithm, we just observe the call flows between the classes.
It would recommend that order ticket A could be made for microservice one
and that B and C are bundled together in microservice two.
However, as you dig deeper, there's actually a dependency and tight coupling between the two classes.
In the within the heap, they share a couple of objects, such as SQL handler and ticket order.
Moreover, they both write to the same database.
So with the following recommendation, you would actually have to do some work
to remediate that high coupling between--the tight coupling between classes A and B.
And this is where the algorithm Cargo steps in, which is part of the Project Minerva for Modernization.
It actually observes the code and data entanglement and resolves-- remediates --distributed actions.
So based on these observations, Cargo would actually recommend
the classes A and B form one microservice and Class C is separated in another.
It essentially improves the quality of the partition.
Now it might look too simple--there are three classes.
But we all know the complexities of the airline systems.
You have multiple databases, points, users, flights and so on.
You have thousands-- tens of thousands --of classes and multiple interactions.
So you really need a lot of effort to carve out ideal partitions.
We have applied Cargo algorithm on a number of sample applications.And in addition to remediating
distributed transactions, it also helps lower the latency and increase the throughput.
Moreover, it also improves the quality of the partitions.
What it means, it reduces the coupling and increases the cohesion of microservice partitions.
Cargo need not only be applied to the modernization scenarios.
In fact, Cargo can also help you analyze net-new developed microservices and improve their quality.
With this, I would like to invite you to join Project Minerva for Modernization,
as we soon are going to be launching challenges.
Please join us on this mission on improving and advancing the state of the art in application of refactoring.
Thank you.