SlideShare a Scribd company logo
1 of 49
Download to read offline
Leverage event streaming
framework to build
intelligent applications
Luca Ferrari
EMEA SSA for API
Management
2
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
4
What can you expect during this session:
➔ Introductions
➔ Context
➔ Basics of Kafka
➔ Use Cases
➔ ML elements
➔ ML applied
➔ Demo
➔ Key takeaways
➔ Where next
2019 RED HAT TECH EXCHANGE
5
Introduction
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
Introductions
6
Name:
Luca Ferrari
Role/team:
EMEA SSA
Where you’re from:
Barcelona & Pavia
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
7
WHY am I here?
In the news
2019 RED HAT TECH EXCHANGE
8
Context
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
9
Agile Integration foundations
DISTRIBUTED
INTEGRATION
CONTAINERS APIs
LIGHTWEIGHT
PATTERN BASED
EVENT-ORIENTED
COMMUNITY-SOURCED
CLOUD-NATIVE SOLUTIONS
LEAN ARTIFACTS, INDIVIDUALLY
DEPLOYABLE
CONTAINER-BASED SCALING & HIGH
AVAILABILITY
WELL-DEFINED, REUSABLE, &
WELL-MANAGED
ENDPOINTS
ECOSYSTEM LEVERAGE
API
SERVICES
SECURITY, AUTHENTICATION, AUDIT (RH-SSO)
RED HAT
FUSE
RED HAT
AMQ
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
10
AMQ offering
Flexible, standards-based messaging for the enterprise, cloud and Internet of Things
Self-service Messaging
- Scalable, easy-to-manage messaging utility for OpenShift Container Platform (Beta)
- Red Hat-managed deployment (Tech Preview)
Broker
(AMQ)
- Store & Forward
- Volatile & Durable
- Full JMS 2.0 Support
- Best-in-class perf
Interconnect
(AMQ)
- High-performance direct
messaging
- Distributed messaging
backbone
Streams
(AMQ Streams)
- Streaming platform
- Durable pub/sub
- Replayable streams
- Based on Apache
Kafka and Strimzi
Standard
Protocols
Polyglot
Clients
CommonManagement
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
11
AMQ offering
Broker
High-performance
messaging
implementation based on
ActiveMQ Artemis
Interconnect
Message router to build
large-scale messaging
networks using the
AMQP protocol to create
a redundant
application-level
messaging network
Streams
Streams simplifies the
deployment,
configuration,
management and use of
Apache Kafka on
OpenShift using the
Operator concept
2019 RED HAT TECH EXCHANGE
12
Basics of Kafka
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
13
Pub / Sub
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
14
topic, partitions and offset
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
15
example
truck_gps
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
16
Brokers and partitions
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
17
Replication and leaders
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
18
Producers
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
19
Consumers
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
20
Delivery semantics
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
21
Broker
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
22
Zookeeper
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
23
Complete
2019 RED HAT TECH EXCHANGE
24
Kafka & AMQ
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
25
Different tradeoffs ...
… Different Use Cases
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
26
JBOSS AMQ
● You care about individual messages
● You want clients to use standard APIs (e.g., JMS) or wire protocols (e.g., AMQP)
● You need transactional sends and receives
● You’re doing request-reply messaging
● Heterogeneous client/protocol messaging (ie, AMQP, MQTT, STOMP, etc)
● You send metadata/headers/properties with your messages
● You don’t want to implement broker functionality in your clients (ie, partitioning,
dispatching, coordination)
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
27
KAFKA
● You care about messages in volume
● You care about raw throughput, high performance
● You need sliding-window replay abilities
● Large numbers of subscribers for published events
● You need to finely control the parallelism/scalability of consumers
● You want to leverage application-level replication vs HA storage
● You need total order guarantees at the partition level
2019 RED HAT TECH EXCHANGE
28
Use cases
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
29
Industries
➔ Travel companies
➔ Finance and fintech companies
➔ Retailers and online shopping
➔ Automotive and manufacturing companies
➔ Video Streaming companies
➔ Social networks
➔ Transportation
➔ ...
[ https://kafka.apache.org/powered-by ]
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
30
SINGAPORE AIRLINES
[ https://speakerdeck.com/devacto/predictive-maintenance-pipeline-using-kafka-connect-streams-and-ksql ]
Problem:
Many
airplanes
Many components
per airplane
Each airplane
different
flight-plan
! Predictive maintenance is a hard !
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
31
SINGAPORE AIRLINES
Solution:
Kafka
Connector
Kafka
Streams App ML model
Web App
2019 RED HAT TECH EXCHANGE
32
ML elements
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
33
Text is everywhere
Most of it unstructured
> 40 million articles in Wikipedia
> 4.5 billion web pages
> 500 million tweets a day
> 1.5 trillion queries on Google a day
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
34
Problem Taxonomy
Classification
Supervised
Learning
Machine
Learning
Unsupervised
Learning
Regression
Clustering
...
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
35
NLP
Natural language
Natural Language Processing
English, Deutsch, Italiano
#rhte2019 for a great week in #vienna
c u l8r
Example:
Frequency count
Normalization & Stemming
Tokenization
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
36
Common Text Problems
How do I represent the text in a compact
and computer friendly way?
Bag of Words model
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
37
Common Text Problems
How do I represent the text in a compact
and computer friendly way?
How do I find a text similar to the one I
have?
Bag of Words model
Similarity measure
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
38
Common Text Problems
How do I represent the text in a compact
and computer friendly way?
How do I find a text similar to the one I
have?
How do we extract the core meaning of
the text? How do we get the important
words?
Bag of Words model
Similarity measure
Term frequency - inverse document
frequency (tf-idf)
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
39
Common Text Problems
How do I represent the text in a compact
and computer friendly way?
How do I find a text similar to the one I
have?
How do we extract the core meaning of
the text? How do we get the important
words?
How do I classify an article based on
certain categories?
Bag of Words model
Similarity measure
Term frequency - inverse document
frequency (tf-idf)
Naive Bayes model
2019 RED HAT TECH EXCHANGE
40
ML applied
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
41
Overall ML model
20 newsgroup
training data
Continuous Bag of
Words
IF-IDF
Multinomial Bayes
classifier
Trained model
Classification engine
Twitter stream
Boris Johnson on the phone. He’s
apparently not able to return to the UK
to answer questions in parliament as he
was booked on a Thomas Cook flight.
=> Politics
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
42
Overall architecture
2019 RED HAT TECH EXCHANGE
43
Demo
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
44
FIRST STEP
Start a local Kafka instance:
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
Create a topic:
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1
--partitions 1 --topic twitter-stream
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
45
SECOND STEP
Start the producer:
python twitter_kafka_producer.py
Start the consumer:
python doc_classifier.py
Had to fix some issues with original code:
● Add the Kafka api_version in the consumer and producer
● Add timeouts and retries since tweepy doesn’t implement that and Twitter is very restrictive with
RateLimits on its APIs
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
46
LIVE
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
47
NEXT STEPS
● Test locally by exposing Kafka endpoint
(https://strimzi.io/2019/04/30/accessing-kafka-part-3.html)
● Deploy the python app to OpenShift and test everything on it
● Build a chart visualization
● Cache tweets locally for optimization and then leverage Debezium
● Using Faust, a stream processing library, porting the ideas from Kafka Streams to Python.
2019 RED HAT TECH EXCHANGE
48
Outro
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
49
Key takeaways
➢ Learn possible use cases around Kafka and understand where does it fit better
➢ Learn the basics elements of an ML text classification model
➢ Learn the building blocks of a streaming application
CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE
50
Resources
You can find more material on a similar topic here
Related project: OpenDataHub
AMQ Streams use cases
As reference you can use this book:
https://www.amazon.es/Building-Streaming-Applications-Apache-Kafka/dp/1787283984/
linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
facebook.com/redhatinc
twitter.com/RedHat
Red Hat is the world’s leading provider of enterprise
open source software solutions. Award-winning
support, training, and consulting services make
Red Hat a trusted adviser to the Fortune 500.
Thank you
52

More Related Content

Similar to Leverage event streaming framework to build intelligent applications

Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsAxway
 
Xamarin - Under the bridge
Xamarin - Under the bridgeXamarin - Under the bridge
Xamarin - Under the bridgeDan Ardelean
 
JHipster & blueprint 02-07-2019 - casablanca jug
JHipster & blueprint 02-07-2019 - casablanca jugJHipster & blueprint 02-07-2019 - casablanca jug
JHipster & blueprint 02-07-2019 - casablanca jugAnthony Viard
 
Xamarin Under The Hood - Dan Ardelean
 Xamarin Under The Hood - Dan Ardelean Xamarin Under The Hood - Dan Ardelean
Xamarin Under The Hood - Dan ArdeleanITCamp
 
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp
 
Oracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native AppOracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native AppPaulo Alberto Simoes ∴
 
Bugtracking 101 Macq Electronique 2010
Bugtracking 101  Macq Electronique 2010Bugtracking 101  Macq Electronique 2010
Bugtracking 101 Macq Electronique 2010Michelangelo van Dam
 
Experiences from Incorporating Sign Language in Customer Interactions
Experiences from Incorporating Sign Language in Customer InteractionsExperiences from Incorporating Sign Language in Customer Interactions
Experiences from Incorporating Sign Language in Customer InteractionsAlan Quayle
 
Experiences from incorporating sign language in customer interactions
Experiences from incorporating sign language in customer interactionsExperiences from incorporating sign language in customer interactions
Experiences from incorporating sign language in customer interactionsAlberto González Trastoy
 
Confluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAConfluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAconfluent
 
The next generation of ap is luis weir.cwin18.telford
The next generation of ap is   luis weir.cwin18.telfordThe next generation of ap is   luis weir.cwin18.telford
The next generation of ap is luis weir.cwin18.telfordCapgemini
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp
 
WSO2 User Group Bangalore Meetup
WSO2 User Group Bangalore MeetupWSO2 User Group Bangalore Meetup
WSO2 User Group Bangalore MeetupWSO2
 
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebula Project
 
Transforming enterprise it with containers, ap is and integration api manage...
Transforming enterprise it with containers, ap is and integration  api manage...Transforming enterprise it with containers, ap is and integration  api manage...
Transforming enterprise it with containers, ap is and integration api manage...Judy Breedlove
 
[apidays Live Australia] - Breaking down the barriers between Pro-Code, Low-C...
[apidays Live Australia] - Breaking down the barriers between Pro-Code, Low-C...[apidays Live Australia] - Breaking down the barriers between Pro-Code, Low-C...
[apidays Live Australia] - Breaking down the barriers between Pro-Code, Low-C...WSO2
 
Axway's Journey to the Cloud
Axway's Journey to the CloudAxway's Journey to the Cloud
Axway's Journey to the CloudAxway
 
MissionGraph QTD Training Materials
MissionGraph QTD Training MaterialsMissionGraph QTD Training Materials
MissionGraph QTD Training MaterialsBenjamin Huston
 
Serverless survival kit
Serverless survival kitServerless survival kit
Serverless survival kitSteve Houël
 

Similar to Leverage event streaming framework to build intelligent applications (20)

Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortals
 
Xamarin - Under the bridge
Xamarin - Under the bridgeXamarin - Under the bridge
Xamarin - Under the bridge
 
JHipster & blueprint 02-07-2019 - casablanca jug
JHipster & blueprint 02-07-2019 - casablanca jugJHipster & blueprint 02-07-2019 - casablanca jug
JHipster & blueprint 02-07-2019 - casablanca jug
 
Cloud Native with Kyma
Cloud Native with KymaCloud Native with Kyma
Cloud Native with Kyma
 
Xamarin Under The Hood - Dan Ardelean
 Xamarin Under The Hood - Dan Ardelean Xamarin Under The Hood - Dan Ardelean
Xamarin Under The Hood - Dan Ardelean
 
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
 
Oracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native AppOracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native App
 
Bugtracking 101 Macq Electronique 2010
Bugtracking 101  Macq Electronique 2010Bugtracking 101  Macq Electronique 2010
Bugtracking 101 Macq Electronique 2010
 
Experiences from Incorporating Sign Language in Customer Interactions
Experiences from Incorporating Sign Language in Customer InteractionsExperiences from Incorporating Sign Language in Customer Interactions
Experiences from Incorporating Sign Language in Customer Interactions
 
Experiences from incorporating sign language in customer interactions
Experiences from incorporating sign language in customer interactionsExperiences from incorporating sign language in customer interactions
Experiences from incorporating sign language in customer interactions
 
Confluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVAConfluent Partner Tech Talk with SVA
Confluent Partner Tech Talk with SVA
 
The next generation of ap is luis weir.cwin18.telford
The next generation of ap is   luis weir.cwin18.telfordThe next generation of ap is   luis weir.cwin18.telford
The next generation of ap is luis weir.cwin18.telford
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
 
WSO2 User Group Bangalore Meetup
WSO2 User Group Bangalore MeetupWSO2 User Group Bangalore Meetup
WSO2 User Group Bangalore Meetup
 
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
 
Transforming enterprise it with containers, ap is and integration api manage...
Transforming enterprise it with containers, ap is and integration  api manage...Transforming enterprise it with containers, ap is and integration  api manage...
Transforming enterprise it with containers, ap is and integration api manage...
 
[apidays Live Australia] - Breaking down the barriers between Pro-Code, Low-C...
[apidays Live Australia] - Breaking down the barriers between Pro-Code, Low-C...[apidays Live Australia] - Breaking down the barriers between Pro-Code, Low-C...
[apidays Live Australia] - Breaking down the barriers between Pro-Code, Low-C...
 
Axway's Journey to the Cloud
Axway's Journey to the CloudAxway's Journey to the Cloud
Axway's Journey to the Cloud
 
MissionGraph QTD Training Materials
MissionGraph QTD Training MaterialsMissionGraph QTD Training Materials
MissionGraph QTD Training Materials
 
Serverless survival kit
Serverless survival kitServerless survival kit
Serverless survival kit
 

More from Luca Mattia Ferrari

Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfLuca Mattia Ferrari
 
Meetup 2022 - API Gateway landscape.pdf
Meetup 2022 - API Gateway landscape.pdfMeetup 2022 - API Gateway landscape.pdf
Meetup 2022 - API Gateway landscape.pdfLuca Mattia Ferrari
 
How easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performanceHow easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performanceLuca Mattia Ferrari
 
Covid impact on digital identity
Covid impact on digital identityCovid impact on digital identity
Covid impact on digital identityLuca Mattia Ferrari
 
How do async ap is survive in a rest world
How do async ap is survive in a rest world How do async ap is survive in a rest world
How do async ap is survive in a rest world Luca Mattia Ferrari
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stackLuca Mattia Ferrari
 
The case for a unified way of speaking to things
The case for a unified way of speaking to thingsThe case for a unified way of speaking to things
The case for a unified way of speaking to thingsLuca Mattia Ferrari
 
Using Streaming APIs in Production
Using Streaming APIs in ProductionUsing Streaming APIs in Production
Using Streaming APIs in ProductionLuca Mattia Ferrari
 
Api service mesh and microservice tooling
Api service mesh and microservice toolingApi service mesh and microservice tooling
Api service mesh and microservice toolingLuca Mattia Ferrari
 
Lucamaf1 2949-db--winter2013-accomplishment
Lucamaf1 2949-db--winter2013-accomplishmentLucamaf1 2949-db--winter2013-accomplishment
Lucamaf1 2949-db--winter2013-accomplishmentLuca Mattia Ferrari
 
statement of accomplishment - heterogeneous parallel programming
statement of accomplishment - heterogeneous parallel programmingstatement of accomplishment - heterogeneous parallel programming
statement of accomplishment - heterogeneous parallel programmingLuca Mattia Ferrari
 

More from Luca Mattia Ferrari (20)

Meetup 2023 - Gateway API.pdf
Meetup 2023 - Gateway API.pdfMeetup 2023 - Gateway API.pdf
Meetup 2023 - Gateway API.pdf
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
 
Meetup 2022 - API Gateway landscape.pdf
Meetup 2022 - API Gateway landscape.pdfMeetup 2022 - API Gateway landscape.pdf
Meetup 2022 - API Gateway landscape.pdf
 
APIs at the Edge
APIs at the EdgeAPIs at the Edge
APIs at the Edge
 
Opa in the api management world
Opa in the api management worldOpa in the api management world
Opa in the api management world
 
How easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performanceHow easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performance
 
Covid impact on digital identity
Covid impact on digital identityCovid impact on digital identity
Covid impact on digital identity
 
How do async ap is survive in a rest world
How do async ap is survive in a rest world How do async ap is survive in a rest world
How do async ap is survive in a rest world
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stack
 
The case for a unified way of speaking to things
The case for a unified way of speaking to thingsThe case for a unified way of speaking to things
The case for a unified way of speaking to things
 
Using Streaming APIs in Production
Using Streaming APIs in ProductionUsing Streaming APIs in Production
Using Streaming APIs in Production
 
The independence facts
The independence factsThe independence facts
The independence facts
 
Api observability
Api observability Api observability
Api observability
 
Api service mesh and microservice tooling
Api service mesh and microservice toolingApi service mesh and microservice tooling
Api service mesh and microservice tooling
 
Api design best practice
Api design best practiceApi design best practice
Api design best practice
 
Certificate complexity
Certificate complexityCertificate complexity
Certificate complexity
 
Lucamaf1 2949-db--winter2013-accomplishment
Lucamaf1 2949-db--winter2013-accomplishmentLucamaf1 2949-db--winter2013-accomplishment
Lucamaf1 2949-db--winter2013-accomplishment
 
certificate game theory
certificate game theorycertificate game theory
certificate game theory
 
statement of accomplishment - heterogeneous parallel programming
statement of accomplishment - heterogeneous parallel programmingstatement of accomplishment - heterogeneous parallel programming
statement of accomplishment - heterogeneous parallel programming
 
MS thesis
MS thesisMS thesis
MS thesis
 

Recently uploaded

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Recently uploaded (20)

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Leverage event streaming framework to build intelligent applications

  • 1. Leverage event streaming framework to build intelligent applications Luca Ferrari EMEA SSA for API Management 2
  • 2. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 4 What can you expect during this session: ➔ Introductions ➔ Context ➔ Basics of Kafka ➔ Use Cases ➔ ML elements ➔ ML applied ➔ Demo ➔ Key takeaways ➔ Where next
  • 3. 2019 RED HAT TECH EXCHANGE 5 Introduction
  • 4. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE Introductions 6 Name: Luca Ferrari Role/team: EMEA SSA Where you’re from: Barcelona & Pavia
  • 5. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 7 WHY am I here? In the news
  • 6. 2019 RED HAT TECH EXCHANGE 8 Context
  • 7. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 9 Agile Integration foundations DISTRIBUTED INTEGRATION CONTAINERS APIs LIGHTWEIGHT PATTERN BASED EVENT-ORIENTED COMMUNITY-SOURCED CLOUD-NATIVE SOLUTIONS LEAN ARTIFACTS, INDIVIDUALLY DEPLOYABLE CONTAINER-BASED SCALING & HIGH AVAILABILITY WELL-DEFINED, REUSABLE, & WELL-MANAGED ENDPOINTS ECOSYSTEM LEVERAGE API SERVICES SECURITY, AUTHENTICATION, AUDIT (RH-SSO) RED HAT FUSE RED HAT AMQ
  • 8. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 10 AMQ offering Flexible, standards-based messaging for the enterprise, cloud and Internet of Things Self-service Messaging - Scalable, easy-to-manage messaging utility for OpenShift Container Platform (Beta) - Red Hat-managed deployment (Tech Preview) Broker (AMQ) - Store & Forward - Volatile & Durable - Full JMS 2.0 Support - Best-in-class perf Interconnect (AMQ) - High-performance direct messaging - Distributed messaging backbone Streams (AMQ Streams) - Streaming platform - Durable pub/sub - Replayable streams - Based on Apache Kafka and Strimzi Standard Protocols Polyglot Clients CommonManagement
  • 9. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 11 AMQ offering Broker High-performance messaging implementation based on ActiveMQ Artemis Interconnect Message router to build large-scale messaging networks using the AMQP protocol to create a redundant application-level messaging network Streams Streams simplifies the deployment, configuration, management and use of Apache Kafka on OpenShift using the Operator concept
  • 10. 2019 RED HAT TECH EXCHANGE 12 Basics of Kafka
  • 11. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 13 Pub / Sub
  • 12. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 14 topic, partitions and offset
  • 13. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 15 example truck_gps
  • 14. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 16 Brokers and partitions
  • 15. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 17 Replication and leaders
  • 16. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 18 Producers
  • 17. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 19 Consumers
  • 18. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 20 Delivery semantics
  • 19. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 21 Broker
  • 20. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 22 Zookeeper
  • 21. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 23 Complete
  • 22. 2019 RED HAT TECH EXCHANGE 24 Kafka & AMQ
  • 23. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 25 Different tradeoffs ... … Different Use Cases
  • 24. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 26 JBOSS AMQ ● You care about individual messages ● You want clients to use standard APIs (e.g., JMS) or wire protocols (e.g., AMQP) ● You need transactional sends and receives ● You’re doing request-reply messaging ● Heterogeneous client/protocol messaging (ie, AMQP, MQTT, STOMP, etc) ● You send metadata/headers/properties with your messages ● You don’t want to implement broker functionality in your clients (ie, partitioning, dispatching, coordination)
  • 25. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 27 KAFKA ● You care about messages in volume ● You care about raw throughput, high performance ● You need sliding-window replay abilities ● Large numbers of subscribers for published events ● You need to finely control the parallelism/scalability of consumers ● You want to leverage application-level replication vs HA storage ● You need total order guarantees at the partition level
  • 26. 2019 RED HAT TECH EXCHANGE 28 Use cases
  • 27. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 29 Industries ➔ Travel companies ➔ Finance and fintech companies ➔ Retailers and online shopping ➔ Automotive and manufacturing companies ➔ Video Streaming companies ➔ Social networks ➔ Transportation ➔ ... [ https://kafka.apache.org/powered-by ]
  • 28. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 30 SINGAPORE AIRLINES [ https://speakerdeck.com/devacto/predictive-maintenance-pipeline-using-kafka-connect-streams-and-ksql ] Problem: Many airplanes Many components per airplane Each airplane different flight-plan ! Predictive maintenance is a hard !
  • 29. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 31 SINGAPORE AIRLINES Solution: Kafka Connector Kafka Streams App ML model Web App
  • 30. 2019 RED HAT TECH EXCHANGE 32 ML elements
  • 31. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 33 Text is everywhere Most of it unstructured > 40 million articles in Wikipedia > 4.5 billion web pages > 500 million tweets a day > 1.5 trillion queries on Google a day
  • 32. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 34 Problem Taxonomy Classification Supervised Learning Machine Learning Unsupervised Learning Regression Clustering ...
  • 33. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 35 NLP Natural language Natural Language Processing English, Deutsch, Italiano #rhte2019 for a great week in #vienna c u l8r Example: Frequency count Normalization & Stemming Tokenization
  • 34. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 36 Common Text Problems How do I represent the text in a compact and computer friendly way? Bag of Words model
  • 35. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 37 Common Text Problems How do I represent the text in a compact and computer friendly way? How do I find a text similar to the one I have? Bag of Words model Similarity measure
  • 36. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 38 Common Text Problems How do I represent the text in a compact and computer friendly way? How do I find a text similar to the one I have? How do we extract the core meaning of the text? How do we get the important words? Bag of Words model Similarity measure Term frequency - inverse document frequency (tf-idf)
  • 37. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 39 Common Text Problems How do I represent the text in a compact and computer friendly way? How do I find a text similar to the one I have? How do we extract the core meaning of the text? How do we get the important words? How do I classify an article based on certain categories? Bag of Words model Similarity measure Term frequency - inverse document frequency (tf-idf) Naive Bayes model
  • 38. 2019 RED HAT TECH EXCHANGE 40 ML applied
  • 39. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 41 Overall ML model 20 newsgroup training data Continuous Bag of Words IF-IDF Multinomial Bayes classifier Trained model Classification engine Twitter stream Boris Johnson on the phone. He’s apparently not able to return to the UK to answer questions in parliament as he was booked on a Thomas Cook flight. => Politics
  • 40. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 42 Overall architecture
  • 41. 2019 RED HAT TECH EXCHANGE 43 Demo
  • 42. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 44 FIRST STEP Start a local Kafka instance: bin/zookeeper-server-start.sh config/zookeeper.properties bin/kafka-server-start.sh config/server.properties Create a topic: bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic twitter-stream
  • 43. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 45 SECOND STEP Start the producer: python twitter_kafka_producer.py Start the consumer: python doc_classifier.py Had to fix some issues with original code: ● Add the Kafka api_version in the consumer and producer ● Add timeouts and retries since tweepy doesn’t implement that and Twitter is very restrictive with RateLimits on its APIs
  • 44. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 46 LIVE
  • 45. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 47 NEXT STEPS ● Test locally by exposing Kafka endpoint (https://strimzi.io/2019/04/30/accessing-kafka-part-3.html) ● Deploy the python app to OpenShift and test everything on it ● Build a chart visualization ● Cache tweets locally for optimization and then leverage Debezium ● Using Faust, a stream processing library, porting the ideas from Kafka Streams to Python.
  • 46. 2019 RED HAT TECH EXCHANGE 48 Outro
  • 47. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 49 Key takeaways ➢ Learn possible use cases around Kafka and understand where does it fit better ➢ Learn the basics elements of an ML text classification model ➢ Learn the building blocks of a streaming application
  • 48. CONFIDENTIAL INTERNAL USE2019 RED HAT TECH EXCHANGE 50 Resources You can find more material on a similar topic here Related project: OpenDataHub AMQ Streams use cases As reference you can use this book: https://www.amazon.es/Building-Streaming-Applications-Apache-Kafka/dp/1787283984/
  • 49. linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat Red Hat is the world’s leading provider of enterprise open source software solutions. Award-winning support, training, and consulting services make Red Hat a trusted adviser to the Fortune 500. Thank you 52