SlideShare a Scribd company logo
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?

More Related Content

PDF
Vector Search for Data Scientists.pdf
PDF
Apache Kafka in the Automotive Industry (Connected Vehicles, Manufacturing 4....
PDF
Data Streaming with Apache Kafka in the Defence and Cybersecurity Industry
PDF
When NOT to use Apache Kafka?
PDF
Kafka Connect and Streams (Concepts, Architecture, Features)
PDF
Stream Processing with Apache Kafka and .NET
PPTX
Extreme Apache Spark: how in 3 months we created a pipeline that can process ...
PDF
Apache Kafka in the Insurance Industry
Vector Search for Data Scientists.pdf
Apache Kafka in the Automotive Industry (Connected Vehicles, Manufacturing 4....
Data Streaming with Apache Kafka in the Defence and Cybersecurity Industry
When NOT to use Apache Kafka?
Kafka Connect and Streams (Concepts, Architecture, Features)
Stream Processing with Apache Kafka and .NET
Extreme Apache Spark: how in 3 months we created a pipeline that can process ...
Apache Kafka in the Insurance Industry

What's hot (20)

PDF
Ml ops on AWS
PDF
Apache Kafka in the Transportation and Logistics
PDF
Introduction to the Disruptor
PDF
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
PDF
Developing event-driven microservices with event sourcing and CQRS (london Ja...
PPTX
Cloud computing pricing models
PDF
Apache Kafka in the Healthcare Industry
PDF
Microservices Best Practices
PPTX
Spring Boot+Kafka: the New Enterprise Platform
PDF
stackconf 2022: Introduction to Vector Search with Weaviate
PDF
MLOps Using MLflow
PDF
GraphRAG is All You need? LLM & Knowledge Graph
PDF
Building Microservices with Apache Kafka
PDF
What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...
PDF
Monitoring Models in Production
PDF
Apache Kafka for Real-time Supply Chain in the Food and Retail Industry
PPTX
Datastax - The Architect's guide to customer experience (CX)
PDF
Unified Big Data Processing with Apache Spark (QCON 2014)
PDF
MLops workshop AWS
PDF
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Ml ops on AWS
Apache Kafka in the Transportation and Logistics
Introduction to the Disruptor
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Developing event-driven microservices with event sourcing and CQRS (london Ja...
Cloud computing pricing models
Apache Kafka in the Healthcare Industry
Microservices Best Practices
Spring Boot+Kafka: the New Enterprise Platform
stackconf 2022: Introduction to Vector Search with Weaviate
MLOps Using MLflow
GraphRAG is All You need? LLM & Knowledge Graph
Building Microservices with Apache Kafka
What is Apache Spark | Apache Spark Tutorial For Beginners | Apache Spark Tra...
Monitoring Models in Production
Apache Kafka for Real-time Supply Chain in the Food and Retail Industry
Datastax - The Architect's guide to customer experience (CX)
Unified Big Data Processing with Apache Spark (QCON 2014)
MLops workshop AWS
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Ad

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

PDF
Introducing Events and Stream Processing into Nationwide Building Society (Ro...
PPTX
Microservices Part 3 Service Mesh and Kafka
PPTX
Introducing Events and Stream Processing into Nationwide Building Society
PDF
Patterns of Streaming Applications
PDF
AperiStorageResourceManager
PDF
ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...
PPTX
Data Streaming with Apache Kafka & MongoDB - EMEA
PPTX
Webinar: Data Streaming with Apache Kafka & MongoDB
PDF
Enterprise guide to building a Data Mesh
PDF
MicroServices-Part-1.pdf
PDF
Apache Kafka - Scalable Message-Processing and more !
PDF
Solr and ElasticSearch demo and speaker feb 2014
PDF
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
PPSX
Microservices Architecture - Cloud Native Apps
PPTX
The Enterprise Guide to Building a Data Mesh - Introducing SpecMesh
PDF
Mesoscon 2015
PPSX
Microservices Docker Kubernetes Istio Kanban DevOps SRE
PDF
170215 msa intro
PPTX
Overview of Apache Flink: Next-Gen Big Data Analytics Framework
PDF
A Technical Deep Dive on Protecting Acropolis Workloads with Rubrik
Introducing Events and Stream Processing into Nationwide Building Society (Ro...
Microservices Part 3 Service Mesh and Kafka
Introducing Events and Stream Processing into Nationwide Building Society
Patterns of Streaming Applications
AperiStorageResourceManager
ESWC SS 2012 - Wednesday Tutorial Barry Norton: Building (Production) Semanti...
Data Streaming with Apache Kafka & MongoDB - EMEA
Webinar: Data Streaming with Apache Kafka & MongoDB
Enterprise guide to building a Data Mesh
MicroServices-Part-1.pdf
Apache Kafka - Scalable Message-Processing and more !
Solr and ElasticSearch demo and speaker feb 2014
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Microservices Architecture - Cloud Native Apps
The Enterprise Guide to Building a Data Mesh - Introducing SpecMesh
Mesoscon 2015
Microservices Docker Kubernetes Istio Kanban DevOps SRE
170215 msa intro
Overview of Apache Flink: Next-Gen Big Data Analytics Framework
A Technical Deep Dive on Protecting Acropolis Workloads with Rubrik
Ad

More from confluent (20)

PDF
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
PPTX
Webinar Think Right - Shift Left - 19-03-2025.pptx
PDF
Migration, backup and restore made easy using Kannika
PDF
Five Things You Need to Know About Data Streaming in 2025
PDF
Data in Motion Tour Seoul 2024 - Keynote
PDF
Data in Motion Tour Seoul 2024 - Roadmap Demo
PDF
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
PDF
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
PDF
Data in Motion Tour 2024 Riyadh, Saudi Arabia
PDF
Build a Real-Time Decision Support Application for Financial Market Traders w...
PDF
Strumenti e Strategie di Stream Governance con Confluent Platform
PDF
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
PDF
Building Real-Time Gen AI Applications with SingleStore and Confluent
PDF
Unlocking value with event-driven architecture by Confluent
PDF
Il Data Streaming per un’AI real-time di nuova generazione
PDF
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
PDF
Break data silos with real-time connectivity using Confluent Cloud Connectors
PDF
Building API data products on top of your real-time data infrastructure
PDF
Speed Wins: From Kafka to APIs in Minutes
PDF
Evolving Data Governance for the Real-time Streaming and AI Era
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
Webinar Think Right - Shift Left - 19-03-2025.pptx
Migration, backup and restore made easy using Kannika
Five Things You Need to Know About Data Streaming in 2025
Data in Motion Tour Seoul 2024 - Keynote
Data in Motion Tour Seoul 2024 - Roadmap Demo
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
Data in Motion Tour 2024 Riyadh, Saudi Arabia
Build a Real-Time Decision Support Application for Financial Market Traders w...
Strumenti e Strategie di Stream Governance con Confluent Platform
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
Building Real-Time Gen AI Applications with SingleStore and Confluent
Unlocking value with event-driven architecture by Confluent
Il Data Streaming per un’AI real-time di nuova generazione
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
Break data silos with real-time connectivity using Confluent Cloud Connectors
Building API data products on top of your real-time data infrastructure
Speed Wins: From Kafka to APIs in Minutes
Evolving Data Governance for the Real-time Streaming and AI Era

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Modernizing your data center with Dell and AMD
PDF
Approach and Philosophy of On baking technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Advanced Soft Computing BINUS July 2025.pdf
Spectral efficient network and resource selection model in 5G networks
NewMind AI Weekly Chronicles - August'25 Week I
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Understanding_Digital_Forensics_Presentation.pptx
GamePlan Trading System Review: Professional Trader's Honest Take
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Modernizing your data center with Dell and AMD
Approach and Philosophy of On baking technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Advanced Soft Computing BINUS July 2025.pdf

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