Slide 1

Slide 1 text

Design principles for an event driven architecture Commit Conf 2019 Luis García & Pablo Ruiz Madrid, November 2019

Slide 2

Slide 2 text

Commercial Banking Retail Banking Why we are here 2 Luis García Castro @luiyo Pablo Ruiz Subira @prsubi

Slide 3

Slide 3 text

Introduction 3 There is a perfect pairing between microservice-based architectures, Domain Driven Design (DDD) and event-driven architectures

Slide 4

Slide 4 text

4

Slide 5

Slide 5 text

Event Taxonomy 5 Meaning Driven Business Domain Raw Purpose Driven Technical Native Standardized Atomic raw domain Derived (*) business

Slide 6

Slide 6 text

Taxonomy at microservice level 6 (*) each bus represents one specific topic in the Event Bus Domain API BB viewed from the outside Business Technical API Storage Bus Connector CORE Raw Domain Building Block internals Business Technical

Slide 7

Slide 7 text

Standard language 7 API Call API Call Ubiquitous Language Ubiquitous Language Ubiquitous Language Standard Language

Slide 8

Slide 8 text

Bounded Context Bounded Context Cohesion (strong) 8 Producer Consumer Schema Registry Send Schema Read Schema DB DB

Slide 9

Slide 9 text

Reference Data 9 Building Block A Building Block B Master Reference Data Building Block C Datalake

Slide 10

Slide 10 text

Coupling (loose) 10 Product A transaction received Fraud Engine transaction received Fraud Alert!! Communications transaction received Contact customer!! Channel Gateway Contact customer!!

Slide 11

Slide 11 text

Correlation & Inference 11 Domain A Event A Domain B Domain C Event B Domain A Event A Domain B Domain C A & B A & NOT B

Slide 12

Slide 12 text

Traceability & Lineage 12 Domain A Event Id: 1 TraceID: 1 Domain B Domain C Event Id: 2 TraceID: 1 Event Id: 3 TraceID: 1 Event Id: 4 TraceID: 1 Domain D Event Id: 5 TraceID: 5

Slide 13

Slide 13 text

Aggregation / enrichment 13 Domain A Domain B Domain C Name: Peter Surname: Parker Job: Photographer Name: Peter Surname: Parker Alias: Spiderman Domain D Name: Peter Surname: Parker

Slide 14

Slide 14 text

Orchestration 14 Orchestrator Generate Monthly Extract Product A Product B Document Mgm Product A movements Product B movements Statement request with Product A&B movements

Slide 15

Slide 15 text

Choreography 15 Product A transaction received Category Service transaction received transaction categorized Customer Reporting transaction received transaction categorized

Slide 16

Slide 16 text

Reconciliation 16 Domain A Domain B Domain C Domain D Reconciliation? Reconciliation?

Slide 17

Slide 17 text

Privacy / Data Segregation 17 Producer Clear Message Clear Message Producer Consumer Name: Clark Surname Kent Income: 1234.00 Name: Clark Surname Kent Income: 1234.00 Other Consumer Name: **** Surname ***** Income: 1234.00 Consumer Other Consumer

Slide 18

Slide 18 text

Technical/Business Monitoring 18 Domain A Domain B Domain C Alerting

Slide 19

Slide 19 text

One Example 19

Slide 20

Slide 20 text

Example 20 Person table Phone table Digital address table Gender type Phone type DA type PERSON

Slide 21

Slide 21 text

Example 21 Change mobile phone number bus storage API Person Core raw CDC domain Risk Comm technical Contact hst gateway technical Auth Mobile phone number changed domain partner business x2 technical

Slide 22

Slide 22 text

Example 22 Change mobile phone number bus storage API Person Core raw CDC domain Risk Comm technical Contact hst gateway technical Auth Mobile phone number changed domain partner business x2 1 Explicitly 1. Choreography 2. NOT reconciliation 3. NOT event enrichment 4. Correlation 5. Orchestration Everywhere: • Event taxonomy • Strong cohesion • Loose coupling • Lineage and traceability 2 3 4 technical 5

Slide 23

Slide 23 text

How EDA impacts a microservice based architecture 23 Feature EDA impact Loosely coupled Location transparency Strong cohesion Organized around business capabilities Each service is independently deployable Highly maintainable – Easy to maintain Highly testable – Easy to test Each service is as simple as possible Data Management Transaction Management

Slide 24

Slide 24 text

Thank you!! Questions? 24