Slide 1

Slide 1 text

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

Slide 15

Slide 15 text

@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 15

Slide 16

Slide 16 text

@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 16

Slide 17

Slide 17 text

Change-Data-Capture @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 17

Slide 18

Slide 18 text

@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 18

Slide 19

Slide 19 text

Debezium's supported Databases @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 19

Slide 20

Slide 20 text

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

Slide 31

Slide 31 text

Single Message Transforms @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 31

Slide 32

Slide 32 text

Single Message Transforms @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 32

Slide 33

Slide 33 text

CDC Pipeline Concern #2 But this only replicates data "row by row". I might need aggregate structures. @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 33

Slide 34

Slide 34 text

Stream Processor for Joining @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 34

Slide 35

Slide 35 text

@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 35

Slide 36

Slide 36 text

@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 36

Slide 37

Slide 37 text

Wrapping Up • incremental migration → baby steps • pause / stop without losing spent $$$ • extraction steps ideally reversible @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 37

Slide 38

Slide 38 text

⚠ minimize migration risk @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 38

Slide 39

Slide 39 text

Let's stay in touch! ! @hpgrahsl @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 39

Slide 40

Slide 40 text

! Give it a try! " • Strangler Fig Pattern Demo https://bit.ly/sfp-devoxxpl23 @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 40

Slide 41

Slide 41 text

@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 41

Slide 42

Slide 42 text

Links & Resources • Demo Repository https://github.com/hpgrahsl/sfp-devoxxpl23 • Developer Sandbox for Openshift https://developers.redhat.com/developer-sandbox • Debezium Website https://debezium.io • Quarkus https://quarkus.io @hpgrahsl | #DevoxxPL - Kraków, Poland | 2023 42

Slide 43

Slide 43 text

@hpgrahsl | #DevoxxPL - Kraków, Poland | 2023