SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Monoliths to Microservices
The Flipp app is used by millions of
people each week to find deals and
plan their shopping
50M
Downloads
90%
of North America’s
leading retailers
Agenda
1. Background
2. Principles
3. Liberating Data
4. Building Event-Driven Microservices
5. Core Events
1 - Background
Classic Monolithic Architecture
Monolith sprawl
Teams sharing ownership (slow)
Tangled web of dependencies
Significant Technical Debt
Existing implementations hindering change
Multiple sources of truth
Moving Forwards
Modularize and decompose monoliths
While…
Event-driven microservice
• Decouple systems, teams and products
• Streamline application development
2 - Principles
1 - Single Source of Truth
Kafka
2 - Use Event-Driven Microservices
MicroserviceTopic Topic
Microservice
MicroserviceTopic
REST

API
Request/Response
3 - Avro Schemas
• Confluent Schema Registry
• Avro-encode everything published to Kafka
• Compatibility & Isolation
Schema

Registry
Producer ConsumerTopic
1) Validate /

Register
2) Publish 3) Consume
4) Obtain Schema
5) Process
4 - Bounded Contexts - Services
Microservice
Topic - User Images
Business Functions
Technological Functions
Topic - Partner
Microservice
File

Store
Technological Functions
Microservice
File

Store
Business Functions
Microservice
Topic - User Images
Topic - Partner
5 - Align Systems, Teams and Products
Team 1 Team 2
PII
Financial
Outgoing: 3

Incoming: 0
Outgoing: 0

Incoming: 3
6a - Language and Technology Toolbox
Free-for-All Fully RestrictedToolbox
Criteria
& Selection
Process
Toolbox
Languages
Frameworks
Datastores
Services
Accepted
6b - Toolbox -Templates & Generators
~Topic- Topic-
State
State
~Topic-
REST

API
~Topic-
Topic-
REST

API
~
Topic-
7 - Single Unit of Deployability
State~Topic-
REST

API
Service 1 Service 2 Service 3
Single Unit of Deployability
3 - Liberating Data
Why Liberation
• Decouple existing systems
• Support single-source of truth Principle
• Necessary for EDM
Kafka Connect - Pros
• Easy to get started
• Supports many connectors
• Can be use DB CDC, like Debezium
• Can source and sink data
Kafka Connect - Cons
• Inadvertently expose inner data structures
• Performance Issues (Source)
• Cluster Overhead
• Inter-team dependencies (owners vs users)
• Setting Precedence - Lethargy towards moving to EDM
Direct Production of Records
Monolith
Tabl
e
Tabl
e
Tabl
e
Tabl
e
Event

Producing

Logic
Isolate the Internals
Topic
Topic
Topic
Uses Confluent Schema Registry
Monolith - Forked Writer Anti-Pattern
Monolith
Data Table
1) Update
Data
2) Update
Table
3) Write to
Kafka
Topic
Lesson - Transactions and Output Table
ActiveReco
rd 

(Rails)
Event Output
Table
Data Table
2) Transaction
1) Update
Data
Producer

(Separate
Thread)
3)
Asynchronous
Publish
Topic
4 - Building Event-Driven
Microservices
What does building an app look like?
Topics &
Schemas
1) Data Discovery
Data Discovery - Data and Topic Lookup
Single Source of Truth
What does building an app look like?
Topics &
Schemas
1) Data Discovery 2) Create microservice
code

repo
register
microservic
3) Register for R/W Topic permissions
Topic-A
Topic-B
Write
Read
Read
4) Obtain Schemas +

Copy to Code Base
Schema-A.avsc
Schema-B.avsc
code

repo
5) Generate Code from Schemas
Schema-A.avsc
Schema-B.avsc
SchemaB.java
SchemaB.java
6) Write Business Logic
Topic-
Topic-
Busines
s

Logic
Topic-
Topic-
CI &
CD
Denormalization + Join Strategy
Exposed relational data as streams
Exists in our data models
Foreign keys
Denormalization vs. Joining
Relational Data - Downstream Join
Monolith
Tabl
e
Tabl
e
Tabl
e
Tabl
e
Topic
Topic
Topic
Tabl
e
Tabl
e
Topic
Topic
Consumer
Consumer
Relational Data - Upstream Denormalize
Monolith
Tabl
e
Tabl
e
Tabl
e
Tabl
e
Tabl
e
Tabl
e
Merge
Topic
Topic Consumer
Consumer
Denormalization + Join Strategy
Denormalize:
Closely related properties
Commonly referenced properties (Data domain knowledge)
Consumers perform joins on:
Distant data
Verbose data
Example - Item Availability
Items
Merchants
Many Items to 

One Merchant
Topics
Item: Key=123, Value={size:M, color: Red, merchant: 500, … }
Merchant: Key=500, Value={name: Josh’s Fishing & Beards, … }
Event Examples
Stock Stock: Key=123, Value={LocationId:9000, Ordered:500, Online:
What do we do
Items
Merchants
Many Items to 

One Merchant
Topics
Stock
One Stock to 

One Item
Item
Eventification
Service
Enriched-
Topic
Item-Stock

Service
Foreign-Key Joins (Stateful)
Kafka Streams (KIP-213 - Used Internally)
External Data Store - Relational Database
Kafka Streams - Rekey + Group By Key?
- Limited by message space - List(A,B,C,D,E,F,G,H,I…)
- Reconciling additions and deletions is extremely problematic
5 - Core Events
Core Events
Primitives
Basic entities (merchants, stock, price, items)
Basic events (user clicked on item)
Core events
Abstractions
Based on primitives or other core events
Business-wide meaning
Example - Budget Fulfillment
Budget
Merchant
UserClick
Topics
Budget

Calculation
Budget

Calculation
Budget

Calculation
App 

Backend
Merchant

Reporting
Search
Team 1
Team 2
Team 3
Example - Budget as Core Event
Budget
Merchant
UserClick
Topics
Budget

Calculation
App 

Backend
Merchant

Reporting
Search
BudgetFill
Team 1
Team 2
Team 3
Core Event
Other Core Event Examples
Resource Availability
Budget, Stock, Promotion, Order Fulfillment
Explicit Patterns of User Behaviour (aka Audiences)
Fraud-risk, churn-risk, geo-fencing
Primitives
Core
Questions?

Contenu connexe

Tendances

The Top 5 Apache Kafka Use Cases and Architectures in 2022
The Top 5 Apache Kafka Use Cases and Architectures in 2022The Top 5 Apache Kafka Use Cases and Architectures in 2022
The Top 5 Apache Kafka Use Cases and Architectures in 2022
Kai Wähner
 
Apache Kafka in Gaming Industry (Games, Mobile, Betting, Gambling, Bookmaker,...
Apache Kafka in Gaming Industry (Games, Mobile, Betting, Gambling, Bookmaker,...Apache Kafka in Gaming Industry (Games, Mobile, Betting, Gambling, Bookmaker,...
Apache Kafka in Gaming Industry (Games, Mobile, Betting, Gambling, Bookmaker,...
Kai Wähner
 

Tendances (20)

The Top 5 Apache Kafka Use Cases and Architectures in 2022
The Top 5 Apache Kafka Use Cases and Architectures in 2022The Top 5 Apache Kafka Use Cases and Architectures in 2022
The Top 5 Apache Kafka Use Cases and Architectures in 2022
 
ksqlDB로 실시간 데이터 변환 및 스트림 처리
ksqlDB로 실시간 데이터 변환 및 스트림 처리ksqlDB로 실시간 데이터 변환 및 스트림 처리
ksqlDB로 실시간 데이터 변환 및 스트림 처리
 
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services Architecture
 
The eBay Architecture: Striking a Balance between Site Stability, Feature Ve...
The eBay Architecture:  Striking a Balance between Site Stability, Feature Ve...The eBay Architecture:  Striking a Balance between Site Stability, Feature Ve...
The eBay Architecture: Striking a Balance between Site Stability, Feature Ve...
 
Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Real-Life Use Cases & Architectures for Event Streaming with Apache KafkaReal-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
 
Microservices design patterns
Microservices design patternsMicroservices design patterns
Microservices design patterns
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito Pact
 
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) PipelineAnatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 
DevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesDevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best Practices
 
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
 
Apache Kafka in Gaming Industry (Games, Mobile, Betting, Gambling, Bookmaker,...
Apache Kafka in Gaming Industry (Games, Mobile, Betting, Gambling, Bookmaker,...Apache Kafka in Gaming Industry (Games, Mobile, Betting, Gambling, Bookmaker,...
Apache Kafka in Gaming Industry (Games, Mobile, Betting, Gambling, Bookmaker,...
 
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
 
Retailing in the Metaverse
Retailing in the MetaverseRetailing in the Metaverse
Retailing in the Metaverse
 
Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics
 
YOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesYOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous Microservices
 
Azure dev ops
Azure dev opsAzure dev ops
Azure dev ops
 

Similaire à The Migration to Event-Driven Microservices (Adam Bellemare, Flipp) Kafka Summit NYC 2019

Introducing Events and Stream Processing into Nationwide Building Society
Introducing Events and Stream Processing into Nationwide Building SocietyIntroducing Events and Stream Processing into Nationwide Building Society
Introducing Events and Stream Processing into Nationwide Building Society
confluent
 
AperiStorageResourceManager
AperiStorageResourceManagerAperiStorageResourceManager
AperiStorageResourceManager
Robert Wipfel
 
ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...
ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...
ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...
eswcsummerschool
 
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
confluent
 

Similaire à The Migration to Event-Driven Microservices (Adam Bellemare, Flipp) Kafka Summit NYC 2019 (20)

Introducing Events and Stream Processing into Nationwide Building Society (Ro...
Introducing Events and Stream Processing into Nationwide Building Society (Ro...Introducing Events and Stream Processing into Nationwide Building Society (Ro...
Introducing Events and Stream Processing into Nationwide Building Society (Ro...
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
 
Introducing Events and Stream Processing into Nationwide Building Society
Introducing Events and Stream Processing into Nationwide Building SocietyIntroducing Events and Stream Processing into Nationwide Building Society
Introducing Events and Stream Processing into Nationwide Building Society
 
Patterns of Streaming Applications
Patterns of Streaming ApplicationsPatterns of Streaming Applications
Patterns of Streaming Applications
 
AperiStorageResourceManager
AperiStorageResourceManagerAperiStorageResourceManager
AperiStorageResourceManager
 
ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...
ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...
ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...
 
Data Streaming with Apache Kafka & MongoDB - EMEA
Data Streaming with Apache Kafka & MongoDB - EMEAData Streaming with Apache Kafka & MongoDB - EMEA
Data Streaming with Apache Kafka & MongoDB - EMEA
 
Webinar: Data Streaming with Apache Kafka & MongoDB
Webinar: Data Streaming with Apache Kafka & MongoDBWebinar: Data Streaming with Apache Kafka & MongoDB
Webinar: Data Streaming with Apache Kafka & MongoDB
 
Enterprise guide to building a Data Mesh
Enterprise guide to building a Data MeshEnterprise guide to building a Data Mesh
Enterprise guide to building a Data Mesh
 
MicroServices-Part-1.pdf
MicroServices-Part-1.pdfMicroServices-Part-1.pdf
MicroServices-Part-1.pdf
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Solr and ElasticSearch demo and speaker feb 2014
Solr  and ElasticSearch demo and speaker feb 2014Solr  and ElasticSearch demo and speaker feb 2014
Solr and ElasticSearch demo and speaker feb 2014
 
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
The Enterprise Guide to Building a Data Mesh - Introducing SpecMesh
The Enterprise Guide to Building a Data Mesh - Introducing SpecMeshThe Enterprise Guide to Building a Data Mesh - Introducing SpecMesh
The Enterprise Guide to Building a Data Mesh - Introducing SpecMesh
 
Mesoscon 2015
Mesoscon 2015Mesoscon 2015
Mesoscon 2015
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
 
Overview of Apache Flink: Next-Gen Big Data Analytics Framework
Overview of Apache Flink: Next-Gen Big Data Analytics FrameworkOverview of Apache Flink: Next-Gen Big Data Analytics Framework
Overview of Apache Flink: Next-Gen Big Data Analytics Framework
 
A Technical Deep Dive on Protecting Acropolis Workloads with Rubrik
A Technical Deep Dive on Protecting Acropolis Workloads with RubrikA Technical Deep Dive on Protecting Acropolis Workloads with Rubrik
A Technical Deep Dive on Protecting Acropolis Workloads with Rubrik
 
(ARC346) Scaling To 25 Billion Daily Requests Within 3 Months On AWS
(ARC346) Scaling To 25 Billion Daily Requests Within 3 Months On AWS(ARC346) Scaling To 25 Billion Daily Requests Within 3 Months On AWS
(ARC346) Scaling To 25 Billion Daily Requests Within 3 Months On AWS
 

Plus de confluent

Plus de confluent (20)

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flink
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalk
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Mesh
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservices
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernization
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time data
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
 
The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023
 
The Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data StreamsThe Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data Streams
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

The Migration to Event-Driven Microservices (Adam Bellemare, Flipp) Kafka Summit NYC 2019

  • 2. The Flipp app is used by millions of people each week to find deals and plan their shopping 50M Downloads 90% of North America’s leading retailers
  • 3. Agenda 1. Background 2. Principles 3. Liberating Data 4. Building Event-Driven Microservices 5. Core Events
  • 5. Classic Monolithic Architecture Monolith sprawl Teams sharing ownership (slow) Tangled web of dependencies Significant Technical Debt Existing implementations hindering change Multiple sources of truth
  • 6. Moving Forwards Modularize and decompose monoliths While… Event-driven microservice • Decouple systems, teams and products • Streamline application development
  • 8. 1 - Single Source of Truth Kafka
  • 9. 2 - Use Event-Driven Microservices MicroserviceTopic Topic Microservice MicroserviceTopic REST
 API Request/Response
  • 10. 3 - Avro Schemas • Confluent Schema Registry • Avro-encode everything published to Kafka • Compatibility & Isolation Schema
 Registry Producer ConsumerTopic 1) Validate /
 Register 2) Publish 3) Consume 4) Obtain Schema 5) Process
  • 11. 4 - Bounded Contexts - Services Microservice Topic - User Images Business Functions Technological Functions Topic - Partner Microservice File
 Store Technological Functions Microservice File
 Store Business Functions Microservice Topic - User Images Topic - Partner
  • 12. 5 - Align Systems, Teams and Products Team 1 Team 2 PII Financial Outgoing: 3
 Incoming: 0 Outgoing: 0
 Incoming: 3
  • 13. 6a - Language and Technology Toolbox Free-for-All Fully RestrictedToolbox Criteria & Selection Process Toolbox Languages Frameworks Datastores Services Accepted
  • 14. 6b - Toolbox -Templates & Generators ~Topic- Topic- State State ~Topic- REST
 API ~Topic- Topic- REST
 API ~ Topic-
  • 15. 7 - Single Unit of Deployability State~Topic- REST
 API Service 1 Service 2 Service 3 Single Unit of Deployability
  • 17. Why Liberation • Decouple existing systems • Support single-source of truth Principle • Necessary for EDM
  • 18. Kafka Connect - Pros • Easy to get started • Supports many connectors • Can be use DB CDC, like Debezium • Can source and sink data
  • 19. Kafka Connect - Cons • Inadvertently expose inner data structures • Performance Issues (Source) • Cluster Overhead • Inter-team dependencies (owners vs users) • Setting Precedence - Lethargy towards moving to EDM
  • 20. Direct Production of Records Monolith Tabl e Tabl e Tabl e Tabl e Event
 Producing
 Logic Isolate the Internals Topic Topic Topic Uses Confluent Schema Registry
  • 21. Monolith - Forked Writer Anti-Pattern Monolith Data Table 1) Update Data 2) Update Table 3) Write to Kafka Topic
  • 22. Lesson - Transactions and Output Table ActiveReco rd 
 (Rails) Event Output Table Data Table 2) Transaction 1) Update Data Producer
 (Separate Thread) 3) Asynchronous Publish Topic
  • 23. 4 - Building Event-Driven Microservices
  • 24. What does building an app look like? Topics & Schemas 1) Data Discovery
  • 25. Data Discovery - Data and Topic Lookup Single Source of Truth
  • 26. What does building an app look like? Topics & Schemas 1) Data Discovery 2) Create microservice code
 repo register microservic 3) Register for R/W Topic permissions Topic-A Topic-B Write Read Read 4) Obtain Schemas +
 Copy to Code Base Schema-A.avsc Schema-B.avsc code
 repo 5) Generate Code from Schemas Schema-A.avsc Schema-B.avsc SchemaB.java SchemaB.java 6) Write Business Logic Topic- Topic- Busines s
 Logic Topic- Topic- CI & CD
  • 27. Denormalization + Join Strategy Exposed relational data as streams Exists in our data models Foreign keys Denormalization vs. Joining
  • 28. Relational Data - Downstream Join Monolith Tabl e Tabl e Tabl e Tabl e Topic Topic Topic Tabl e Tabl e Topic Topic Consumer Consumer
  • 29. Relational Data - Upstream Denormalize Monolith Tabl e Tabl e Tabl e Tabl e Tabl e Tabl e Merge Topic Topic Consumer Consumer
  • 30. Denormalization + Join Strategy Denormalize: Closely related properties Commonly referenced properties (Data domain knowledge) Consumers perform joins on: Distant data Verbose data
  • 31. Example - Item Availability Items Merchants Many Items to 
 One Merchant Topics Item: Key=123, Value={size:M, color: Red, merchant: 500, … } Merchant: Key=500, Value={name: Josh’s Fishing & Beards, … } Event Examples Stock Stock: Key=123, Value={LocationId:9000, Ordered:500, Online:
  • 32. What do we do Items Merchants Many Items to 
 One Merchant Topics Stock One Stock to 
 One Item Item Eventification Service Enriched- Topic Item-Stock
 Service
  • 33. Foreign-Key Joins (Stateful) Kafka Streams (KIP-213 - Used Internally) External Data Store - Relational Database Kafka Streams - Rekey + Group By Key? - Limited by message space - List(A,B,C,D,E,F,G,H,I…) - Reconciling additions and deletions is extremely problematic
  • 34. 5 - Core Events
  • 35. Core Events Primitives Basic entities (merchants, stock, price, items) Basic events (user clicked on item) Core events Abstractions Based on primitives or other core events Business-wide meaning
  • 36. Example - Budget Fulfillment Budget Merchant UserClick Topics Budget
 Calculation Budget
 Calculation Budget
 Calculation App 
 Backend Merchant
 Reporting Search Team 1 Team 2 Team 3
  • 37. Example - Budget as Core Event Budget Merchant UserClick Topics Budget
 Calculation App 
 Backend Merchant
 Reporting Search BudgetFill Team 1 Team 2 Team 3 Core Event
  • 38. Other Core Event Examples Resource Availability Budget, Stock, Promotion, Order Fulfillment Explicit Patterns of User Behaviour (aka Audiences) Fraud-risk, churn-risk, geo-fencing