SlideShare uma empresa Scribd logo
1 de 56
Time Series Analysis
… using an Event Streaming Platform
Dr. Mirko Kämpf - SA @ Confluent, Inc. - Team CEMEA
Meetup - Leipzig
Time Series Analysis
… using an Event Streaming Platform
Advanced time series analysis (TSA) requires very special data preparation procedures to convert raw data into
compatible formats.
In this presentation you will see typical processing patterns for TSA, from simple statistics to reconstruction of correlation
networks and interaction graphs.
The first case is relevant for anomaly detection and to protect safety.
Reconstruction of graphs from time series data is a very useful technique to better understand complex systems like
supply chains, material flows in factories, information flows within organizations, and especially in medical research.
With this motivation we will look at typical data aggregation patterns, how to apply analysis algorithms in the cloud, and
into a reference architecture for TSA on top of the Confluent Platform, which is baked by Apache Kafka.
This presentation is about linking:
- Time-Series-Analysis (TSA)
- Network- or Graph-Analysis Confluent Platform
- Complex Event Processing (CEP).
Research work ends often with nice charts, scientific papers, and conference talks.
But, many published results can’t be reproduced -
often because the setup it is simply too complicated ...
Question:
How can we integrate data streams,
experiments, and decision making better?
Why not using batch processing?
Study the anatomy … ● Batch processing is fine:
○ as long as your data
doesn’t change.
○ in PoCs for method
Development in the Lab.
○ For research in fixed scope.
Why using Kafka?
Study the anatomy … Study and influence
the living system ...
● Stream processing is better:
○ for real time business in
changing environments.
○ iterative (research)
projects.
○ repeatable experiments on
replayed data.
From Events to Time Series ...
to Graphs … to Events …
for better Decisions
Let’s stream the title :
WHAT?
WHY?
Content:
(1) Intro
Typical types of event
How to identify hidden events?
3 aspects around advanced analytics:
Complex event analysis
Integration across domains
Extraction of hidden events
(2) The Challenge
(3) Approach
Time Series Analytics &
Network Analytics
in Kafka
Create time series from events
Create graphs from time series pairs
(4) Architecture:
Simplified architecture for CSA
Reusable building blocks for CSA
Events - 1
Business events
- transaction records
- discrete observation
A Sale
A Trade
An Invoice
A Customer
Experience
JUTS SIMPLE
OBSERVATION &
DATA CAPTURING
How to handle events?
Events
Events - 2
Well defined events
- in known context
Sometimes: SIMPLE
Sometimes: DATA ANALYSIS
How to identify events?
directly observed
“observed” during
analysis of an episode
Events
Events - 3
Extreme Events
- “outliers” in
unknown context
ADVANCED
DATA ANALYSIS (& ML)
How to handle?
1111
Reality is Complex:
We should simplify a bit!
Simplification in our method
can lead to isolation:
- DATA SILOS
- OPERATIONAL SILOS
SOLUTION:
GRAPHS capture structure.
TIME SERIES capture
properties over time (history).
relations as graph
or matrix:
objects in groups:
Interacting Subsystems ⇒ Multi-Layer-Networks
Such dependencies cause effects which are not measurable directly.
>>> This is the reason for using the methodology!!!
Univariate TSA: single episodes are processed
- Distribution of values
- Fluctuation properties
- Long-term correlations
(memory effects)
Multivariate TSA: pairs / tuples of episodes are processed
- Comparison
Similarity
measures
for link
creation
WHAT?
WHY?
Events
Events - 4
Hidden Events
- invisible state
changes in
complex systems
Contextual
TIME SERIES ANALYSIS &
NETWORK Topology ANALYSIS
How to handle?
Special procedures
established or under
construction
The events which make
people & the market
happy :-)
Complex Event AnalysisEvent Driven Architecture
Recap:
IT Operations
- Server crash
- Cyber crime
Business Events
- Big deal won
- Technical issue solved
Transactions (in business)
- orders placed
- products shipped
- bills paid
Extreme Events:
- Service slow down due
to emerging bottlenecks
- Increased demand in a
resource
What events are
and how to process
event-data is often
misunderstood or
simply unclear.
It all depends on our view
and our goals!
Things become complicated:
Complex Event Analysis
Integration Across Domains
Extraction of Hidden Event
Complex Event Analysis
- time series analysis and ML reveal hidden events
- multi-stage processing is usually needed
METHODOLOGY
Integration Across Domains
- distributed event processing systems are used
- apps consume and produce events of different flavors
- Event-types and data structures my change over
ORGANIZATION & OPERATIONS
Extraction of Hidden Events
- requires Applied Data Analysis & Data Science
- embedding of Complex Algorithms in IT landscape
- integration of GPU/HPC and data pipelines
TECHNOLOGY & SCIENCE
22
The Challenge:
How can we combine unbound data assets and scientific methods?
A. you pipe the data to the place where it can be processed easily,
e.g., to the cloud or into special purpose systems.
B. you integrate complex algorithms in your processing pipeline.
23
Problems on ORGANIZATION level:
Legacy systems in the fab can’t be integrated without additional expensive servers.
Often, this data is unreachable.
Business data is managed by different teams using different technologies.
Data scientists play with some data in the cloud, and they all do really L❤VE
notebooks. But often, they don’t know CI/CD systems.
24
Kafka and its Ecosystem …
- are considered to be middleware, managed by IT people:
- researchers do not plan their experiments around such a technology.
- don’t offer ML / AI components:
- many people think, that a model has to be executed on the edge-device or in the cloud.
25
Kafka can support agile experiments …
- it gives access to data (flows) in real time,
- in a way, which allows a replay of experiments at a later point in time
- completely managed by Confluent
- allows variation of analysis without redoing the same experiment
by simply reusing the persisted event-stream again.
- Kafka Streams and KSQL allow data processing in place
- this allows faster iterations because plausibility checks can be done in place
- the streaming API gives freedom for extension
- DSL and KSQL save you a lot of time
Why not building on top of the right tools ???
27
How to make use of a variety of event data:
for an Event-Driven Business / Research?
1
Get to
“Hello World”
Handle
business
events.
2
Connect systems
via event-streams
Integrate events
from multiple
domains.
3
Build 1-3 contextual,
event-driven apps
4
Enter adoption flywheel
(more apps > more
events > more apps)
5
Contextual,
event-driven business
Start capturing of
untracked data
to supplement
existing business
processes.
Implement operational excellence:
More event driven apps, more use cases,
more responsibility…
DevOps culture & Scientific approach,
From coding to experiments with data ...
Event processing systems are no
longer just IT backends.
Emergence of a nervous system
which connects divisions and
organizations.
PAST
PRESENCE
28
ADVANCED
TIME SERIES ANALYSIS &
NETWORK ANALYSIS
… and how both fit into Kafka.
29
METHODOLOGICAL aspects:
How do time series analysis and graphs fit into Kafka’s data model?
I think, Kafka is a messaging system? Or am I wrong?
Please, tell me, how can I use Kafka for advanced analytics
or even machine learning?
Table Stream Duality
Table - Stream Duality
Table Stream Duality ⇒ Time Series and Graphs
A time series is a table of ordered observations
in a fixed context.
A graph can be seen as a list of nodes and a list
of links - properties are stored in two tables.
Create Time Series from Event Streams:
By Aggregation, Grouping, and Sorting
Events /
Observations
event series
time series
Create Networks from Event Streams:
By Aggregation, Grouping, and Sorting
Events /
Observations
node properties
link properties
From Table of Events to - Time Series
Multi Layer Stream Processing:
TSA to Reveal Hidden System Structures
Events /
Observations
event
series
time
series
Node
properties
Link
properties
Node
properties
Link
properties
Static
Topology
Dynamic
Topology
Multivariate
TSA
Univariate
TSA
Dynamic & Static Topology
Complex Event Processing: For Complex Systems
System
Events /
Emerging
Patterns
Node
properties
Link
properties
Topology
Analysis
Use the Table-Network Analogy: Kafka Graphs
https://github.com/rayokota/kafka-graphs
large durable graphs:
Persisted in Kafka topic
Sliding Windows: Define the Temporal Graphs
In some use cases, we don’t want to keep the node and link data in topics:
- nodes aren’t always linked
- changes are very fast
- focus on activation patterns,
rather than on underlying structure
It is fine to calculate the correlation links
and the topology metrics on the fly,
just for a given time window.
t
1
t
2
Back
to
Streams
...
Architecture:
Identify Patterns &
Buildingblocks
42
Let’s look into 3 examples:
(1) Linear flow ...
(2) Bi-directional flow ...
(3) Complex process flows ...
43
(1) Linear flow ...
(2) Bi-directional flow ...
(3) Complex process flows ...
Easy:
1. reusable
2. scalable
3. ready to use
4. ready to improve
⇒ Target for simplification ...
Let’s look into 3 examples:
A Standardized Processing Procedure for Episodes
used for social media analysis on Hadoop:
- The predecessor of OpenTSx is Hadoop.TS
(https://www.researchgate.net/publication/269687614_Hadoop_TS_Large-Scale_Time-Series_Processing)
- Hadoop.TS used a variety of Hadoop ecosystem projects
(Sqoop, Flume, Hive, Spark, Yarn, HDFS, Solr, HBase, Impala, Mahout, Giraph)
- Managing the data flow at scale was possible, but complex.
46
This example illustrate the variety
of interconnected components from our implementation
in the Hadoop ecosystem.
The resulting complexity of a solution can become a blocker!
Architects have to simplify …
… and the Kafka Ecosystem helps you on this journey!
47
Simplify
Data Assets
Building Blocks:
Data flows are no
longer transient.
The event log acts as
single source of truth.
Paradigm Shift in
Data Management
UDFs:
Data Assets
Building Blocks:
Domain specific logic is
implemented in small
reusable components:
Domain Driven Design
Data flows are no
longer transient.
The event log acts as
single source of truth.
Paradigm Shift in
Data Management
UDFs:
Kafka Connect
Data Assets
Building Blocks:
Source Connectors
Integrate input side …
Legacy and Future Systems
Domain specific logic is
implemented in small
eusable components:
Domain Driven Design
Data flows are no
longer transient.
The event log acts as
single source of truth.
Paradigm Shift in
Data Management
Kafka Connect
UDFs:
Kafka Connect
Data Assets
Building Blocks:
Source Connectors
integrate input side …
Legacy and Future Systems
Sink Connectors
integrate output side …
Special Purpose Systems
Domain specific logic is
implemented in small
reusable components:
Domain Driven Design
Data flows are no
longer transient.
The event log acts as
single source of truth.
Paradigm Shift in
Data Management
Kafka Connect
KSQL & Kafka Streams
UDFs:
Primary Data
Kafka Connect
Derived Data
Kafka Cluster
Kafka: A Platform for Complex Event Processing
53
Demo: OpenTSx
Generate some observations.
Form an episode (using windowing functions).
Apply some time series processing procedures on the stream of episodes.
>>> Automatically define a KStreams application via KSQL statement using UDFs.
Complex procedures are composed from a set of fundamental building blocks.
>>> Deploy ksqlDB query to your streaming data in a Kafka cluster.
https://github.com/kamir/OpenTSx
54
Summary:
Because Kafka is a scalable & extensible platform it fits well for
complex event processing in any industry on premise and in the cloud.
Kafka ecosystem provides extension points for any kind of domain specific
or custom functionality - from advanced analytics to real time data enrichment.
Complex solutions are composed from a few fundamental building blocks:
55
What to do next?
(A) Identify relevant main flows and processing patterns in your project.
(B) Identify or implement source / sink connectors and establish 1st flow.
(C) Implement custom transformations as Kafka independent components.
(D) Integrate the processing topology as Kafka Streams application:
(a) Do you apply standard transformations and joins (for enrichment)?
(b) Is a special treatment required (advanced analysis)?
(c) Do you need special hardware / external services (AI/ML for classification)?
(E) Share your connectors and UDFs with the growing Kafka community.
(F) Iterate, add more flows and more topologies to your environment.
56
THANK YOU !!!
mirko@confluent.io
@semanpix

Mais conteúdo relacionado

Mais procurados

Technical Deep Dive: Using Apache Kafka to Optimize Real-Time Analytics in Fi...
Technical Deep Dive: Using Apache Kafka to Optimize Real-Time Analytics in Fi...Technical Deep Dive: Using Apache Kafka to Optimize Real-Time Analytics in Fi...
Technical Deep Dive: Using Apache Kafka to Optimize Real-Time Analytics in Fi...
confluent
 
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Michael Noll
 
Achieve Sub-Second Analytics on Apache Kafka with Confluent and Imply
Achieve Sub-Second Analytics on Apache Kafka with Confluent and ImplyAchieve Sub-Second Analytics on Apache Kafka with Confluent and Imply
Achieve Sub-Second Analytics on Apache Kafka with Confluent and Imply
confluent
 
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
confluent
 

Mais procurados (20)

Technical Deep Dive: Using Apache Kafka to Optimize Real-Time Analytics in Fi...
Technical Deep Dive: Using Apache Kafka to Optimize Real-Time Analytics in Fi...Technical Deep Dive: Using Apache Kafka to Optimize Real-Time Analytics in Fi...
Technical Deep Dive: Using Apache Kafka to Optimize Real-Time Analytics in Fi...
 
New Approaches for Fraud Detection on Apache Kafka and KSQL
New Approaches for Fraud Detection on Apache Kafka and KSQLNew Approaches for Fraud Detection on Apache Kafka and KSQL
New Approaches for Fraud Detection on Apache Kafka and KSQL
 
Build a Bridge to Cloud with Apache Kafka® for Data Analytics Cloud Services
Build a Bridge to Cloud with Apache Kafka® for Data Analytics Cloud ServicesBuild a Bridge to Cloud with Apache Kafka® for Data Analytics Cloud Services
Build a Bridge to Cloud with Apache Kafka® for Data Analytics Cloud Services
 
Using Kafka to integrate DWH and Cloud Based big data systems
Using Kafka to integrate DWH and Cloud Based big data systemsUsing Kafka to integrate DWH and Cloud Based big data systems
Using Kafka to integrate DWH and Cloud Based big data systems
 
Building a Streaming Platform with Kafka
Building a Streaming Platform with KafkaBuilding a Streaming Platform with Kafka
Building a Streaming Platform with Kafka
 
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
 
Concepts and Patterns for Streaming Services with Kafka
Concepts and Patterns for Streaming Services with KafkaConcepts and Patterns for Streaming Services with Kafka
Concepts and Patterns for Streaming Services with Kafka
 
Time Series Analysis Using an Event Streaming Platform
 Time Series Analysis Using an Event Streaming Platform Time Series Analysis Using an Event Streaming Platform
Time Series Analysis Using an Event Streaming Platform
 
Confluent Steaming Webinar - Cape Town - Vitality
Confluent Steaming Webinar - Cape Town - VitalityConfluent Steaming Webinar - Cape Town - Vitality
Confluent Steaming Webinar - Cape Town - Vitality
 
Leveraging Mainframe Data for Modern Analytics
Leveraging Mainframe Data for Modern AnalyticsLeveraging Mainframe Data for Modern Analytics
Leveraging Mainframe Data for Modern Analytics
 
All Streams Ahead! ksqlDB Workshop ANZ
All Streams Ahead! ksqlDB Workshop ANZAll Streams Ahead! ksqlDB Workshop ANZ
All Streams Ahead! ksqlDB Workshop ANZ
 
How to Build an Apache Kafka® Connector
How to Build an Apache Kafka® ConnectorHow to Build an Apache Kafka® Connector
How to Build an Apache Kafka® Connector
 
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
Now You See Me, Now You Compute: Building Event-Driven Architectures with Apa...
 
What is Apache Kafka®?
What is Apache Kafka®?What is Apache Kafka®?
What is Apache Kafka®?
 
Deep Dive Series #3: Schema Validation + Structured Audit Logs
Deep Dive Series #3: Schema Validation + Structured Audit LogsDeep Dive Series #3: Schema Validation + Structured Audit Logs
Deep Dive Series #3: Schema Validation + Structured Audit Logs
 
Achieve Sub-Second Analytics on Apache Kafka with Confluent and Imply
Achieve Sub-Second Analytics on Apache Kafka with Confluent and ImplyAchieve Sub-Second Analytics on Apache Kafka with Confluent and Imply
Achieve Sub-Second Analytics on Apache Kafka with Confluent and Imply
 
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
 
Neha Narkhede | Kafka Summit London 2019 Keynote | Event Streaming: Our Cloud...
Neha Narkhede | Kafka Summit London 2019 Keynote | Event Streaming: Our Cloud...Neha Narkhede | Kafka Summit London 2019 Keynote | Event Streaming: Our Cloud...
Neha Narkhede | Kafka Summit London 2019 Keynote | Event Streaming: Our Cloud...
 
Real-time processing of large amounts of data
Real-time processing of large amounts of dataReal-time processing of large amounts of data
Real-time processing of large amounts of data
 
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
 

Semelhante a Time series-analysis-using-an-event-streaming-platform -_v3_final

Moving Towards a Streaming Architecture
Moving Towards a Streaming ArchitectureMoving Towards a Streaming Architecture
Moving Towards a Streaming Architecture
Gabriele Modena
 
Microsoft SQL Server - StreamInsight Overview Presentation
Microsoft SQL Server - StreamInsight Overview PresentationMicrosoft SQL Server - StreamInsight Overview Presentation
Microsoft SQL Server - StreamInsight Overview Presentation
Microsoft Private Cloud
 
Introduction to Stream Processing
Introduction to Stream ProcessingIntroduction to Stream Processing
Introduction to Stream Processing
Guido Schmutz
 
Achieving Real-time Ingestion and Analysis of Security Events through Kafka a...
Achieving Real-time Ingestion and Analysis of Security Events through Kafka a...Achieving Real-time Ingestion and Analysis of Security Events through Kafka a...
Achieving Real-time Ingestion and Analysis of Security Events through Kafka a...
Kevin Mao
 

Semelhante a Time series-analysis-using-an-event-streaming-platform -_v3_final (20)

Time Series Analysis… using an Event Streaming Platform
Time Series Analysis… using an Event Streaming PlatformTime Series Analysis… using an Event Streaming Platform
Time Series Analysis… using an Event Streaming Platform
 
Moving Towards a Streaming Architecture
Moving Towards a Streaming ArchitectureMoving Towards a Streaming Architecture
Moving Towards a Streaming Architecture
 
Microsoft SQL Server - StreamInsight Overview Presentation
Microsoft SQL Server - StreamInsight Overview PresentationMicrosoft SQL Server - StreamInsight Overview Presentation
Microsoft SQL Server - StreamInsight Overview Presentation
 
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch AnalysisNoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
 
How we evolved data pipeline at Celtra and what we learned along the way
How we evolved data pipeline at Celtra and what we learned along the wayHow we evolved data pipeline at Celtra and what we learned along the way
How we evolved data pipeline at Celtra and what we learned along the way
 
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, Confluent
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, ConfluentApache Kafka and the Data Mesh | Ben Stopford and Michael Noll, Confluent
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, Confluent
 
C19013010 the tutorial to build shared ai services session 2
C19013010 the tutorial to build shared ai services session 2C19013010 the tutorial to build shared ai services session 2
C19013010 the tutorial to build shared ai services session 2
 
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
 
Oracle Stream Analytics - Simplifying Stream Processing
Oracle Stream Analytics - Simplifying Stream ProcessingOracle Stream Analytics - Simplifying Stream Processing
Oracle Stream Analytics - Simplifying Stream Processing
 
Introduction to Stream Processing
Introduction to Stream ProcessingIntroduction to Stream Processing
Introduction to Stream Processing
 
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
 
Sybase IQ ile Analitik Platform
Sybase IQ ile Analitik PlatformSybase IQ ile Analitik Platform
Sybase IQ ile Analitik Platform
 
Building an analytical platform
Building an analytical platformBuilding an analytical platform
Building an analytical platform
 
Reintroducing the Stream Processor: A universal tool for continuous data anal...
Reintroducing the Stream Processor: A universal tool for continuous data anal...Reintroducing the Stream Processor: A universal tool for continuous data anal...
Reintroducing the Stream Processor: A universal tool for continuous data anal...
 
Trivento summercamp fast data 9/9/2016
Trivento summercamp fast data 9/9/2016Trivento summercamp fast data 9/9/2016
Trivento summercamp fast data 9/9/2016
 
Achieving Real-time Ingestion and Analysis of Security Events through Kafka a...
Achieving Real-time Ingestion and Analysis of Security Events through Kafka a...Achieving Real-time Ingestion and Analysis of Security Events through Kafka a...
Achieving Real-time Ingestion and Analysis of Security Events through Kafka a...
 
Strata+Hadoop 2015 NYC End User Panel on Real-Time Data Analytics
Strata+Hadoop 2015 NYC End User Panel on Real-Time Data AnalyticsStrata+Hadoop 2015 NYC End User Panel on Real-Time Data Analytics
Strata+Hadoop 2015 NYC End User Panel on Real-Time Data Analytics
 
Big Data Session 1.pptx
Big Data Session 1.pptxBig Data Session 1.pptx
Big Data Session 1.pptx
 
(SPOT305) Event-Driven Computing on Change Logs in AWS | AWS re:Invent 2014
(SPOT305) Event-Driven Computing on Change Logs in AWS | AWS re:Invent 2014(SPOT305) Event-Driven Computing on Change Logs in AWS | AWS re:Invent 2014
(SPOT305) Event-Driven Computing on Change Logs in AWS | AWS re:Invent 2014
 
Apache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataApache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing data
 

Mais de confluent

Mais de confluent (20)

Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
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...
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flink
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalk
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Mesh
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservices
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernization
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time data
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
 
The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023
 

Último

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Último (20)

Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 

Time series-analysis-using-an-event-streaming-platform -_v3_final

  • 1. Time Series Analysis … using an Event Streaming Platform Dr. Mirko Kämpf - SA @ Confluent, Inc. - Team CEMEA Meetup - Leipzig
  • 2. Time Series Analysis … using an Event Streaming Platform Advanced time series analysis (TSA) requires very special data preparation procedures to convert raw data into compatible formats. In this presentation you will see typical processing patterns for TSA, from simple statistics to reconstruction of correlation networks and interaction graphs. The first case is relevant for anomaly detection and to protect safety. Reconstruction of graphs from time series data is a very useful technique to better understand complex systems like supply chains, material flows in factories, information flows within organizations, and especially in medical research. With this motivation we will look at typical data aggregation patterns, how to apply analysis algorithms in the cloud, and into a reference architecture for TSA on top of the Confluent Platform, which is baked by Apache Kafka.
  • 3. This presentation is about linking: - Time-Series-Analysis (TSA) - Network- or Graph-Analysis Confluent Platform - Complex Event Processing (CEP). Research work ends often with nice charts, scientific papers, and conference talks. But, many published results can’t be reproduced - often because the setup it is simply too complicated ... Question: How can we integrate data streams, experiments, and decision making better?
  • 4. Why not using batch processing? Study the anatomy … ● Batch processing is fine: ○ as long as your data doesn’t change. ○ in PoCs for method Development in the Lab. ○ For research in fixed scope.
  • 5. Why using Kafka? Study the anatomy … Study and influence the living system ... ● Stream processing is better: ○ for real time business in changing environments. ○ iterative (research) projects. ○ repeatable experiments on replayed data.
  • 6. From Events to Time Series ... to Graphs … to Events … for better Decisions Let’s stream the title : WHAT? WHY?
  • 7. Content: (1) Intro Typical types of event How to identify hidden events? 3 aspects around advanced analytics: Complex event analysis Integration across domains Extraction of hidden events (2) The Challenge (3) Approach Time Series Analytics & Network Analytics in Kafka Create time series from events Create graphs from time series pairs (4) Architecture: Simplified architecture for CSA Reusable building blocks for CSA
  • 8. Events - 1 Business events - transaction records - discrete observation A Sale A Trade An Invoice A Customer Experience JUTS SIMPLE OBSERVATION & DATA CAPTURING How to handle events?
  • 9. Events Events - 2 Well defined events - in known context Sometimes: SIMPLE Sometimes: DATA ANALYSIS How to identify events? directly observed “observed” during analysis of an episode
  • 10. Events Events - 3 Extreme Events - “outliers” in unknown context ADVANCED DATA ANALYSIS (& ML) How to handle?
  • 11. 1111 Reality is Complex: We should simplify a bit! Simplification in our method can lead to isolation: - DATA SILOS - OPERATIONAL SILOS SOLUTION: GRAPHS capture structure. TIME SERIES capture properties over time (history). relations as graph or matrix: objects in groups:
  • 12. Interacting Subsystems ⇒ Multi-Layer-Networks Such dependencies cause effects which are not measurable directly. >>> This is the reason for using the methodology!!!
  • 13. Univariate TSA: single episodes are processed - Distribution of values - Fluctuation properties - Long-term correlations (memory effects)
  • 14. Multivariate TSA: pairs / tuples of episodes are processed - Comparison Similarity measures for link creation
  • 16. Events Events - 4 Hidden Events - invisible state changes in complex systems Contextual TIME SERIES ANALYSIS & NETWORK Topology ANALYSIS How to handle?
  • 17. Special procedures established or under construction The events which make people & the market happy :-) Complex Event AnalysisEvent Driven Architecture Recap: IT Operations - Server crash - Cyber crime Business Events - Big deal won - Technical issue solved Transactions (in business) - orders placed - products shipped - bills paid Extreme Events: - Service slow down due to emerging bottlenecks - Increased demand in a resource What events are and how to process event-data is often misunderstood or simply unclear. It all depends on our view and our goals!
  • 18. Things become complicated: Complex Event Analysis Integration Across Domains Extraction of Hidden Event
  • 19. Complex Event Analysis - time series analysis and ML reveal hidden events - multi-stage processing is usually needed METHODOLOGY
  • 20. Integration Across Domains - distributed event processing systems are used - apps consume and produce events of different flavors - Event-types and data structures my change over ORGANIZATION & OPERATIONS
  • 21. Extraction of Hidden Events - requires Applied Data Analysis & Data Science - embedding of Complex Algorithms in IT landscape - integration of GPU/HPC and data pipelines TECHNOLOGY & SCIENCE
  • 22. 22 The Challenge: How can we combine unbound data assets and scientific methods? A. you pipe the data to the place where it can be processed easily, e.g., to the cloud or into special purpose systems. B. you integrate complex algorithms in your processing pipeline.
  • 23. 23 Problems on ORGANIZATION level: Legacy systems in the fab can’t be integrated without additional expensive servers. Often, this data is unreachable. Business data is managed by different teams using different technologies. Data scientists play with some data in the cloud, and they all do really L❤VE notebooks. But often, they don’t know CI/CD systems.
  • 24. 24 Kafka and its Ecosystem … - are considered to be middleware, managed by IT people: - researchers do not plan their experiments around such a technology. - don’t offer ML / AI components: - many people think, that a model has to be executed on the edge-device or in the cloud.
  • 25. 25 Kafka can support agile experiments … - it gives access to data (flows) in real time, - in a way, which allows a replay of experiments at a later point in time - completely managed by Confluent - allows variation of analysis without redoing the same experiment by simply reusing the persisted event-stream again. - Kafka Streams and KSQL allow data processing in place - this allows faster iterations because plausibility checks can be done in place - the streaming API gives freedom for extension - DSL and KSQL save you a lot of time
  • 26. Why not building on top of the right tools ???
  • 27. 27 How to make use of a variety of event data: for an Event-Driven Business / Research? 1 Get to “Hello World” Handle business events. 2 Connect systems via event-streams Integrate events from multiple domains. 3 Build 1-3 contextual, event-driven apps 4 Enter adoption flywheel (more apps > more events > more apps) 5 Contextual, event-driven business Start capturing of untracked data to supplement existing business processes. Implement operational excellence: More event driven apps, more use cases, more responsibility… DevOps culture & Scientific approach, From coding to experiments with data ... Event processing systems are no longer just IT backends. Emergence of a nervous system which connects divisions and organizations. PAST PRESENCE
  • 28. 28 ADVANCED TIME SERIES ANALYSIS & NETWORK ANALYSIS … and how both fit into Kafka.
  • 29. 29 METHODOLOGICAL aspects: How do time series analysis and graphs fit into Kafka’s data model? I think, Kafka is a messaging system? Or am I wrong? Please, tell me, how can I use Kafka for advanced analytics or even machine learning?
  • 31. Table - Stream Duality
  • 32. Table Stream Duality ⇒ Time Series and Graphs A time series is a table of ordered observations in a fixed context. A graph can be seen as a list of nodes and a list of links - properties are stored in two tables.
  • 33. Create Time Series from Event Streams: By Aggregation, Grouping, and Sorting Events / Observations event series time series
  • 34. Create Networks from Event Streams: By Aggregation, Grouping, and Sorting Events / Observations node properties link properties
  • 35. From Table of Events to - Time Series
  • 36. Multi Layer Stream Processing: TSA to Reveal Hidden System Structures Events / Observations event series time series Node properties Link properties Node properties Link properties Static Topology Dynamic Topology Multivariate TSA Univariate TSA
  • 37. Dynamic & Static Topology Complex Event Processing: For Complex Systems System Events / Emerging Patterns Node properties Link properties Topology Analysis
  • 38. Use the Table-Network Analogy: Kafka Graphs https://github.com/rayokota/kafka-graphs large durable graphs: Persisted in Kafka topic
  • 39. Sliding Windows: Define the Temporal Graphs In some use cases, we don’t want to keep the node and link data in topics: - nodes aren’t always linked - changes are very fast - focus on activation patterns, rather than on underlying structure It is fine to calculate the correlation links and the topology metrics on the fly, just for a given time window. t 1 t 2
  • 42. 42 Let’s look into 3 examples: (1) Linear flow ... (2) Bi-directional flow ... (3) Complex process flows ...
  • 43. 43 (1) Linear flow ... (2) Bi-directional flow ... (3) Complex process flows ... Easy: 1. reusable 2. scalable 3. ready to use 4. ready to improve ⇒ Target for simplification ... Let’s look into 3 examples:
  • 44. A Standardized Processing Procedure for Episodes used for social media analysis on Hadoop: - The predecessor of OpenTSx is Hadoop.TS (https://www.researchgate.net/publication/269687614_Hadoop_TS_Large-Scale_Time-Series_Processing) - Hadoop.TS used a variety of Hadoop ecosystem projects (Sqoop, Flume, Hive, Spark, Yarn, HDFS, Solr, HBase, Impala, Mahout, Giraph) - Managing the data flow at scale was possible, but complex.
  • 45.
  • 46. 46 This example illustrate the variety of interconnected components from our implementation in the Hadoop ecosystem. The resulting complexity of a solution can become a blocker! Architects have to simplify … … and the Kafka Ecosystem helps you on this journey!
  • 48. Data Assets Building Blocks: Data flows are no longer transient. The event log acts as single source of truth. Paradigm Shift in Data Management
  • 49. UDFs: Data Assets Building Blocks: Domain specific logic is implemented in small reusable components: Domain Driven Design Data flows are no longer transient. The event log acts as single source of truth. Paradigm Shift in Data Management
  • 50. UDFs: Kafka Connect Data Assets Building Blocks: Source Connectors Integrate input side … Legacy and Future Systems Domain specific logic is implemented in small eusable components: Domain Driven Design Data flows are no longer transient. The event log acts as single source of truth. Paradigm Shift in Data Management
  • 51. Kafka Connect UDFs: Kafka Connect Data Assets Building Blocks: Source Connectors integrate input side … Legacy and Future Systems Sink Connectors integrate output side … Special Purpose Systems Domain specific logic is implemented in small reusable components: Domain Driven Design Data flows are no longer transient. The event log acts as single source of truth. Paradigm Shift in Data Management
  • 52. Kafka Connect KSQL & Kafka Streams UDFs: Primary Data Kafka Connect Derived Data Kafka Cluster Kafka: A Platform for Complex Event Processing
  • 53. 53 Demo: OpenTSx Generate some observations. Form an episode (using windowing functions). Apply some time series processing procedures on the stream of episodes. >>> Automatically define a KStreams application via KSQL statement using UDFs. Complex procedures are composed from a set of fundamental building blocks. >>> Deploy ksqlDB query to your streaming data in a Kafka cluster. https://github.com/kamir/OpenTSx
  • 54. 54 Summary: Because Kafka is a scalable & extensible platform it fits well for complex event processing in any industry on premise and in the cloud. Kafka ecosystem provides extension points for any kind of domain specific or custom functionality - from advanced analytics to real time data enrichment. Complex solutions are composed from a few fundamental building blocks:
  • 55. 55 What to do next? (A) Identify relevant main flows and processing patterns in your project. (B) Identify or implement source / sink connectors and establish 1st flow. (C) Implement custom transformations as Kafka independent components. (D) Integrate the processing topology as Kafka Streams application: (a) Do you apply standard transformations and joins (for enrichment)? (b) Is a special treatment required (advanced analysis)? (c) Do you need special hardware / external services (AI/ML for classification)? (E) Share your connectors and UDFs with the growing Kafka community. (F) Iterate, add more flows and more topologies to your environment.