A Monolith
on the Dissecting Table:
The Strangler Fig Pattern
in Action
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
Slide 2
Slide 2 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
2
Slide 3
Slide 3 text
!
It's me ... Hans-Peter
• Developer
!
Advocate @ Red Hat
• Open-Source Enthusiast
• 4x Confluent Community Catalyst
• MongoDB Champion since 2020
• based in Graz, Austria
"
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
3
Slide 4
Slide 4 text
system migrations are challenging
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
4
Slide 5
Slide 5 text
!
What about
the big rewrite
and a hard cut-over? !
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
5
Slide 6
Slide 6 text
BIG BANG migrations
often doomed to failure
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
6
Slide 7
Slide 7 text
"If you do a big bang
rewrite, the only thing
you're certain of is a big
bang."
— Martin Fowler
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
7
Slide 8
Slide 8 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
8
Slide 9
Slide 9 text
Migration Goal
• gradually evolve from old into new
• support (temporary) coexistence
• avoid risky big bang rewrite
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
9
Slide 10
Slide 10 text
strangler fig pattern
to the rescue
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
10
Slide 11
Slide 11 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
11
Slide 12
Slide 12 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
12
Slide 13
Slide 13 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
13
Slide 14
Slide 14 text
strangler fig pattern
by example
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
14
Open-Source Change-Data-Capture
• captures data changes by tapping into DB's TX log
• change events propagated via Apache Kafka / Connect
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
20
Slide 21
Slide 21 text
Open-Source Change-Data-Capture
• captures data changes by tapping into DB's TX log
• change events propagated via other messaging systems
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
21
Slide 22
Slide 22 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
22
Slide 23
Slide 23 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
23
Slide 24
Slide 24 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
24
Slide 25
Slide 25 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
25
Slide 26
Slide 26 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
26
Slide 27
Slide 27 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
27
Slide 28
Slide 28 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
28
Slide 29
Slide 29 text
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
29
Slide 30
Slide 30 text
CDC Pipeline Concern #1
We're leaking our
data / domain model.
I want an anti-corruption layer.
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
30
CDC Pipeline Concern #2
But this only replicates data
"row by row".
I might need aggregate structures.
@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023
33