Slide 1

Slide 1 text

The Rise of Reactive Microservices CraftConf 2022 @duffleit

Slide 2

Slide 2 text

David Leitner @duffleit Coding Architect [email protected] @duffleit

Slide 3

Slide 3 text

The Rise of Reactive Microservices CraftConf 2022 @duffleit

Slide 4

Slide 4 text

@duffleit “ Programming with, or designing upon, asynchronous data streams.

Slide 5

Slide 5 text

@duffleit

Slide 6

Slide 6 text

“ streams are just another data structure. @duffleit Time Space Value Getter Setter Collections Iterators Generators Promise Deferred Resolver Stream Subscriber Emitter

Slide 7

Slide 7 text

“ streams are just another data structure. @duffleit

Slide 8

Slide 8 text

@duffleit “ Programming with, or designing upon, asynchronous data streams.

Slide 9

Slide 9 text

@duffleit var counter = 2; var doubled = counter * 2; 1 2

Slide 10

Slide 10 text

@duffleit var counter = 2; var doubled = counter * 2; assert(doubled, 4); 1 2 3 4 ✅

Slide 11

Slide 11 text

@duffleit var counter = 2; var doubled = counter * 2; // updating the counter counter = 3; 1 2 3 4 5

Slide 12

Slide 12 text

@duffleit var counter = 2; var doubled = counter * 2; // updating the counter counter = 3; assert(doubled, 6) 1 2 3 4 5 6 7 💔

Slide 13

Slide 13 text

@duffleit var counter = 2; var doubled = counter * 2; // updating the counter counter = 3; doubled = counter * 2; 1 2 3 4 5 6

Slide 14

Slide 14 text

@duffleit var counter = 2; var doubled = counter * 2; // updating the counter counter = 3; doubled = counter * 2; assert(doubled, 6) 1 2 3 4 5 6 7 8

Slide 15

Slide 15 text

@duffleit var counter = 2; var doubled = counter * 2; // updating the counter counter = 3; doubled = counter * 2; assert(doubled, 6) 1 2 3 4 5 6 7 8 ✅ doubled 🔗 counter paulstovell.com/reactive-programming/

Slide 16

Slide 16 text

@duffleit var counter = 2; var doubled <= counter * 2; 1 2 doubled 🔗 counter 👆

Slide 17

Slide 17 text

@duffleit var counter = 2; var doubled <= counter * 2; // updating the counter counter = 3; 1 2 3 4 5 doubled 🔗 counter

Slide 18

Slide 18 text

@duffleit var counter = 2; var doubled <= counter * 2; // updating the counter counter = 3; assert(doubled, 6) 1 2 3 4 5 6 7 doubled 🔗 counter ✅

Slide 19

Slide 19 text

@duffleit var counter = stream(2); 1 🔗 = streams 👈 counter: [2]

Slide 20

Slide 20 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) 1 2 👈 counter: [2]

Slide 21

Slide 21 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) 1 2 🔗 = streams 👆 counter: [2]

Slide 22

Slide 22 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) 1 2 👆 counter: [2] doubled: [4]

Slide 23

Slide 23 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) 1 2 “ we project the data from our counter stream into our doubled stream. 👆 counter: [2] doubled: [4]

Slide 24

Slide 24 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) // updating the counter 1 2 3 4 👈 counter: [2] doubled: [4]

Slide 25

Slide 25 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) // updating the counter counter.emit(3); 1 2 3 4 5 👈 counter: [2] doubled: [4]

Slide 26

Slide 26 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) // updating the counter counter.emit(3); 1 2 3 4 5 counter: [2, 3] doubled: [4] 👈

Slide 27

Slide 27 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) // updating the counter counter.emit(3); 1 2 3 4 5 counter: [2, 3] doubled: [4, 6] 👈

Slide 28

Slide 28 text

@duffleit var counter = stream(2); var doubled = counter.map(x -> x * 2) // updating the counter counter.emit(3); assert(doubled.value, 6) 1 2 3 4 5 6 7 👈 counter: [2, 3] doubled: [4, 6] ✅

Slide 29

Slide 29 text

@duffleit

Slide 30

Slide 30 text

@duffleit var counter = new BehaviorSubject(2); 1 👈

Slide 31

Slide 31 text

@duffleit var counter = new BehaviorSubject(2); var doubled = counter.pipe(map(x -> x * 2)); 1 2 👈

Slide 32

Slide 32 text

@duffleit var counter = new BehaviorSubject(2); var doubled = counter.pipe(map(x -> x * 2)); // updating the counter counter.emit(3); 1 2 3 4 5 👈

Slide 33

Slide 33 text

@duffleit var counter = new BehaviorSubject(2); var doubled = counter.pipe(map(x -> x * 2)); // updating the counter counter.emit(3); assert(doubled.value, 6); 1 2 3 4 5 6 7 👈 ✅

Slide 34

Slide 34 text

@duffleit

Slide 35

Slide 35 text

@duffleit var counter = 2; 1 👈

Slide 36

Slide 36 text

@duffleit var counter = 2; $: doubled = counter * 2; 1 2 👈

Slide 37

Slide 37 text

@duffleit var counter = 2; $: doubled = counter * 2; 1 2 👈

Slide 38

Slide 38 text

@duffleit var counter = 2; $: doubled = counter * 2; // updating the counter counter = 3; 1 2 3 4 5 👈

Slide 39

Slide 39 text

@duffleit var counter = 2; $: doubled = counter * 2; // updating the counter counter = 3; assert(doubled, 6); 1 2 3 4 5 6 7 👈 ✅

Slide 40

Slide 40 text

@duffleit We can apply those Concepts of Reactive Programming on Architecture as well. * and hope they still make sense.

Slide 41

Slide 41 text

@duffleit User <μService> Account <μService> Legder <μService> WebBanking New Payment 💸 Perform Payment € 20, 00 👧 Lisa to David from transferMoney triggerPayment createTransactions

Slide 42

Slide 42 text

@duffleit User <μService> Account <μService> Legder <μService> WebBanking Your payment was successfully executed. transferMoney triggerPayment createTransactions ✅

Slide 43

Slide 43 text

@duffleit User <μService> Account <μService> Legder <μService> WebBanking New Payment 💸 Perform Payment € 20, 00 👧 Lisa to David from transferMoney triggerPayment createTransactions <μService> Legder Legder <μService>

Slide 44

Slide 44 text

@duffleit User <μService> Account <μService> Legder <μService> WebBanking Your payment was successfully executed. transferMoney triggerPayment createTransactions ✅ Retries Timeouts Circuit Breakers Synchronise

Slide 45

Slide 45 text

First Generation of MicroServices Synchronously Integrated @duffleit

Slide 46

Slide 46 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment <μService> Legder

Slide 47

Slide 47 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment <μService> Legder

Slide 48

Slide 48 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Queue <μService> Legder

Slide 49

Slide 49 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Queue <μService> Legder

Slide 50

Slide 50 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Queue <μService> Legder

Slide 51

Slide 51 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Queue <μService> Legder

Slide 52

Slide 52 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Queue <μService> Legder

Slide 53

Slide 53 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions Queue <μService> Legder Your payment was accepted. ✅

Slide 54

Slide 54 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions Queue <μService> Legder Your payment was accepted. ✅ Legder <μService>

Slide 55

Slide 55 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions Queue <μService> Legder Your payment was accepted. ✅ Legder <μService>

Slide 56

Slide 56 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions Queue <μService> Legder Your payment was accepted. ✅ Legder <μService> Queue

Slide 57

Slide 57 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions Queue <μService> Legder Your payment was accepted. ✅ Legder <μService> Queue Queue

Slide 58

Slide 58 text

Second Generation of MicroServices Message-Driven and Asynchronously Integrated @duffleit

Slide 59

Slide 59 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Legder <μService> Queue Queue Queue

Slide 60

Slide 60 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Legder <μService> Queue Queue Queue As a Customer, I want my transaction to be booked by the ledger.

Slide 61

Slide 61 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Legder <μService> Queue Queue Queue As a Customer, I want the account service to update my balance.

Slide 62

Slide 62 text

@duffleit User <μService> Account <μService> WebBanking transferMoney triggerPayment createTransactions New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Legder <μService> Queue Queue Queue As a Customer, I want to transfer money to someone else.

Slide 63

Slide 63 text

The Entity Service Antipattern. @duffleit

Slide 64

Slide 64 text

Let's create Services along Customer Journeys. @duffleit

Slide 65

Slide 65 text

@duffleit “ On the Criteria To Be Used in Decomposing Systems into Modules — Parnas, 1972

Slide 66

Slide 66 text

Let's create Services along Customer Journeys. @duffleit

Slide 67

Slide 67 text

@duffleit User <μService> Account <μService> WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Legder <μService> Payments <μService> Domain Services Journey Services As a Customer, I want to transfer money to someone else.

Slide 68

Slide 68 text

@duffleit User <μService> Account <μService> WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Legder <μService> Web-BFF <μService> Domain Services Backend For Frontends As a Customer, I want to transfer money to someone else. Mobile-BFF <μService> Mobile Banking € 20, 00 Pay Payment Flow Payment Flow

Slide 69

Slide 69 text

@duffleit No Domain Logic in Backend For Frontends. It's about Ui-Specific Aggregation, to get rid of over-fetching and over-requesting.

Slide 70

Slide 70 text

@duffleit User <μService> Account <μService> WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Legder <μService> Payments <μService> Domain Services Journey Services

Slide 71

Slide 71 text

@duffleit User <μService> Account <μService> WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Legder <μService> Payments <μService> Domain Services Journey Services Balance <μService>

Slide 72

Slide 72 text

@duffleit ⚡ Customer Journey and Entity Data Mismatch Problem

Slide 73

Slide 73 text

@duffleit Users Accounts Transactions Entities Customer Journeys Payments Onboarding Fraud Detection ⚡

Slide 74

Slide 74 text

@duffleit User Account WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Transactions Payments Domain Services Journey Services Onboarding Fraud Detection User Account Account Transactions

Slide 75

Slide 75 text

@duffleit User Account WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Transactions Payments Domain Services Journey Services Onboarding Fraud Detection User Account Account Transactions ⚡ ⚡ ⚡

Slide 76

Slide 76 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Service Autnomy

Slide 77

Slide 77 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Data Duplication ⚡

Slide 78

Slide 78 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Data Syncronisation 🤯 ⚡

Slide 79

Slide 79 text

@duffleit clarify who owns which Data. Always

Slide 80

Slide 80 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions

Slide 81

Slide 81 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Synchronous Calls 😔

Slide 82

Slide 82 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Synchronous Calls 😔

Slide 83

Slide 83 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Cache Account Transactions Synchronous Calls 😔

Slide 84

Slide 84 text

@duffleit “ we project data from our counter variable into our doubled variable. There must be a better solution 🤔

Slide 85

Slide 85 text

@duffleit “ we project the users from our onboarding service into our payments service. There must be a better solution 🤔 Payments User Onboarding User project

Slide 86

Slide 86 text

@duffleit Payments Onboarding User Aggregate User Readmodel UserChangedEvent UserChange Command That's CQRS in a nutshell 🥜 update

Slide 87

Slide 87 text

@duffleit Payments Onboarding User Aggregate User Readmodel UserChangedEvent UserChange Command Stream

Slide 88

Slide 88 text

@duffleit Payments Onboarding User Aggregate User Readmodel UserChange Command Stream UserChangedEvent transform apply

Slide 89

Slide 89 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream

Slide 90

Slide 90 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream

Slide 91

Slide 91 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream

Slide 92

Slide 92 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream

Slide 93

Slide 93 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream Projections

Slide 94

Slide 94 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream Projections

Slide 95

Slide 95 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream Projections

Slide 96

Slide 96 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream Projections

Slide 97

Slide 97 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream

Slide 98

Slide 98 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream Projections

Slide 99

Slide 99 text

@duffleit But didn't we just introduce Eventual Consistency?

Slide 100

Slide 100 text

@duffleit The different faces of Eventual Consistency

Slide 101

Slide 101 text

@duffleit Eventual Consistency Eventual Divergence Dashboard User (age: 22) UserChanged (age: 21) UserChanged (age: 22) Profile User (age: 21) ⚡ timestamp timestamp

Slide 102

Slide 102 text

@duffleit Eventual Consistency Eventual Divergence Eventual Variance Ledger Stream Transaction (+10€) 🔥

Slide 103

Slide 103 text

@duffleit Eventual Consistency Eventual Divergence Eventual Variance Ledger Dashboard Stream 🔥 Transaction (+10€) Transaction (+10€) Balance: 20€

Slide 104

Slide 104 text

@duffleit Eventual Consistency Eventual Divergence Eventual Variance Eventual Latency Service B Stream UserChanged (age: 21) UserChanged (age: 22) Profile User (age: 21) Dashboard User (age: 21) User (age: 22)

Slide 105

Slide 105 text

Single User Context @duffleit Eventual Consistency Eventual Divergence Eventual Variance Eventual Latency Service B Stream UserChanged (age: 21) UserChanged (age: 22) Profile User (age: 21) Dashboard User (age: 21) User (age: 22) 🕰

Slide 106

Slide 106 text

@duffleit Eventual Consistency Eventual Divergence Eventual Variance Eventual Latency same events, different results. same events, different quantity. same events, different realisation. Ordering Guarantees Optimistic UIs At-Least-Once Delivery Deduplication Mechanisms

Slide 107

Slide 107 text

@duffleit tl/dr: Eventual Consistency is often used as a knock-out argument @duffleit

Slide 108

Slide 108 text

@duffleit tl/dr: Eventual Consistency is often used as a knock-out argument but isn't, in most cases. @duffleit

Slide 109

Slide 109 text

@duffleit WebBanking New Payment 💸 € 20, 00 👧 Lisa to David from Perform Payment Payments Journey Services Onboarding Fraud Detection User Account Account Transactions User Account Transactions Stream Projections

Slide 110

Slide 110 text

@duffleit Mobile Banking Usage 93% — Show balance & last transactions 3% — Initiate new payment 4% — Any other functionality

Slide 111

Slide 111 text

@duffleit Payments Journey Services Onboarding Overview User Account Account Transactions User Account Transactions Stream

Slide 112

Slide 112 text

@duffleit Payments Journey Services Onboarding Overview User Account Account Transactions User Account Transactions Stream

Slide 113

Slide 113 text

@duffleit Payments Journey Services Onboarding Overview User Account Account Transactions User Account Transactions Stream

Slide 114

Slide 114 text

@duffleit Payments Journey Services Onboarding Overview User Account Account Transactions User Account Transactions Stream

Slide 115

Slide 115 text

@duffleit Payments Journey Services Onboarding Overview User Account Account Transactions User Account Transactions Stream

Slide 116

Slide 116 text

@duffleit Payments Journey Services Onboarding Overview User Account Account Transactions User Account Transactions Stream 93% of what our users need can still be performed. WebBanking Current Balance: 200€ 👧 You sent Lisa 100€ Christoph sent you 300€

Slide 117

Slide 117 text

@duffleit WebBanking Current Balance: 200€ 👧 You sent Lisa 100€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream Overview Transactions We can easily scale horizontally.

Slide 118

Slide 118 text

@duffleit WebBanking Current Balance: 200€ 👧 You sent Lisa 100€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream Overview Transactions We can easily scale horizontally.

Slide 119

Slide 119 text

@duffleit WebBanking of David Current Balance: 300€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment

Slide 120

Slide 120 text

@duffleit WebBanking of David Current Balance: 300€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment

Slide 121

Slide 121 text

@duffleit WebBanking of David Current Balance: 300€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment

Slide 122

Slide 122 text

@duffleit WebBanking of David Current Balance: 300€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment

Slide 123

Slide 123 text

@duffleit WebBanking of David Current Balance: 300€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment

Slide 124

Slide 124 text

@duffleit WebBanking of David Current Balance: 300€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment

Slide 125

Slide 125 text

@duffleit WebBanking of David Current Balance: 300€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment

Slide 126

Slide 126 text

@duffleit WebBanking of David Current Balance: 300€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment 👧 Lisa sent you 20€

Slide 127

Slide 127 text

@duffleit WebBanking of David Current Balance: 320€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment 👧 Lisa sent you 20€

Slide 128

Slide 128 text

@duffleit WebBanking of David Current Balance: 320€ Christoph sent you 300€ Payments Journey Services Onboarding Overview User Account Transactions User Account Transactions Stream WebBanking of Lisa 👧 New Payment 💸 € 20, 00 David to 👧 Lisa from Perform Payment 👧 Lisa sent you 20€ GraphQL subscriptions mutations Out-of-the-box real-time capabilities.

Slide 129

Slide 129 text

@duffleit WebBanking of David Current Balance: 320€ Christoph sent you 300€ Payments Journey Services Legacy System Accounts Stream 👧 Lisa sent you 20€ User 😮 💨😮 💨 😮 💨 Change Data Capture (CDC) User User

Slide 130

Slide 130 text

Third Generation of MicroServices Built on Reactive Data-Streams @duffleit High Resilience 🔥 Horizontal Scaling ↔ Real Time Integration ⏱ Good Integration with Legacy Systems 🏚

Slide 131

Slide 131 text

Dimensions of Scaling @duffleit Vertical Horizontal Service

Slide 132

Slide 132 text

Dimensions of Scaling @duffleit Vertical Horizontal Service

Slide 133

Slide 133 text

Dimensions of Scaling Vertical Horizontal Service Service Service Stream

Slide 134

Slide 134 text

Dimensions of Scaling Vertical Horizontal Service Service Service Stream

Slide 135

Slide 135 text

Dimensions of Scaling Vertical Horizontal Service Service Service Sharding

Slide 136

Slide 136 text

Dimensions of Scaling Vertical Horizontal Service Service Service Sharding Users A-H Users I-P Users Q-Z

Slide 137

Slide 137 text

Dimensions of Scaling Vertical Horizontal Service Service Service User from User from Users from Service Service Service Sharding

Slide 138

Slide 138 text

@duffleit UserTriggeredPayment

Slide 139

Slide 139 text

@duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment

Slide 140

Slide 140 text

@duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment

Slide 141

Slide 141 text

@duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments

Slide 142

Slide 142 text

@duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments ValidPaymentReceived

Slide 143

Slide 143 text

@duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2

Slide 144

Slide 144 text

Fraud Detection Fraud Detection @duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2 Fraud Detection PaymentCheckedAgainstFraud

Slide 145

Slide 145 text

Fraud Detection Fraud Detection @duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2 Fraud Detection Stream PaymentChecked Partition 0 Partition 1 Partition 2

Slide 146

Slide 146 text

Fraud Detection Fraud Detection @duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2 Fraud Detection Stream PaymentChecked Partition 0 Partition 1 Partition 2 Ledger Ledger Ledger TransactionBooked

Slide 147

Slide 147 text

Fraud Detection Fraud Detection @duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2 Fraud Detection Stream PaymentChecked Partition 0 Partition 1 Partition 2 Ledger Ledger Ledger Partition 0 Partition 1 Partition 2 Stream TransactionBooked

Slide 148

Slide 148 text

Fraud Detection Fraud Detection @duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2 Fraud Detection Partition 0 Partition 1 Partition 2 Ledger Ledger Ledger Partition 0 Partition 1 Partition 2 Projecting Transactions Streams Flink Stream PaymentChecked Stream TransactionBooked Independent Shards

Slide 149

Slide 149 text

Fraud Detection Fraud Detection @duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2 Fraud Detection Stream PaymentChecked Partition 0 Partition 1 Partition 2 Ledger Ledger Ledger Partition 0 Partition 1 Partition 2 Stream TransactionBooked Shard 0 Shard 1 Shard 2 DataSink Streams Flink Projecting Transactions WebBanking WebBanking WebBanking

Slide 150

Slide 150 text

Fraud Detection Fraud Detection @duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2 Fraud Detection Stream PaymentChecked Partition 0 Partition 1 Partition 2 Ledger Ledger Ledger Partition 0 Partition 1 Partition 2 Stream TransactionBooked Shard 0 Shard 1 Shard 2 DataSink Streams Flink Projecting Transactions WebBanking WebBanking WebBanking

Slide 151

Slide 151 text

Fraud Detection Fraud Detection @duffleit Stream UserTriggeredPayment Partition 0 Partition 1 Partition 2 UserTriggeredPayment Payments Payments Payments Stream ValidPaymentReceived Partition 0 Partition 1 Partition 2 Fraud Detection Stream PaymentChecked Partition 0 Partition 1 Partition 2 Ledger Ledger Ledger Partition 0 Partition 1 Partition 2 Stream TransactionBooked Shard 0 Shard 1 Shard 2 DataSink 🚀 We can scale nearly unlimited. Projecting Transactions WebBanking WebBanking WebBanking

Slide 152

Slide 152 text

Forth Generation of MicroServices Shared and fully Stream Based @duffleit Massive Throughput 🚀 Extremely Scalable ↔

Slide 153

Slide 153 text

So many choices, Lets sum up. @duffleit

Slide 154

Slide 154 text

Monolith @duffleit

Slide 155

Slide 155 text

Monolith @duffleit

Slide 156

Slide 156 text

Syncronously 😩 Pain @duffleit

Slide 157

Slide 157 text

Modulith @duffleit

Slide 158

Slide 158 text

Asyncronously 📦 Shared Data @duffleit

Slide 159

Slide 159 text

Reactive ⚡ From Pull to Push @duffleit

Slide 160

Slide 160 text

Streaming Massiv Throughput 🚀 @duffleit

Slide 161

Slide 161 text

Monolith Reactive Push-Based Async Pull-Based Streamed Availability 🟢 , Resilience 🦺 , Scalability ↔ , Throughput 🚀 Complexity 💰 @duffleit

Slide 162

Slide 162 text

Monolith Reactive Push-Based Async Pull-Based Streamed @duffleit The Rise of Reactive Microservices. And the future of fully Stream Based Architectures.

Slide 163

Slide 163 text

David Leitner @duffleit Coding Architect [email protected] @duffleit

Slide 164

Slide 164 text

squer.link / slicing-microservices