SlideShare a Scribd company logo
1 of 51
Download to read offline
Kafka Streams
Quando streams encontram tabelas
Cristiano Altmann
Arquiteto Software
https://www.linkedin.com/in/crisaltmann/
Matheus Alagia
Eng. de Computação
https://www.linkedin.com/in/matheusalagia/
https://ubots.com.br
Microservices
Independent deploy
Low coupling
Horizontal Scalability
Technological choices
Business time
Independent teams
Technological
evolution
Resilient
Microservices is really just distributed
systems!
Increasingly we build ecosystem
The Hardest Part About Microservices:
Your Data
Pessoa Conta Corrente
CPF,
Nome,
Endereço,
Renda, etc.
Número conta,
Tipo,
Lançamentos,
etc
Services with different database
Pessoa Conta Corrente
CPF,
Nome,
Endereço,
Renda, etc.
Número conta,
Tipo,
Lançamentos,
etc
Relatório
CPF, Nome,
Número Conta,
Lançamentos
Services with different database
Pessoa Conta Corrente
CPF,
Nome,
Endereço,
Renda, etc.
Número conta,
Tipo,
Lançamentos,
etc
Relatório
CPF, Nome,
Número
Conta,
Lançamentos
REST
Pessoa Conta Corrente
CPF,
Nome,
Endereço,
Renda, etc.
Número conta,
Tipo,
Lançamentos,
etc
Relatório
CPF, Nome,
Número
Conta,
Lançamentos
Database integration
Pessoa
Relatório
Services with different database
Conta Cartão Previdência Título Serasa Crédito
Streaming processing can be the
answer...
What is Streaming Processing?
“Is some kind of computation over a Data Stream. First and foremost, a data
stream is an abstraction representing an unbounded dataset. Unbounded means
infinite and ever growing.”
Kafka: The Definitive Guide
Streaming processing examples
FILTER
MAP
Stream processing is a programming paradigm...
Request-Response Batch ProcessingStreaming
Processing
Throughput
Latency
The world always changes, and sometimes we are interested
in the events that caused those changes, whereas other
times we are interested in the current state of the world….
Stream-Table Duality
Stream-Table Duality Example
LANÇAMENTOS CONTA CORRENTE
Conta: 1
Valor: 100
Conta: 1
Valor: 200
Conta: 5
Valor: 200
Conta: 1
Valor: -50
Stream-Table Duality Example
LANÇAMENTOS CONTA CORRENTE
Conta: 1
Valor: 100
Conta: 1
Valor: 200
Conta: 5
Valor: 200
Conta: 1
Valor: -50
1: 250
5: 200
Systems that allow you to transition back and forth between
the two ways of looking at data are more powerful than
systems that support just one.
- Neha Narkhede (Kafka: The definitive guide)
Kafka vs Kafka Stream
● Distributed log
● High available
● ⅓ Fortune 500
● APIS:
○ Producer
○ Consumer
○ Connect
○ Streams
● Part of Kafka ecosystem
● Just a lib
● Simple API
● DSL
Stream-Processing Design Patterns
Single-Event Processing
FILTER
Code
External Lookup: Stream-Table Join
Processing with Local State
Mantra: Stateless
Service
Client
STATELESS
STATE STORAGE
??
?
Stateless is good!!
● Services start instantly
● Thread safe
● Scaled out linearly
● Not shared state
But sometimes we need state….
Moving the state to a database just push the
problem to another layer.
Statefull can be good too...
● Services start rapidly
● Thread safe
● Scaled out linearly
● Not shared state
KAFKA STREAMS
● Services start rapidly V
● Thread safe V
● Scaled out linearly V
● Not shared state V
● HIGH THROUGHPUT
Stream
Table
Stream
Stream-Processing Concepts
Time
Event time
Local state
Log append time
State
Processing time
External state
Time Windows
Slide window
Tumbling window
Hopping Window
Stream-Processing Concepts
Time
Event time
Local state
Log append time
State
Processing time
External state
Time Windows
Slide window
Tumbling window
Hopping Window
Stream-Processing Concepts
Time
Event time
Local state
Log append time
State
Processing time
External state
Time Windows
Slide window
Tumbling window
Hopping Window
Join
● Stream - Stream
● Stream - Table
● Table - Table
Stream - Stream (Windowed-join)
Stream - Table
Under the wood
Under the wood
Under the wood
Stream-Processing Landscape
Conclusion
● Stream processing is a powerful tool
● Kafka Streams is simple
● Designed for microservices
Obrigado!
Perguntas?

More Related Content

What's hot

What's hot (20)

Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"
Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"
Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"
 
Building Event Streaming Applications with Pac-Man (Ricardo Ferreira, Conflue...
Building Event Streaming Applications with Pac-Man (Ricardo Ferreira, Conflue...Building Event Streaming Applications with Pac-Man (Ricardo Ferreira, Conflue...
Building Event Streaming Applications with Pac-Man (Ricardo Ferreira, Conflue...
 
Stream Processing Live Traffic Data with Kafka Streams
Stream Processing Live Traffic Data with Kafka StreamsStream Processing Live Traffic Data with Kafka Streams
Stream Processing Live Traffic Data with Kafka Streams
 
uReplicator: Uber Engineering’s Scalable, Robust Kafka Replicator
uReplicator: Uber Engineering’s Scalable,  Robust Kafka ReplicatoruReplicator: Uber Engineering’s Scalable,  Robust Kafka Replicator
uReplicator: Uber Engineering’s Scalable, Robust Kafka Replicator
 
Moving RDF Stream Processing to the Client
Moving RDF Stream Processing to the ClientMoving RDF Stream Processing to the Client
Moving RDF Stream Processing to the Client
 
On Track with Apache Kafka®: Building a Streaming ETL Solution with Rail Data
On Track with Apache Kafka®: Building a Streaming ETL Solution with Rail DataOn Track with Apache Kafka®: Building a Streaming ETL Solution with Rail Data
On Track with Apache Kafka®: Building a Streaming ETL Solution with Rail Data
 
Kafka, Killer of Point-to-Point Integrations, Lucian Lita
Kafka, Killer of Point-to-Point Integrations, Lucian LitaKafka, Killer of Point-to-Point Integrations, Lucian Lita
Kafka, Killer of Point-to-Point Integrations, Lucian Lita
 
Matching the Scale at Tinder with Kafka
Matching the Scale at Tinder with Kafka Matching the Scale at Tinder with Kafka
Matching the Scale at Tinder with Kafka
 
Navigate Data Service using AWS
Navigate Data Service using AWSNavigate Data Service using AWS
Navigate Data Service using AWS
 
Big Data Analytics Infrastructure
Big Data Analytics InfrastructureBig Data Analytics Infrastructure
Big Data Analytics Infrastructure
 
The Future of Streaming: Global Apps, Event Stores and Serverless
The Future of Streaming: Global Apps, Event Stores and ServerlessThe Future of Streaming: Global Apps, Event Stores and Serverless
The Future of Streaming: Global Apps, Event Stores and Serverless
 
Flink Forward Berlin 2018: Xiaowei Jiang - Keynote: "Unified Engine for Data ...
Flink Forward Berlin 2018: Xiaowei Jiang - Keynote: "Unified Engine for Data ...Flink Forward Berlin 2018: Xiaowei Jiang - Keynote: "Unified Engine for Data ...
Flink Forward Berlin 2018: Xiaowei Jiang - Keynote: "Unified Engine for Data ...
 
Kafka Practices @ Uber - Seattle Apache Kafka meetup
Kafka Practices @ Uber - Seattle Apache Kafka meetupKafka Practices @ Uber - Seattle Apache Kafka meetup
Kafka Practices @ Uber - Seattle Apache Kafka meetup
 
Geo-Trending Example
Geo-Trending ExampleGeo-Trending Example
Geo-Trending Example
 
Scalable Dynamic Data Consumption on the Web
Scalable Dynamic Data Consumption on the WebScalable Dynamic Data Consumption on the Web
Scalable Dynamic Data Consumption on the Web
 
Realtime stream processing with kafka
Realtime stream processing with kafkaRealtime stream processing with kafka
Realtime stream processing with kafka
 
Flink Forward Berlin 2018: Raj Subramani - "A streaming Quantitative Analytic...
Flink Forward Berlin 2018: Raj Subramani - "A streaming Quantitative Analytic...Flink Forward Berlin 2018: Raj Subramani - "A streaming Quantitative Analytic...
Flink Forward Berlin 2018: Raj Subramani - "A streaming Quantitative Analytic...
 
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
Hadoop summit - Scaling Uber’s Real-Time Infra for  Trillion Events per DayHadoop summit - Scaling Uber’s Real-Time Infra for  Trillion Events per Day
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
 
Observability for developer ( Inny So & Andrew Jones, ThoughtWorks) Kafka Su...
Observability for developer ( Inny So & Andrew Jones, ThoughtWorks)  Kafka Su...Observability for developer ( Inny So & Andrew Jones, ThoughtWorks)  Kafka Su...
Observability for developer ( Inny So & Andrew Jones, ThoughtWorks) Kafka Su...
 
Stream Patterns
Stream PatternsStream Patterns
Stream Patterns
 

Similar to [Meetup ms] Kafka Streams

Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Kai Wähner
 
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Michael Noll
 

Similar to [Meetup ms] Kafka Streams (20)

Kafka Streams
Kafka StreamsKafka Streams
Kafka Streams
 
Apache Kafka as Event-Driven Open Source Streaming Platform (Prague Meetup)
Apache Kafka as Event-Driven Open Source Streaming Platform (Prague Meetup)Apache Kafka as Event-Driven Open Source Streaming Platform (Prague Meetup)
Apache Kafka as Event-Driven Open Source Streaming Platform (Prague Meetup)
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
 
MongoDB World 2019: Streaming ETL on the Shoulders of Giants
MongoDB World 2019: Streaming ETL on the Shoulders of GiantsMongoDB World 2019: Streaming ETL on the Shoulders of Giants
MongoDB World 2019: Streaming ETL on the Shoulders of Giants
 
FLiP Into Trino
FLiP Into TrinoFLiP Into Trino
FLiP Into Trino
 
Apache Kafka vs. Traditional Middleware (Kai Waehner, Confluent) Frankfurt 20...
Apache Kafka vs. Traditional Middleware (Kai Waehner, Confluent) Frankfurt 20...Apache Kafka vs. Traditional Middleware (Kai Waehner, Confluent) Frankfurt 20...
Apache Kafka vs. Traditional Middleware (Kai Waehner, Confluent) Frankfurt 20...
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
 
Cloud lunch and learn real-time streaming in azure
Cloud lunch and learn real-time streaming in azureCloud lunch and learn real-time streaming in azure
Cloud lunch and learn real-time streaming in azure
 
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache KafkaKafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
 
How to Build Streaming Apps with Confluent II
How to Build Streaming Apps with Confluent IIHow to Build Streaming Apps with Confluent II
How to Build Streaming Apps with Confluent II
 
XStream: stream processing platform at facebook
XStream:  stream processing platform at facebookXStream:  stream processing platform at facebook
XStream: stream processing platform at facebook
 
Scalable Stream Processing with Apache Samza
Scalable Stream Processing with Apache SamzaScalable Stream Processing with Apache Samza
Scalable Stream Processing with Apache Samza
 
AWS Step Functions을 활용한 서버리스 앱 오케스트레이션
AWS Step Functions을 활용한 서버리스 앱 오케스트레이션AWS Step Functions을 활용한 서버리스 앱 오케스트레이션
AWS Step Functions을 활용한 서버리스 앱 오케스트레이션
 
Experiences in Architecting & Implementing Platforms using Serverless.pdf
Experiences in Architecting & Implementing Platforms using Serverless.pdfExperiences in Architecting & Implementing Platforms using Serverless.pdf
Experiences in Architecting & Implementing Platforms using Serverless.pdf
 
Chti jug - 2018-06-26
Chti jug - 2018-06-26Chti jug - 2018-06-26
Chti jug - 2018-06-26
 
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
 
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
apidays LIVE India - Asynchronous and Broadcasting APIs using Kafka by Rohit ...
 
Streaming SQL to unify batch and stream processing: Theory and practice with ...
Streaming SQL to unify batch and stream processing: Theory and practice with ...Streaming SQL to unify batch and stream processing: Theory and practice with ...
Streaming SQL to unify batch and stream processing: Theory and practice with ...
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

[Meetup ms] Kafka Streams