SlideShare a Scribd company logo
1 of 47
REAL TIME UI WITH
APACHE KAFKA
STREAMING ANALYTICS
OF FAST DATA AND
SERVER PUSH
Lucas Jellema (CTO AMIS & Oracle Developer Champion)
12th May 2017, Oracle Friday Cloud Update, Utrecht, The Netherlands
Application
Server
F5
F5
F5
CTRLF5
CTRLF5
CTRLF5
Application
Server
F5
F5
F5
CTRLF5
CTRLF5
CTRLF5
Application
Server
F5
F5
F5
CTRLF5
CTRLF5
CTRLF5
FAST DATA AND ACTIVE UI
• Handle influx
• Publish findings instantaneously
• Update UI & notify end user immediately
• Analyze in real time
• Decoupled components
• No data loss when a component is temporarily down
• Scalable with volume of events and of number of clients
THE CASE AT HAND
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Show live
tweet
aggregates
per
conference
Allow users to
like tweets –
and show live
list of liked
tweets
Show a live
list of top 3
liked tweets
per
conference
THE CODE
https://github.com/lucasjellema/real-time-ui-with-kafka-streams
THE DEO
http://tinyurl.com/kafkaui
EVENTS
Producers
Consumers
Robust, Scalable,
History Retention
Containerized/Cloud-
enabled
REQUIREMENTS FOR EVENT CAPABILITY
• Provide decoupling between publisher and consumer
• Generally accessible for all consumers
• Using standardized protocols and formats for communications and event payload
(http, JSON)
• Scalable (handle high loads)
• Available (allow speedy event publication)
• Reliable (do not lose events, at least once delivery)
• Event Ordering (deliver events in the order of publication)
• Manageable at scale
• Retain Event History
• For consumers that are late to the game
• To construct state from all historic events: Event Sourcing
INTRODUCING APACHE KAFKA
• ..- 2010 – creation at Linkedin
• Message Bus | Event Broker
• High volume, low latency, highly reliable, cross technology
• Scalable, distributed, strict message ordering, ….
• 2011/2012 – open source under the Apache Incubator/ Top Project
• Kafka is used by many large corporations:
• Walmart, Cisco, Netflix, PayPal, LinkedIn, eBay, Spotify, Uber, Sift Science
• And embraced by many software vendors & cloud providers
• Client libraries available for NodeJS, Java, C++, Python, Ruby, PHP
and many more
KAFKA TERMINOLOGY
• Topic
• partition
• Message
• == ByteArray
• Broker
• replicated
• Producer
• Consumer
• Working together
in Consumer Groups
Producer Consumer
Topic
Broker
Key
Value
Time
Message
Producers
Consumers
Topic
Broker
tcp
tcp
THE CASE AT HAND – STEP ONE
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
THE CASE AT HAND – STEP ONE AND A HALF
Client
Client
Client
Client
Tweets on #oow17
#javaone
#oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
CONFIGURE IFTTT RECIPE
CONFIGURE IFTTT RECIPE
CONFIGURE IFTTT RECIPE
HIGH CODE APPROACH
HIGH CODE (2) – PRODUCE MESSAGE TO KAFKA
THE CASE AT HAND – STEP ONE AND TWO
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
KAFKA CONSUMER IN NODE
GET EVENTS PUSHED INTO APPLICATION
THE CASE AT HAND
SERVER SENT EVENTS FOR PUSH BACK
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
Server Sent
Event
SERVER SENT EVENT – SERVER SIDE
SERVER SENT EVENT – CLIENT SIDE
LIVE TWEET STREAM
Server Sent
Event
THE CASE AT HAND
TWEET LIKES – CLIENT TO SERVER TO ALL CLIENTS
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
SSE
Allow users to
like tweets –
and show live
list of liked
tweets
THE CASE AT HAND
WEB SOCKETS – FOR BI DIRECTIONAL PUSH
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
SSE
WebSockets
Allow users to
like tweets –
and show live
list of liked
tweets
WEBSOCKETS – SERVER SIDE
WEBSOCKETS – CLIENT SIDE
TWEET LIKES BROADCASTING
WebSockets
WebSockets
THE CASE AT HAND
STREAMING ANALYSIS OF TWEET EVENTS
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
SSE
WebSockets
Allow users to
like tweets –
and show live
list of liked
tweets
Show live
tweet
aggregates
per
conference
THE CASE AT HAND - STREAMING ANALYSIS OF TWEETS
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
WebSockets
Allow users to
like tweets –
and show live
list of liked
tweets
Show live
tweet
aggregates
per
conference
tweetAnalytics
Topic
Streaming
Tweets
Aggregation
µ
SSE
KAFKA STREAMS
• Real Time Event [Stream] Processing integrated into Kafka
• Aggregations & Top-N
• Time Windows
• Continuous Queries
• Latest State (event sourcing)
• Turn Stream (of changes) into Table
(of most recent or current state)
• Part of the state can be quite old
• A Kafka Streams client will have state
in memory
• Always to be recreated from topic partition
log files
• Note: Kafka Streams is relatively new
• Only support for Java clients
KAFKA STREAMS
Topic
Filter
Aggregate
Join
Topic
Map (Xform)
Publish
Topic
EXAMPLE OF KAFKA STREAMS
Topic
groupBy
Aggregate
Join
Topic
Map (Xform)
Publish
TweetMessage
Conference
Text
Author
Hastag
Set Conference as key
Sum/Avg/Top3 by key
(==conference)
As JSON
Round aggregate to
nearest 100
Latest Conference
Details
Topic: CountTweetsPerConference
and possibly per time window
KAFKA STREAMS –
RUNNING COUNT TWEETS PER CONFERENCE
STREAMING TWEET ANALYTICS
PUSHED TO CLIENTS
Server Sent
Event
THE CASE AT HAND - STREAMING ANALYSIS
OF TWEET LIKES
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
WebSockets
Allow users to
like tweets –
and show live
list of liked
tweets
Show live
tweet
aggregates
per
conference
tweetAnalytics
Topic
Streaming
Tweets
Aggregation
µ
SSE
Show a live
list of top 3
liked tweets
per
conference
THE CASE AT HAND - STREAMING ANALYSIS
OF TWEET LIKES
Client
Client
Client
Client
Tweets on #oow17
#javaone #oraclecode
Show live
tweet feed for
conferences
Tweets
Topic
WebSockets
Allow users to
like tweets –
and show live
list of liked
tweets
Show live
tweet
aggregates
per
conference
tweetAnalytics
Topic
Streaming
Tweets
Aggregation
µ
SSE
Show a live
list of top 3
liked tweets
per
conference
Likes
Aggregation
µ
tweetLike
Topic
Top3TweetLikes
PerConference
WEBSOCKETS – SERVER SIDE
RUNNING TOP 3 OF
BEST LIKED TWEETS PER CONFERENCE
Server Sent
Event
END TO END FLOW CLOUD ENABLED
API
Cache
EventHub CS
µ
Tweets
Aggregation
µ
LikesTweets
UI µ
Client
Chrome
Client
Firefox
Likes
Aggregation
µ
API
µ
Tweet
Count
Likes
Top3
CONCLUSION
• Fast data – Active UI
• Decoupled processing
• And distributed across clouds and on premises
• Kafka
• Events & Data Store
• Streaming Analysis
• Modern browser – push capability
• SSE, WebSocket, HTTP/2, WebWorker Notifications
• Active UI with fresh data without burden on application server and
back end system
• “Step away from that F5 key”
• Blog: technology.amis.nl
• Email: lucas.jellema@amis.nl
• : lucasjellema
• : lucas-jellema
• : www.amis.nl, info@amis.nl
+31 306016000
Edisonbaan 15,
Nieuwegein

More Related Content

More from Lucas Jellema

Apache Superset - open source data exploration and visualization (Conclusion ...
Apache Superset - open source data exploration and visualization (Conclusion ...Apache Superset - open source data exploration and visualization (Conclusion ...
Apache Superset - open source data exploration and visualization (Conclusion ...Lucas Jellema
 
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...Lucas Jellema
 
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
Help me move away from Oracle - or not?!  (Oracle Community Tour EMEA - LVOUG...Help me move away from Oracle - or not?!  (Oracle Community Tour EMEA - LVOUG...
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...Lucas Jellema
 
Op je vingers tellen... tot 1000!
Op je vingers tellen... tot 1000!Op je vingers tellen... tot 1000!
Op je vingers tellen... tot 1000!Lucas Jellema
 
IoT - from prototype to enterprise platform (DigitalXchange 2022)
IoT - from prototype to enterprise platform (DigitalXchange 2022)IoT - from prototype to enterprise platform (DigitalXchange 2022)
IoT - from prototype to enterprise platform (DigitalXchange 2022)Lucas Jellema
 
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...Lucas Jellema
 
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...Lucas Jellema
 
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...Lucas Jellema
 
Introducing Dapr.io - the open source personal assistant to microservices and...
Introducing Dapr.io - the open source personal assistant to microservices and...Introducing Dapr.io - the open source personal assistant to microservices and...
Introducing Dapr.io - the open source personal assistant to microservices and...Lucas Jellema
 
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...Lucas Jellema
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Lucas Jellema
 
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)Lucas Jellema
 
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...Lucas Jellema
 
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)Lucas Jellema
 
Tech Talks 101 - DevOps (jan 2022)
Tech Talks 101 - DevOps (jan 2022)Tech Talks 101 - DevOps (jan 2022)
Tech Talks 101 - DevOps (jan 2022)Lucas Jellema
 
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...Lucas Jellema
 
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...Lucas Jellema
 
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...Lucas Jellema
 
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...Lucas Jellema
 
Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...
Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...
Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...Lucas Jellema
 

More from Lucas Jellema (20)

Apache Superset - open source data exploration and visualization (Conclusion ...
Apache Superset - open source data exploration and visualization (Conclusion ...Apache Superset - open source data exploration and visualization (Conclusion ...
Apache Superset - open source data exploration and visualization (Conclusion ...
 
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
 
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
Help me move away from Oracle - or not?!  (Oracle Community Tour EMEA - LVOUG...Help me move away from Oracle - or not?!  (Oracle Community Tour EMEA - LVOUG...
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
 
Op je vingers tellen... tot 1000!
Op je vingers tellen... tot 1000!Op je vingers tellen... tot 1000!
Op je vingers tellen... tot 1000!
 
IoT - from prototype to enterprise platform (DigitalXchange 2022)
IoT - from prototype to enterprise platform (DigitalXchange 2022)IoT - from prototype to enterprise platform (DigitalXchange 2022)
IoT - from prototype to enterprise platform (DigitalXchange 2022)
 
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
 
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
 
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
 
Introducing Dapr.io - the open source personal assistant to microservices and...
Introducing Dapr.io - the open source personal assistant to microservices and...Introducing Dapr.io - the open source personal assistant to microservices and...
Introducing Dapr.io - the open source personal assistant to microservices and...
 
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
 
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
 
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
 
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
 
Tech Talks 101 - DevOps (jan 2022)
Tech Talks 101 - DevOps (jan 2022)Tech Talks 101 - DevOps (jan 2022)
Tech Talks 101 - DevOps (jan 2022)
 
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
 
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
 
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
 
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
 
Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...
Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...
Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...
 

Recently uploaded

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 

Recently uploaded (20)

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 

Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push (OracleCode San Francisco 2017)

  • 1. REAL TIME UI WITH APACHE KAFKA STREAMING ANALYTICS OF FAST DATA AND SERVER PUSH Lucas Jellema (CTO AMIS & Oracle Developer Champion) 12th May 2017, Oracle Friday Cloud Update, Utrecht, The Netherlands
  • 2.
  • 3.
  • 7. FAST DATA AND ACTIVE UI • Handle influx • Publish findings instantaneously • Update UI & notify end user immediately • Analyze in real time • Decoupled components • No data loss when a component is temporarily down • Scalable with volume of events and of number of clients
  • 8. THE CASE AT HAND Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Show live tweet aggregates per conference Allow users to like tweets – and show live list of liked tweets Show a live list of top 3 liked tweets per conference
  • 12. REQUIREMENTS FOR EVENT CAPABILITY • Provide decoupling between publisher and consumer • Generally accessible for all consumers • Using standardized protocols and formats for communications and event payload (http, JSON) • Scalable (handle high loads) • Available (allow speedy event publication) • Reliable (do not lose events, at least once delivery) • Event Ordering (deliver events in the order of publication) • Manageable at scale • Retain Event History • For consumers that are late to the game • To construct state from all historic events: Event Sourcing
  • 13. INTRODUCING APACHE KAFKA • ..- 2010 – creation at Linkedin • Message Bus | Event Broker • High volume, low latency, highly reliable, cross technology • Scalable, distributed, strict message ordering, …. • 2011/2012 – open source under the Apache Incubator/ Top Project • Kafka is used by many large corporations: • Walmart, Cisco, Netflix, PayPal, LinkedIn, eBay, Spotify, Uber, Sift Science • And embraced by many software vendors & cloud providers • Client libraries available for NodeJS, Java, C++, Python, Ruby, PHP and many more
  • 14. KAFKA TERMINOLOGY • Topic • partition • Message • == ByteArray • Broker • replicated • Producer • Consumer • Working together in Consumer Groups Producer Consumer Topic Broker Key Value Time Message
  • 16. THE CASE AT HAND – STEP ONE Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic
  • 17. THE CASE AT HAND – STEP ONE AND A HALF Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic
  • 22. HIGH CODE (2) – PRODUCE MESSAGE TO KAFKA
  • 23. THE CASE AT HAND – STEP ONE AND TWO Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic
  • 24. KAFKA CONSUMER IN NODE GET EVENTS PUSHED INTO APPLICATION
  • 25. THE CASE AT HAND SERVER SENT EVENTS FOR PUSH BACK Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic Server Sent Event
  • 26. SERVER SENT EVENT – SERVER SIDE
  • 27. SERVER SENT EVENT – CLIENT SIDE
  • 29. THE CASE AT HAND TWEET LIKES – CLIENT TO SERVER TO ALL CLIENTS Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic SSE Allow users to like tweets – and show live list of liked tweets
  • 30. THE CASE AT HAND WEB SOCKETS – FOR BI DIRECTIONAL PUSH Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic SSE WebSockets Allow users to like tweets – and show live list of liked tweets
  • 34. THE CASE AT HAND STREAMING ANALYSIS OF TWEET EVENTS Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic SSE WebSockets Allow users to like tweets – and show live list of liked tweets Show live tweet aggregates per conference
  • 35. THE CASE AT HAND - STREAMING ANALYSIS OF TWEETS Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic WebSockets Allow users to like tweets – and show live list of liked tweets Show live tweet aggregates per conference tweetAnalytics Topic Streaming Tweets Aggregation µ SSE
  • 36. KAFKA STREAMS • Real Time Event [Stream] Processing integrated into Kafka • Aggregations & Top-N • Time Windows • Continuous Queries • Latest State (event sourcing) • Turn Stream (of changes) into Table (of most recent or current state) • Part of the state can be quite old • A Kafka Streams client will have state in memory • Always to be recreated from topic partition log files • Note: Kafka Streams is relatively new • Only support for Java clients
  • 38. EXAMPLE OF KAFKA STREAMS Topic groupBy Aggregate Join Topic Map (Xform) Publish TweetMessage Conference Text Author Hastag Set Conference as key Sum/Avg/Top3 by key (==conference) As JSON Round aggregate to nearest 100 Latest Conference Details Topic: CountTweetsPerConference and possibly per time window
  • 39. KAFKA STREAMS – RUNNING COUNT TWEETS PER CONFERENCE
  • 40. STREAMING TWEET ANALYTICS PUSHED TO CLIENTS Server Sent Event
  • 41. THE CASE AT HAND - STREAMING ANALYSIS OF TWEET LIKES Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic WebSockets Allow users to like tweets – and show live list of liked tweets Show live tweet aggregates per conference tweetAnalytics Topic Streaming Tweets Aggregation µ SSE Show a live list of top 3 liked tweets per conference
  • 42. THE CASE AT HAND - STREAMING ANALYSIS OF TWEET LIKES Client Client Client Client Tweets on #oow17 #javaone #oraclecode Show live tweet feed for conferences Tweets Topic WebSockets Allow users to like tweets – and show live list of liked tweets Show live tweet aggregates per conference tweetAnalytics Topic Streaming Tweets Aggregation µ SSE Show a live list of top 3 liked tweets per conference Likes Aggregation µ tweetLike Topic Top3TweetLikes PerConference
  • 44. RUNNING TOP 3 OF BEST LIKED TWEETS PER CONFERENCE Server Sent Event
  • 45. END TO END FLOW CLOUD ENABLED API Cache EventHub CS µ Tweets Aggregation µ LikesTweets UI µ Client Chrome Client Firefox Likes Aggregation µ API µ Tweet Count Likes Top3
  • 46. CONCLUSION • Fast data – Active UI • Decoupled processing • And distributed across clouds and on premises • Kafka • Events & Data Store • Streaming Analysis • Modern browser – push capability • SSE, WebSocket, HTTP/2, WebWorker Notifications • Active UI with fresh data without burden on application server and back end system • “Step away from that F5 key”
  • 47. • Blog: technology.amis.nl • Email: lucas.jellema@amis.nl • : lucasjellema • : lucas-jellema • : www.amis.nl, info@amis.nl +31 306016000 Edisonbaan 15, Nieuwegein

Editor's Notes

  1. Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push Fast data arrives in real time and potentially high volume. Rapid processing, filtering and aggregation is required to ensure timely reaction and actual information in user interfaces. Doing so is a challenge, make this happen in a scalable and reliable fashion is even more interesting. This session introduces Apache Kafka as the scalable event bus that takes care of the events as they flow in and Kafka Streams for the streaming analytics. Both Java and Node applications are demonstrated that interact with Kafka and leverage Server Sent Events and WebSocket channels to update the Web UI in real time. User activity performed by the audience in the Web UI is processed by the Kafka powered back end and results in live updates on all clients. Introducing the challenge: fast data, scalable and decoupled event handling, streaming analytics Introduction of Kafka demo of Producing to and consuming from Kafka in Java and Nodejs clients Intro Kafka Stream API for streaming analytics Demo streaming analytics from java client Intro of web ui: HTML 5, WebSocket channel and SSE listener Demo of Push from server to Web UI - in general End to end flow: - IFTTT picks up Tweets and pushed them to an API that hands them to Kafka Topic. - The Java application Consumes these events, performs Streaming Analytics (grouped by hashtag and author and time window) and counts them; the aggregation results are produced to Kafka - The NodeJS application consumes these aggregation results and pushes them to Web UI - The WebUI displays the selected Tweets along with the aggregation results - in the Web UI, users can LIKE and RATE the tweets; each like or rating is sent to the server and produced to Kafka; these events are processed too through Stream Analytics and result in updated Like counts and Average Rating results; these are then pushed to all clients; this means that the audience can Tweet, see the tweet appear in the web ui on their own device, rate & like and see the ratings and like count update in real time
  2. http://stackoverflow.com/questions/35861501/kafka-in-docker-not-working Docker images from Confluent: https://hub.docker.com/r/confluent/kafka/