DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Legacy Code Refactoring: Tips, Steps, and Best Practices
  • Transforming Proprietary Trace Context to W3C Trace Context
  • AI-Driven API and Microservice Architecture Design for Cloud
  • A Simple Guide To Building Your Own AI-Powered Applications

Trending

  • A Developer's Guide to Mastering Agentic AI: From Theory to Practice
  • Is Agile Right for Every Project? When To Use It and When To Avoid It
  • The Human Side of Logs: What Unstructured Data Is Trying to Tell You
  • The Cypress Edge: Next-Level Testing Strategies for React Developers
  1. DZone
  2. Data Engineering
  3. Databases
  4. Monoliths to Microservices: Untangling Your Spaghetti

Monoliths to Microservices: Untangling Your Spaghetti

Using AI and automation to refactor monolithic applications into microservices.

By 
Tom Smith user avatar
Tom Smith
DZone Core CORE ·
Updated Oct. 26, 22 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
7.1K Views

Join the DZone community and get the full member experience.

Join For Free
I had the opportunity to meet with Bob Quillin, Chief Ecosystem Officer at vFunction. Bob presented in the Source Lounge in the Developer Hub at JavaOne.

The premise of Bob's presentation is to use AI and automation to refactor monolithic apps into microservices faster, easier, and with less risk.

The Pain

Engineering velocity has slowed. Monolithic applications are hindering innovation due to compounding technical debt.  The points of pain include:
  • Long test cycles 
  • Long release cycles
  • Inability to meet business requirements
  • Difficult to ramp up developers
  • Poor customer and user experience

Technical debt has a people effect as well. Developers don't want to work on legacy code, they want to work on greenfield projects. Another pain is that engineering velocity has slowed. Monolithic applications do not scale and have zero elasticity. This results in out-of-control costs, downtime, and poor user experience. 

Microservices are more cost-efficient than monolithic applications. Microservices take advantage of cloud on-demand services like serverless. They also scale. The goal is to break monolithic applications into pieces. Modularize the components into containers. Doing this enables you to see how the code interoperates with each other. Seeing how things connect is a key architecture issue.

Migration to Modernization Strategy

The four stages of a migration to a modernization strategy are:

  • Re-host
  • Re-platform
  • Refactor/Rearchitect/Rewrite
  • Continuous Modernization
Re-host and re-platform involve containerization. Containerization improves security and simplifies DevOps. Yet, there is no:
  • Code modernization
  • Technical debt removal 
  • Architectural changes 
  • Scalability/elasticity
  • Accelerated engineering velocity
While there are significant benefits to microservices:
  • Accelerated engineering velocity
  • Shorter test and release cycles
  • Increased scalability and elasticity
  • Increased innovation
  • An accelerated rate of change aging all applications faster
  • Today's apps will be legacy tomorrow

Use Cases

The three most common 2022 app modernization use cases are as follows.

  1. Broad legacy application estate
  • A large number of applications to assess
  • Unsure what to retire, rewrite, refactor, etc.
  • Need to rank and develop data-driven business cases
2. Megalithic apps with 10M+ lines of code
  • Several key apps identified
  • Business-critical. selective and iterative refactoring required
  • Architects have identified specific services but need tools and acceleration
3. Monoliths in the cloud
  • Monolith is already in the cloud either lifted and shifted or gen 1 cloud apps
  • Costs are rising, agility is falling, and the business is affected
  • Need to realize cloud benefits of agility, release cycles, innovation, velocity, and scalability
Unfortunately, 78% of app modernizations fail. These are manual, not automated.

Two Types of Monoliths

High exclusivity, simple topology, and lower effort:
  • Typical size: Up to 2,000 classes
  • Arrive at the desired microservices architecture in 1 to 2 iterations
  • 90% of monolithic decomposition is automatic
  • Quickly distribute tasks to dev teams
  • Start modernizing services
Low exclusivity, complex topology, higher effort
  • Typical size: 10,000 classes and higher
  • Initial target architecture may differ from the originally desired microservices architecture
  • Refactor sources of complexity
  • Create a common library for monolithic services (90% automatic)
  • Redeploy monolith
  • Reevaluate target architecture

Assessment and Modernization

The assessment hub is a static analysis. It accesses, prioritizes, and builds the business case for application modernization projects by looking at:
  • Technical debt: the level of debt in an app affects the rate and cost of innovation. It is a key business measure for modernization decisions.
  • Risk: analyze how a change in one part of the application will affect another part of the application.
  • Complexity: understand the degree to which class dependencies are entangled.  This reduces the level of modularity of the code.
The modernization hub analyzes, designs, and refactors monolithic applications. It uses machine learning to calculate architectural technical debt. Clusters static dependencies into communities. Extracts features by:
  • Graph complexity of highly connected communities (e.g. infrastructure)
  • Graph complexity of other communities (e.g. service)
  • Connectivity between communities
  • Level of connectivity between service communities
  • The average number of dependents and length of dependency chains

Strangler Fig Pattern

Martin Fowler introduced the strangler fig pattern as a way to manage risk when modernizing or rewriting large, monolithic systems. The pattern is an analogy for a type of plant that begins life as a vine growing alongside an older, established tree,

By using an assessment hub and modernization hub to analyze and extract services, engineers can use networking and load balancing as the "strangler façade." Begin with a monolith. Strangle one service. Strangle many services. End up with a microservices-based architecture. Application owners, architects, and product managers can sign-up for the assessment hub and test three applications at no cost.
Architecture Business requirements Machine learning Requirements engineering User experience applications Cloud Load balancing (computing) microservice tech debt

Opinions expressed by DZone contributors are their own.

Related

  • Legacy Code Refactoring: Tips, Steps, and Best Practices
  • Transforming Proprietary Trace Context to W3C Trace Context
  • AI-Driven API and Microservice Architecture Design for Cloud
  • A Simple Guide To Building Your Own AI-Powered Applications

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!