SlideShare a Scribd company logo
Modernization Patterns to
Refactor a Legacy Application
Into Event-driven
Microservices
1
Bilgin Ibryam
Product Manager @Red Hat
@bibryam
2
We build our computers
the way we build our cities -
over time, without a plan,
on top of ruins.
Ellen Ullman
About me
3
▸ Product Manager at Red Hat
▸ Former Principal Architect
▸ Committer at Apache Camel
▸ Author
・ Camel Design Patterns
・ Kubernetes Patterns
▸ @ bibryam
▸ https://www.ofbizian.com
About this talk
4
Application migration/modernization Rs
▸ Rehosting - lift-and-shift
▸ Replatorming - lift, tinker, and shift
▸ Refactor / Re-architect
・ Debezium
・ Apache Kafka
・ Kubernetes
Starting point
5
Challenges with monolithic applications
▸ Frequent deployment is difficult
▸ Obstacle to scaling development
▸ Scaling the application can be difficult
Expected modernization benefits
▸ Reduce time to market
▸ Greater team autonomy
▸ Improved automation
▸ Increased application performance
Target state
6
Cloud native microservices’ characteristics
▸ Independently deployable
▸ Modeled around a business domain
▸ Own their data
▸ Emit events (based on EDA)
▸ Built on open source technology such as
Kubernetes, Apache Kafka, Debezium
Measuring the results
▸ Lead time for change
▸ Deployment frequency
▸ Mean time to recovery
Migration
Challenges
Strangler Pattern
8
High-level steps
▸ Identify functional boundary
▸ Migrate/reimplement functionality
▸ Synchronize data
▸ Reroute traffic to new service
▸ Decomposition old service
Main benefits
▸ No big bang migration
▸ Minimal changes to the monolith
▸ Low risk with the ability to fall back
Functional boundary
9
Functional boundary considerations
▸ Aggregates, bounded context based on DDD
▸ Event Storming technique by A. Brandolini
▸ Data model coupling
▸ Module dependencies
Where to start from?
▸ Easy wins
▸ Noticeable improvement
▸ A representative effort
Interception options
10
Prerequisites
▸ Ability to identify inbound calls
▸ Ability to direct calls to new service (and back)
Routing options
▸ Client redirection
▸ Transparent HTTP proxy
▸ Shared protocol translation proxy
▸ Embedded/sidecar proxy
What is Apache Camel?
11
Camel is an integration toolkit that offers:
▸ Hundreds of connectors
▸ Tens of integration patterns
▸ Multiple data formats and languages
▸ Domain specific languages: XML, Java, YAML
Interception options
12 https://k8spatterns.io/
Prerequisites
▸ Ability to identify inbound calls
▸ Ability to direct calls to new service (and back)
Routing options
▸ Client redirection
▸ Transparent HTTP proxy
▸ Shared protocol translation proxy
▸ Embedded/sidecar custom proxy
Kubernetes Pods
13
Deployment guarantees Lifecycle guarantees
Sidecar Pattern
14 https://k8spatterns.io/
Sidecar Pattern
15 https://k8spatterns.io/
Prerequisites
▸ Ability to identify inbound calls
▸ Ability to direct calls to new service (and back)
Routing options
▸ Client redirection
▸ Transparent HTTP proxy
▸ Shared protocol translation proxy
▸ Embedded/sidecar custom proxy
Database strangulation
16
Database first Database and code together
Code first
Data synchronization
17
Cons
▸ Polling delay, might miss updates
▸ Polling overhead
▸ Deletes not captured
▸ Not transparent to writing application
Pros
▸ Simple Installation and configuration
Cons
▸ Varying capabilities
▸ Limited integration capabilities
▸ Not portable
▸ Not easily testable
▸ Not transparent to source database
Pros
▸ No additional application required
Cons
▸ Requires specialized tools
▸ Requires database configuration
Pros
▸ All changes (deletes) are captured
▸ No polling delay or overhead
▸ Transparent to writing application
Triggers Log readers
Queries/Polling
What is Debezium?
18
Debezium in a nutshell
▸ Open source Change Data Capture platform
▸ Snapshotting, filtering, transformations
▸ MySQL, PostgreSQL, MongoDB, SQL Server,
Db2, Oracle, Vitess, Cassandra
▸ Use cases: data replication, cache updates, search index
updates, audit logs, sync data between services
Strangler Pattern with Debezium
19
Strangler Pattern with Debezium
▸ Transparent to the writing application
▸ Initial bulk import through snapshotting
▸ Schema, table, column filtering
▸ Single Message Transformations as anti-corruption layer
▸ Schema Registry for schema validation and
compatibility enforcement of data models
Debezium with Apache Kafka
▸ Guaranteed ordering, message compaction
▸ Pull based - re-read from start, or new changes
▸ Kafka Connect - offset tracking, fail over
Release steps
20
Steps so far
▸ Identified a functional boundary
▸ Migrated it as a new service
▸ Created a new data model in a new database
▸ Automated and deployed everything
▸ Bulk imported data and kept it in-sync
▸ No traffic routed to the new service
Release steps
21
Next step
▸ Route READ traffic to the new service
Release steps
22
Next steps
▸ Route READ and WRITE traffic to the new service
▸ Two-way data synchronization in progress
Release steps
23
Next steps
▸ Stop WRITE traffic to legacy system
▸ Stop data synchronization from legacy system
Release steps
24
Final steps
▸ STOP READ traffic to the legacy application
▸ Stop data synchronization to legacy system
▸ Decommission migrated module
New
Challenges
Modernization challenges
26
Migration challenges
▸ Low-risk changes with demonstrable progress
▸ Deliver enhancements and new “business value”
▸ Simultaneously delivering new services
Distributed systems challenges
▸ Automation and operations at scale
▸ Dual-writes and long-running business transactions
▸ Analytical and reporting data needs
Operating event-driven services at scale
27
Microservices on Kubernetes
▸ Deployment/rollback
▸ Placement/scheduling
▸ Configuration management
▸ Resource/failure isolation
▸ Auto heal/upgrade (through operators)
Event-driven applications on Kubernetes
▸ Strimzi - operating Apache Kafka cluster
▸ KEDA - event-driven workload autoscaling
▸ Debezium - change data capture platform
▸ Apicurio - Schema Registry and operators to run them
Outbox Pattern
28
Offers an approach for services to update their data store and
notify other services in a reliable and eventually consistent
manner.
▸ Addresses the dual-write problem
▸ Offers “read your own writes" semantics
▸ “at-least-once” semantics for consumers
Reliable Data Exchange With the Outbox Pattern
Saga Pattern
29
Splits up long-running business transactions into a series of
multiple local transactions. When implemented using the Outbox
Pattern, it offers the benefits of orchestration and asynchronous
communication.
▸ Orchestration based coordination
▸ Asynchronous communication with Apache Kafka
Saga Orchestration for Microservices Using the Outbox Pattern
Summary
30
Modern software systems are like cities - they evolve over time, on top of legacy systems. Using
proven patterns and standardized tools help create long-lasting systems that grow with your needs.
▸ Strangler Pattern - a low-risk application migration technique
▸ Outbox/Saga Patterns - reliable inter-service communication approach
▸ Debezium - a non-intrusive toolking for change data capture
▸ Kubernetes / Strimzi / Apache Kafka - de facto standards in their fields
Resources
31
▸ Monolith To Microservices
▸ Building Event-Driven Microservices
▸ Designing Data-Intensive Applications
▸ Kubernetes Patterns
▸ Debezium.io
▸ Keda.sh
▸ Strimzi.io
▸ github.com/windup
32
Red Hat OpenShift Streams
for Apache Kafka
a fully managed Apache Kafka service by Red Hat
http://red.ht/TryKafka
Try Apache Kafka in seconds
Thank you!
33
Bilgin Ibryam
Product Manager @Red Hat
@bibryam

More Related Content

PPTX
cloud-migrations.pptx
PPTX
Cloud Adoption Framework - Walking Deck (L100).pptx
PPTX
App Modernization
PPTX
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
PDF
Implications of GPT-3
PDF
BUSINESS ARCHITECTURE OVERVIEW
PPTX
Customer Success Manager Portfolio
PDF
Mainframe Application Modernization for Enterprise Developers
cloud-migrations.pptx
Cloud Adoption Framework - Walking Deck (L100).pptx
App Modernization
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
Implications of GPT-3
BUSINESS ARCHITECTURE OVERVIEW
Customer Success Manager Portfolio
Mainframe Application Modernization for Enterprise Developers

What's hot (20)

PDF
Open shift 4 infra deep dive
PPSX
Cloud Architecture - Multi Cloud, Edge, On-Premise
PPTX
Microservice vs. Monolithic Architecture
PDF
Hexagonal architecture: how, why and when
PPSX
Event Sourcing & CQRS, Kafka, Rabbit MQ
PPSX
Microservices, Containers, Kubernetes, Kafka, Kanban
PDF
Api Gateway
PDF
Real Life Clean Architecture
PDF
Event Driven Architecture (EDA) Reference Architecture
PPTX
Docker Kubernetes Istio
PDF
Introduction to Red Hat OpenShift 4
PPTX
Domain Driven Design
PPSX
Big Data Redis Mongodb Dynamodb Sharding
PDF
Introduction to Kubernetes and GKE
PPTX
The top 3 challenges running multi-tenant Flink at scale
PDF
Scaling your Data Pipelines with Apache Spark on Kubernetes
PPTX
Resiliency vs High Availability vs Fault Tolerance vs Reliability
PPSX
Domain Driven Design
PDF
Design patterns for microservice architecture
PDF
Cloud migration strategies
Open shift 4 infra deep dive
Cloud Architecture - Multi Cloud, Edge, On-Premise
Microservice vs. Monolithic Architecture
Hexagonal architecture: how, why and when
Event Sourcing & CQRS, Kafka, Rabbit MQ
Microservices, Containers, Kubernetes, Kafka, Kanban
Api Gateway
Real Life Clean Architecture
Event Driven Architecture (EDA) Reference Architecture
Docker Kubernetes Istio
Introduction to Red Hat OpenShift 4
Domain Driven Design
Big Data Redis Mongodb Dynamodb Sharding
Introduction to Kubernetes and GKE
The top 3 challenges running multi-tenant Flink at scale
Scaling your Data Pipelines with Apache Spark on Kubernetes
Resiliency vs High Availability vs Fault Tolerance vs Reliability
Domain Driven Design
Design patterns for microservice architecture
Cloud migration strategies
Ad

Similar to Modernization patterns to refactor a legacy application into event driven microservices (20)

PDF
Application modernization patterns with apache kafka, debezium, and kubernete...
PDF
(RivieraDev 2018) #serverless - 2 ans de retourS d'expérience
PDF
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
PPTX
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
PPTX
Best Practices for Building Hybrid-Cloud Architectures | Hans Jespersen
PPTX
DevoxxFR 2018 #serverless - Mettez-le en œuvre dans votre entreprise et arriv...
PDF
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with K...
PDF
Dual write strategies for microservices
PDF
Serverless Streaming Architectures and Algorithms for the Enterprise
PDF
DIMT 2023 SG - Hands-on Workshop_ Getting started with Confluent Cloud.pdf
PDF
.NET Cloud-Native Bootcamp- Los Angeles
PPTX
Cloud computing: highlights
PDF
Unleash the Power of Open Networking
PDF
Streaming Time Series Data With Kenny Gorman and Elena Cuevas | Current 2022
PPTX
The impact of SaaS on cloud integration
PPTX
An introduction to Serverless
PPT
lect15_cloud.ppt
PPT
cloud computng
PDF
Modern application delivery with Consul
PDF
Why Cloud-Native Kafka Matters: 4 Reasons to Stop Managing it Yourself
Application modernization patterns with apache kafka, debezium, and kubernete...
(RivieraDev 2018) #serverless - 2 ans de retourS d'expérience
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Best Practices for Building Hybrid-Cloud Architectures | Hans Jespersen
DevoxxFR 2018 #serverless - Mettez-le en œuvre dans votre entreprise et arriv...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with K...
Dual write strategies for microservices
Serverless Streaming Architectures and Algorithms for the Enterprise
DIMT 2023 SG - Hands-on Workshop_ Getting started with Confluent Cloud.pdf
.NET Cloud-Native Bootcamp- Los Angeles
Cloud computing: highlights
Unleash the Power of Open Networking
Streaming Time Series Data With Kenny Gorman and Elena Cuevas | Current 2022
The impact of SaaS on cloud integration
An introduction to Serverless
lect15_cloud.ppt
cloud computng
Modern application delivery with Consul
Why Cloud-Native Kafka Matters: 4 Reasons to Stop Managing it Yourself
Ad

More from Bilgin Ibryam (11)

PDF
Dapr - A 10x Developer Framework for Any Language
PDF
How to financially survive while growing a small open source project
PDF
What next after microservices
PDF
The Evolution of Distributed Systems on Kubernetes
PDF
Enterprise Integration for Ethereum
PDF
The Kubernetes Effect
PDF
Designing Cloud Native Applications with Kubernetes
PDF
Cloud Native Patterns
ODP
Cloud Native Java Development Patterns
PDF
Cloud Native Camel Design Patterns
PDF
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Dapr - A 10x Developer Framework for Any Language
How to financially survive while growing a small open source project
What next after microservices
The Evolution of Distributed Systems on Kubernetes
Enterprise Integration for Ethereum
The Kubernetes Effect
Designing Cloud Native Applications with Kubernetes
Cloud Native Patterns
Cloud Native Java Development Patterns
Cloud Native Camel Design Patterns
Camel Desing Patterns Learned Through Blood, Sweat, and Tears

Recently uploaded (20)

PDF
top salesforce developer skills in 2025.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Online Work Permit System for Fast Permit Processing
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
L1 - Introduction to python Backend.pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
medical staffing services at VALiNTRY
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
history of c programming in notes for students .pptx
top salesforce developer skills in 2025.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
ISO 45001 Occupational Health and Safety Management System
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Navsoft: AI-Powered Business Solutions & Custom Software Development
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Softaken Excel to vCard Converter Software.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Odoo Companies in India – Driving Business Transformation.pdf
Understanding Forklifts - TECH EHS Solution
Online Work Permit System for Fast Permit Processing
How Creative Agencies Leverage Project Management Software.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
L1 - Introduction to python Backend.pptx
Design an Analysis of Algorithms II-SECS-1021-03
medical staffing services at VALiNTRY
Introduction to Artificial Intelligence
Design an Analysis of Algorithms I-SECS-1021-03
history of c programming in notes for students .pptx

Modernization patterns to refactor a legacy application into event driven microservices

  • 1. Modernization Patterns to Refactor a Legacy Application Into Event-driven Microservices 1 Bilgin Ibryam Product Manager @Red Hat @bibryam
  • 2. 2 We build our computers the way we build our cities - over time, without a plan, on top of ruins. Ellen Ullman
  • 3. About me 3 ▸ Product Manager at Red Hat ▸ Former Principal Architect ▸ Committer at Apache Camel ▸ Author ・ Camel Design Patterns ・ Kubernetes Patterns ▸ @ bibryam ▸ https://www.ofbizian.com
  • 4. About this talk 4 Application migration/modernization Rs ▸ Rehosting - lift-and-shift ▸ Replatorming - lift, tinker, and shift ▸ Refactor / Re-architect ・ Debezium ・ Apache Kafka ・ Kubernetes
  • 5. Starting point 5 Challenges with monolithic applications ▸ Frequent deployment is difficult ▸ Obstacle to scaling development ▸ Scaling the application can be difficult Expected modernization benefits ▸ Reduce time to market ▸ Greater team autonomy ▸ Improved automation ▸ Increased application performance
  • 6. Target state 6 Cloud native microservices’ characteristics ▸ Independently deployable ▸ Modeled around a business domain ▸ Own their data ▸ Emit events (based on EDA) ▸ Built on open source technology such as Kubernetes, Apache Kafka, Debezium Measuring the results ▸ Lead time for change ▸ Deployment frequency ▸ Mean time to recovery
  • 8. Strangler Pattern 8 High-level steps ▸ Identify functional boundary ▸ Migrate/reimplement functionality ▸ Synchronize data ▸ Reroute traffic to new service ▸ Decomposition old service Main benefits ▸ No big bang migration ▸ Minimal changes to the monolith ▸ Low risk with the ability to fall back
  • 9. Functional boundary 9 Functional boundary considerations ▸ Aggregates, bounded context based on DDD ▸ Event Storming technique by A. Brandolini ▸ Data model coupling ▸ Module dependencies Where to start from? ▸ Easy wins ▸ Noticeable improvement ▸ A representative effort
  • 10. Interception options 10 Prerequisites ▸ Ability to identify inbound calls ▸ Ability to direct calls to new service (and back) Routing options ▸ Client redirection ▸ Transparent HTTP proxy ▸ Shared protocol translation proxy ▸ Embedded/sidecar proxy
  • 11. What is Apache Camel? 11 Camel is an integration toolkit that offers: ▸ Hundreds of connectors ▸ Tens of integration patterns ▸ Multiple data formats and languages ▸ Domain specific languages: XML, Java, YAML
  • 12. Interception options 12 https://k8spatterns.io/ Prerequisites ▸ Ability to identify inbound calls ▸ Ability to direct calls to new service (and back) Routing options ▸ Client redirection ▸ Transparent HTTP proxy ▸ Shared protocol translation proxy ▸ Embedded/sidecar custom proxy
  • 15. Sidecar Pattern 15 https://k8spatterns.io/ Prerequisites ▸ Ability to identify inbound calls ▸ Ability to direct calls to new service (and back) Routing options ▸ Client redirection ▸ Transparent HTTP proxy ▸ Shared protocol translation proxy ▸ Embedded/sidecar custom proxy
  • 16. Database strangulation 16 Database first Database and code together Code first
  • 17. Data synchronization 17 Cons ▸ Polling delay, might miss updates ▸ Polling overhead ▸ Deletes not captured ▸ Not transparent to writing application Pros ▸ Simple Installation and configuration Cons ▸ Varying capabilities ▸ Limited integration capabilities ▸ Not portable ▸ Not easily testable ▸ Not transparent to source database Pros ▸ No additional application required Cons ▸ Requires specialized tools ▸ Requires database configuration Pros ▸ All changes (deletes) are captured ▸ No polling delay or overhead ▸ Transparent to writing application Triggers Log readers Queries/Polling
  • 18. What is Debezium? 18 Debezium in a nutshell ▸ Open source Change Data Capture platform ▸ Snapshotting, filtering, transformations ▸ MySQL, PostgreSQL, MongoDB, SQL Server, Db2, Oracle, Vitess, Cassandra ▸ Use cases: data replication, cache updates, search index updates, audit logs, sync data between services
  • 19. Strangler Pattern with Debezium 19 Strangler Pattern with Debezium ▸ Transparent to the writing application ▸ Initial bulk import through snapshotting ▸ Schema, table, column filtering ▸ Single Message Transformations as anti-corruption layer ▸ Schema Registry for schema validation and compatibility enforcement of data models Debezium with Apache Kafka ▸ Guaranteed ordering, message compaction ▸ Pull based - re-read from start, or new changes ▸ Kafka Connect - offset tracking, fail over
  • 20. Release steps 20 Steps so far ▸ Identified a functional boundary ▸ Migrated it as a new service ▸ Created a new data model in a new database ▸ Automated and deployed everything ▸ Bulk imported data and kept it in-sync ▸ No traffic routed to the new service
  • 21. Release steps 21 Next step ▸ Route READ traffic to the new service
  • 22. Release steps 22 Next steps ▸ Route READ and WRITE traffic to the new service ▸ Two-way data synchronization in progress
  • 23. Release steps 23 Next steps ▸ Stop WRITE traffic to legacy system ▸ Stop data synchronization from legacy system
  • 24. Release steps 24 Final steps ▸ STOP READ traffic to the legacy application ▸ Stop data synchronization to legacy system ▸ Decommission migrated module
  • 26. Modernization challenges 26 Migration challenges ▸ Low-risk changes with demonstrable progress ▸ Deliver enhancements and new “business value” ▸ Simultaneously delivering new services Distributed systems challenges ▸ Automation and operations at scale ▸ Dual-writes and long-running business transactions ▸ Analytical and reporting data needs
  • 27. Operating event-driven services at scale 27 Microservices on Kubernetes ▸ Deployment/rollback ▸ Placement/scheduling ▸ Configuration management ▸ Resource/failure isolation ▸ Auto heal/upgrade (through operators) Event-driven applications on Kubernetes ▸ Strimzi - operating Apache Kafka cluster ▸ KEDA - event-driven workload autoscaling ▸ Debezium - change data capture platform ▸ Apicurio - Schema Registry and operators to run them
  • 28. Outbox Pattern 28 Offers an approach for services to update their data store and notify other services in a reliable and eventually consistent manner. ▸ Addresses the dual-write problem ▸ Offers “read your own writes" semantics ▸ “at-least-once” semantics for consumers Reliable Data Exchange With the Outbox Pattern
  • 29. Saga Pattern 29 Splits up long-running business transactions into a series of multiple local transactions. When implemented using the Outbox Pattern, it offers the benefits of orchestration and asynchronous communication. ▸ Orchestration based coordination ▸ Asynchronous communication with Apache Kafka Saga Orchestration for Microservices Using the Outbox Pattern
  • 30. Summary 30 Modern software systems are like cities - they evolve over time, on top of legacy systems. Using proven patterns and standardized tools help create long-lasting systems that grow with your needs. ▸ Strangler Pattern - a low-risk application migration technique ▸ Outbox/Saga Patterns - reliable inter-service communication approach ▸ Debezium - a non-intrusive toolking for change data capture ▸ Kubernetes / Strimzi / Apache Kafka - de facto standards in their fields
  • 31. Resources 31 ▸ Monolith To Microservices ▸ Building Event-Driven Microservices ▸ Designing Data-Intensive Applications ▸ Kubernetes Patterns ▸ Debezium.io ▸ Keda.sh ▸ Strimzi.io ▸ github.com/windup
  • 32. 32 Red Hat OpenShift Streams for Apache Kafka a fully managed Apache Kafka service by Red Hat http://red.ht/TryKafka Try Apache Kafka in seconds
  • 33. Thank you! 33 Bilgin Ibryam Product Manager @Red Hat @bibryam