SlideShare a Scribd company logo
Apache Kafka:
Theory 101
… with My little Ponies!
Alejandra Quetzalli
alejandra@shecodesnow.org
Agenda
• What is Apache Kafka?
• What can I use event streaming for?
• Where is Apache Kafka used?
• Kafka Theory 101 Overview
And maybe a pony or two.
What is Apache Kafka?
What is Apache Kafka?
• It is an 🙌 open-source 🙌 event streaming platform.
• Simply put, it is a way of moving data between systems.
• (i.e. between applications, and servers)
3 key capabilities for event streaming:
• To publish (write) and subscribe to (read) streams of events, including
continuous import/export of data from other systems.
• To store streams of events durably and reliably for as long as a dev needs.
• To process streams of events as they occur or retrospectively.
What does one use event streaming for?
What can I use event streaming for?
• To process payments and financial transactions in real-time
• stock exchanges
• banks
• insurances
• To track and monitor cars, trucks, fleets, and shipments in real-time
• logistics
• automotive industry
• To continuously capture and analyze sensor data from IoT devices/equipment
• factories
• wind parks
Event streaming – cont’d…
• To collect and immediately react to customer interactions and orders
• retail
• hotel and travel industry
• mobile applications
• To connect, store, and make available data produced by different divisions of
a company.
• To serve as the foundation for data platforms, event-driven architectures,
and microservices.
Where is Apache Kafka used in the world?
Where is Apache Kafka used?
• Netflix is using Kafka to apply
recommendations in real-time while
you're watching TV shows.
• Uber uses Kafka to gather user, taxi
and trip data in real-time to compute
and forecast demand and pricing in
real-time.
• LinkedIn uses Kafka to prevent spam in
their platform, collect user
interactions and make better
connection recommendations.
Concepts & Theory 101
T is for Topics and Twilight Sparkle
• A particular stream of data.
• A topic is identified by its name.
• Topics are split into partitions.
• Each partition is ordered.
• Each message within a partition gets an
incremental id, called offset.
• Central protagonist of the show
• Most intellectual member of the Mane Six
• Her cutie mark represents her talent
for magic and her love
for books and knowledge.
0 1 2 3 4
0 1 2 3
0 1 2 3 4 5 6
Partition 0
Partition 1
Partition 2
Topic Replication
Topic Replication is the process to offer fail-over
capability for a topic.
• If one broker (holds topics and partitions) is
down, the other broker can serve the data.
• This replication factor defines the number of
copies of a topic in a Kafka cluster (made up of
multiple Kafka brokers).
• Kafka stores messages in topics that
are partitioned and replicated across
multiple brokers in a cluster.
Broker 2
Broker 1
Partition 0
Topic A
Partition 1
Topic B
Partition 0
Topic A
B is for Brokers and Babs Seed
• Holds topics and partitions.
• Each broker is identified with its ID (integer).
• Each broker contains certain topic partitions.
• After connecting to any broker, you're
connected to an entire cluster.
• Apple Bloom's cousin from Manehattan.
• Former member of the Cutie Mark
Crusaders
P is for Partitions and Pinkie Pie
• An ordered, immutable record sequence.
• Once data is written to a partition, it can't be
changed (immutable).
• Data is assigned randomly to a partition, unless a key
is provided.
• At any one time, only ONE broker can be a leader for
a given partition.
• That leader can receive and serve data for a
partition.
• The other brokers will just be passive
replicas and synchronize the data.
• Each partition is going to have one leader, and
multiple ISR (in-sync replica).
• Baker at Sugarcube Corner.
• Toothless pet alligator, Gummy.
• Represents the element of laughter.
P is also for Producers and Pound Cake
• How do we get data in Kafka?
• Producers write data to topics (which are made up of
partitions).
• Producers automatically know to which broker and
partition to write to.
• Producers Message Keys: producers can choose to
send a key with a message. (i.e. string, number, .etc)
• If a key is sent, all messages for that key will
always go to the same partition.
• A key is sent if you need message ordering for a
specific field (i.e. truck_id).
• Parents are surprised to find out that
Pound Cake is a male Pegasus, and his twin
foal sister (Pumpkin Cake) is a female
unicorn… even though their parents are
both Earth ponies.
C is for Consumers and Princess Celestia
• How do we read data in Kafka?
• They read data from a topic (identified by name).
• Consumers know which broker to read from.
• In case of broker failures, consumers know how to recover.
• Data is read in order within each partition.
• Consumer Groups: consumers read data in consumer
groups.
• Each consumer within a group will read directly from
exclusive partitions.
• If you have more consumers than partitions, some will
be inactive.
• Most magical pony.
• Responsible for raising the sun to create
light in Equestria.
• Over 1,000 years old!
Z is for Zookeeper and Zecora
• Keeps track of status of the Kafka cluster nodes.
• Also keeps track of Kafka topics and partitions.
• Currently, Apache Kafka® uses Apache ZooKeeper™ to
store its metadata (i.e. location of partitions, the
configuration of topics).
⚠️ Apache Kafka is removing the Apache ZooKeeper
Dependency. ⚠️
• In 2019, they outlined a plan to break this
dependency and bring metadata management back
into Kafka itself.
• Female zebra shaman and herbalist.
• Always speaks in rhyme.
What next?
What now, developer?
• To get hands-on experience, follow the Quickstart.
• To learn more about Apache Kafka, check out the developer docs.
• Books and academic papers!
Gracias
Alejandra Quetzalli
alejandra@shecodesnow.org
twitter.com/QuetzalliAle
linkedin.com/in/alejandra-quetzalli

More Related Content

Similar to Learning Apache Kafka Theory 101 w/ My Little Ponies

Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
StreamNative
 
Unleashing Real-time Power with Kafka.pptx
Unleashing Real-time Power with Kafka.pptxUnleashing Real-time Power with Kafka.pptx
Unleashing Real-time Power with Kafka.pptx
Knoldus Inc.
 
Fundamentals of Apache Kafka
Fundamentals of Apache KafkaFundamentals of Apache Kafka
Fundamentals of Apache Kafka
Chhavi Parasher
 
Python Kafka Integration: Developers Guide
Python Kafka Integration: Developers GuidePython Kafka Integration: Developers Guide
Python Kafka Integration: Developers Guide
Inexture Solutions
 
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
Lucas Jellema
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka Introduction
Amita Mirajkar
 
Apache storm
Apache stormApache storm
Apache storm
Kapil Kumar
 
Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015
Evan Chan
 
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Erik Onnen
 
Current and Future of Apache Kafka
Current and Future of Apache KafkaCurrent and Future of Apache Kafka
Current and Future of Apache Kafka
Joe Stein
 
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
HostedbyConfluent
 
Kafka & Storm - FifthElephant 2015 by @bhaskerkode, Helpshift
Kafka & Storm - FifthElephant 2015 by @bhaskerkode, HelpshiftKafka & Storm - FifthElephant 2015 by @bhaskerkode, Helpshift
Kafka & Storm - FifthElephant 2015 by @bhaskerkode, Helpshift
Bhasker Kode
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
emreakis
 
CQRS + ES with Scala and Akka
CQRS + ES with Scala and AkkaCQRS + ES with Scala and Akka
CQRS + ES with Scala and Akka
Bharadwaj N
 
Apache kafka
Apache kafkaApache kafka
Kafka presentation
Kafka presentationKafka presentation
Kafka presentation
Mohammed Fazuluddin
 
Kafka Streams: The Stream Processing Engine of Apache Kafka
Kafka Streams: The Stream Processing Engine of Apache KafkaKafka Streams: The Stream Processing Engine of Apache Kafka
Kafka Streams: The Stream Processing Engine of Apache Kafka
Eno Thereska
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
Janu Jahnavi
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
Janu Jahnavi
 
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 !
Guido Schmutz
 

Similar to Learning Apache Kafka Theory 101 w/ My Little Ponies (20)

Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
Ten reasons to choose Apache Pulsar over Apache Kafka for Event Sourcing_Robe...
 
Unleashing Real-time Power with Kafka.pptx
Unleashing Real-time Power with Kafka.pptxUnleashing Real-time Power with Kafka.pptx
Unleashing Real-time Power with Kafka.pptx
 
Fundamentals of Apache Kafka
Fundamentals of Apache KafkaFundamentals of Apache Kafka
Fundamentals of Apache Kafka
 
Python Kafka Integration: Developers Guide
Python Kafka Integration: Developers GuidePython Kafka Integration: Developers Guide
Python Kafka Integration: Developers Guide
 
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka Introduction
 
Apache storm
Apache stormApache storm
Apache storm
 
Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015
 
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
 
Current and Future of Apache Kafka
Current and Future of Apache KafkaCurrent and Future of Apache Kafka
Current and Future of Apache Kafka
 
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
 
Kafka & Storm - FifthElephant 2015 by @bhaskerkode, Helpshift
Kafka & Storm - FifthElephant 2015 by @bhaskerkode, HelpshiftKafka & Storm - FifthElephant 2015 by @bhaskerkode, Helpshift
Kafka & Storm - FifthElephant 2015 by @bhaskerkode, Helpshift
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
CQRS + ES with Scala and Akka
CQRS + ES with Scala and AkkaCQRS + ES with Scala and Akka
CQRS + ES with Scala and Akka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Kafka presentation
Kafka presentationKafka presentation
Kafka presentation
 
Kafka Streams: The Stream Processing Engine of Apache Kafka
Kafka Streams: The Stream Processing Engine of Apache KafkaKafka Streams: The Stream Processing Engine of Apache Kafka
Kafka Streams: The Stream Processing Engine of Apache Kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
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 !
 

Recently uploaded

一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
AlessioFois2
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
Sachin Paul
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Fernanda Palhano
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
Social Samosa
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
v7oacc3l
 
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
wyddcwye1
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
Lars Albertsson
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
apvysm8
 
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
xclpvhuk
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
AndrzejJarynowski
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
soxrziqu
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 

Recently uploaded (20)

一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
 
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
原版一比一利兹贝克特大学毕业证(LeedsBeckett毕业证书)如何办理
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
 
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 

Learning Apache Kafka Theory 101 w/ My Little Ponies

  • 1. Apache Kafka: Theory 101 … with My little Ponies! Alejandra Quetzalli alejandra@shecodesnow.org
  • 2. Agenda • What is Apache Kafka? • What can I use event streaming for? • Where is Apache Kafka used? • Kafka Theory 101 Overview And maybe a pony or two.
  • 3. What is Apache Kafka?
  • 4. What is Apache Kafka? • It is an 🙌 open-source 🙌 event streaming platform. • Simply put, it is a way of moving data between systems. • (i.e. between applications, and servers)
  • 5. 3 key capabilities for event streaming: • To publish (write) and subscribe to (read) streams of events, including continuous import/export of data from other systems. • To store streams of events durably and reliably for as long as a dev needs. • To process streams of events as they occur or retrospectively.
  • 6. What does one use event streaming for?
  • 7. What can I use event streaming for? • To process payments and financial transactions in real-time • stock exchanges • banks • insurances • To track and monitor cars, trucks, fleets, and shipments in real-time • logistics • automotive industry • To continuously capture and analyze sensor data from IoT devices/equipment • factories • wind parks
  • 8. Event streaming – cont’d… • To collect and immediately react to customer interactions and orders • retail • hotel and travel industry • mobile applications • To connect, store, and make available data produced by different divisions of a company. • To serve as the foundation for data platforms, event-driven architectures, and microservices.
  • 9. Where is Apache Kafka used in the world?
  • 10. Where is Apache Kafka used? • Netflix is using Kafka to apply recommendations in real-time while you're watching TV shows. • Uber uses Kafka to gather user, taxi and trip data in real-time to compute and forecast demand and pricing in real-time. • LinkedIn uses Kafka to prevent spam in their platform, collect user interactions and make better connection recommendations.
  • 12. T is for Topics and Twilight Sparkle • A particular stream of data. • A topic is identified by its name. • Topics are split into partitions. • Each partition is ordered. • Each message within a partition gets an incremental id, called offset. • Central protagonist of the show • Most intellectual member of the Mane Six • Her cutie mark represents her talent for magic and her love for books and knowledge. 0 1 2 3 4 0 1 2 3 0 1 2 3 4 5 6 Partition 0 Partition 1 Partition 2
  • 13. Topic Replication Topic Replication is the process to offer fail-over capability for a topic. • If one broker (holds topics and partitions) is down, the other broker can serve the data. • This replication factor defines the number of copies of a topic in a Kafka cluster (made up of multiple Kafka brokers). • Kafka stores messages in topics that are partitioned and replicated across multiple brokers in a cluster. Broker 2 Broker 1 Partition 0 Topic A Partition 1 Topic B Partition 0 Topic A
  • 14. B is for Brokers and Babs Seed • Holds topics and partitions. • Each broker is identified with its ID (integer). • Each broker contains certain topic partitions. • After connecting to any broker, you're connected to an entire cluster. • Apple Bloom's cousin from Manehattan. • Former member of the Cutie Mark Crusaders
  • 15. P is for Partitions and Pinkie Pie • An ordered, immutable record sequence. • Once data is written to a partition, it can't be changed (immutable). • Data is assigned randomly to a partition, unless a key is provided. • At any one time, only ONE broker can be a leader for a given partition. • That leader can receive and serve data for a partition. • The other brokers will just be passive replicas and synchronize the data. • Each partition is going to have one leader, and multiple ISR (in-sync replica). • Baker at Sugarcube Corner. • Toothless pet alligator, Gummy. • Represents the element of laughter.
  • 16. P is also for Producers and Pound Cake • How do we get data in Kafka? • Producers write data to topics (which are made up of partitions). • Producers automatically know to which broker and partition to write to. • Producers Message Keys: producers can choose to send a key with a message. (i.e. string, number, .etc) • If a key is sent, all messages for that key will always go to the same partition. • A key is sent if you need message ordering for a specific field (i.e. truck_id). • Parents are surprised to find out that Pound Cake is a male Pegasus, and his twin foal sister (Pumpkin Cake) is a female unicorn… even though their parents are both Earth ponies.
  • 17. C is for Consumers and Princess Celestia • How do we read data in Kafka? • They read data from a topic (identified by name). • Consumers know which broker to read from. • In case of broker failures, consumers know how to recover. • Data is read in order within each partition. • Consumer Groups: consumers read data in consumer groups. • Each consumer within a group will read directly from exclusive partitions. • If you have more consumers than partitions, some will be inactive. • Most magical pony. • Responsible for raising the sun to create light in Equestria. • Over 1,000 years old!
  • 18. Z is for Zookeeper and Zecora • Keeps track of status of the Kafka cluster nodes. • Also keeps track of Kafka topics and partitions. • Currently, Apache Kafka® uses Apache ZooKeeper™ to store its metadata (i.e. location of partitions, the configuration of topics). ⚠️ Apache Kafka is removing the Apache ZooKeeper Dependency. ⚠️ • In 2019, they outlined a plan to break this dependency and bring metadata management back into Kafka itself. • Female zebra shaman and herbalist. • Always speaks in rhyme.
  • 20. What now, developer? • To get hands-on experience, follow the Quickstart. • To learn more about Apache Kafka, check out the developer docs. • Books and academic papers!