SlideShare a Scribd company logo
1 of 90
Download to read offline
© Instaclustr Pty Limited, 2023
Spinning your Drones with
Cadence® Workflows, Apache
Kafka®, and TensorFlow
Paul Brebner
Open Source Technology Evangelist
Instaclustr (part of Spot by NetApp)
www.instaclustr.com/paul-brebner/
All Things Open 2023
A Talk in Two Parts
© Instaclustr Pty Limited, 2023 (Source: Getty Images)
Part 1: Cadence + Kafka + Drones
© Instaclustr Pty Limited, 2023
(Source: Getty Images)
Part 2: ML with TensorFlow
à predictions
© Instaclustr Pty Limited, 2023
(Source: Getty Images)
Cloud Platform for Big
Data Open Source
Technologies
A recent addition is
Workflow Orchestration
with Uber’s Open Source
Instaclustr Managed Platform
© Instaclustr Pty Limited, 2023
This Talk Is About Cadence,
Kafka, and TensorFlow (BYO)
© Instaclustr Pty Limited, 2023
© Instaclustr Pty Limited, 2023
Part 1
Workflow Orchestration (Simple
Concept): Task Ordering
Start
© Instaclustr Pty Limited, 2023
Start Task 1
© Instaclustr Pty Limited, 2023
Workflow Orchestration (Simple
Concept): Task Ordering
Start Task 1 Task 2
© Instaclustr Pty Limited, 2023
Workflow Orchestration (Simple
Concept): Task Ordering
Start Task 1 Task 2 End
© Instaclustr Pty Limited, 2023
Workflow Orchestration (Simple
Concept): Task Ordering
But Harder In Practice…
Pedalling with a high Cadence (pedal revolutions) is called Spinning!
Mashing or grinding is slow (and bad).
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
Workload Orchestration with
Cadence is Horizontally Scalable—the number of workflows is unlimited
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
Cadence is Fault-Tolerant—Workflows can fail!
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
...And recover
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
Cadence supports Long Running & Scheduled Workflows
(Source: Photo by Soly Moses from Pexels)
© Instaclustr Pty Limited, 2023
3, 2, 1, Go!
Cadence has Advanced Visibility
(Workflow Execution Visualisation and Search)
(Source: Getty Images)
© Instaclustr Pty Limited, 2023
Cadence Workflows Are Code
@Override
public void startWorkflow(String a) {
String b = activities.task1(a);
String c = activities.task2(b);
}
A workflow implementation with 2 tasks executed sequentially
© Instaclustr Pty Limited, 2023
Start Task 1 Task 2 End
Cadence Architecture
Instaclustr Managed Service
Workers
Run workflow logic
Customer Managed
Clients and Workers
Workers
Workers
Clients and
Workers
Instaclustr Managed
Cadence and Database Clusters
Cadence Servers
Database
Cassandra
PostgreSQL
Kafka +
OpenSearch
(optional for
Advanced Visibility)
Java and Go Clients
are supported
APIs
© Instaclustr Pty Limited, 2023
© Instaclustr Pty Limited, 2023
Start Task 1 Task 2 End
Database
State Change History Written to Database – Write efficient
S0
𝜹1
𝜹2
HERE
How Does Cadence Fault-Tolerance Work?
Event-Sourcing = State Change History + Replaying
S1 S2
Workflow State Recovery by
Replaying History
© Instaclustr Pty Limited, 2023
Start Task 1 Task 2 End
Database
Failure causes complete history
replay
Replay
Workflow State Recovery by
Replaying History
© Instaclustr Pty Limited, 2023
Start Task 1 Task 2 End
Database
Replaying workflow history recreates
Workflow state and restart point –
Read inefficient but hopefully infrequent
Replay
Restart
S2
= S0 +𝜹1 + 𝜹2
𝜹1 𝜹2
S0
Sleep/Schedule use the same
mechanism
© Instaclustr Pty Limited, 2023
Start Task 1 Task 2 End
Database
Sleep…
(Source: Getty Images)
Sleep/Schedule use the same
mechanism
© Instaclustr Pty Limited, 2023
Start Task 1 Task 2 End
Database
Workflow state is recreated when
tasks are scheduled to start
Replay
Schedule
S2
= S0 +𝜹1 + 𝜹2
𝜹1 𝜹2
S0
Eat
Sleep…
(Source: Getty Images)
Cadence Activities implement Tasks
Activities (including
backwards cycling)
can fail
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
Activity: Task 2
Activity: Task 1
§ Activities are core to Cadence, they implement tasks
§ Remote calls can fail, so wrap them in Activities
§ They can contain any code
§ Activities are executed at most once and can be automatically retried on failure
§ But must be deterministic
Cadence Activities
© Instaclustr Pty Limited, 2023
Start End
Remote
Call
§ 100s to millions of running workflows
§ Long running workflows, sleeping and scheduled tasks
§ Stateful fault-tolerant applications
§ Complex workflows
§ Integration with unreliable external systems
§ Integration with streaming and event-based systems (e.g. Kafka)
§ Short workflows
§ Short workflows (100s of steps)
§ Long workflows (1000s of steps) may take longer to replay history
For example? Financial, retail, delivery!
Good Use Cases?
© Instaclustr Pty Limited, 2023
Spinning your Drones!
A Drone Delivery Application
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
Drone Workflow Steps
§ Charged ready to go at base
§ Get an Order to deliver
§ Fly to Order location and collect Order
§ Fly to Delivery location and drop Order
§ Fly back to base
§ Recharge
§ Repeat
© Instaclustr Pty Limited, 2023
Shop
Customer
3 Legs: Base to Order to
Delivery to Base
Example (Pirates) of Drone Delivery
Flight
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
Drone Way Point Flight Calculations
§ Drone flight path is computed in an
activity
§ Using location, distance, bearing,
speed, and charge
§ Every 10 seconds
§ On failure, the drone won’t crash
and will continue flying from
the last location
Returning to Base Example
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
The System: Swim-Lane Diagrams
1st Workflow: Drone Workflow
Recharge
© Instaclustr Pty Limited, 2023
Start, Ready, Wait for Order, Movement Activities, Recharge, Repeat
Orders Are Also Stateful→Workflow
2nd Workflow: Order Workflow
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
Start, Generate locations, ready for drone, update locations, End if delivered
Orders Are Also Stateful→Workflow
2nd Workflow: Order Workflow
So, we need coordination between the
workflows:
(1) Asynchronous Signaling between
workflows
But what about with other systems?
(Source: Shutterstock)
1
© Instaclustr Pty Limited, 2023
Next, Cadence Meets Kafka
(Source: https://bahumbug.wordpress.com/2014/08/03/kafka-onna-bike/)
© Instaclustr Pty Limited, 2023
(1) Starting a workflow
from Kafka
© Instaclustr Pty Limited, 2023
1
Integration With Kafka Adds
(2) Using a Kafka microservice
to coordinate Drone and Order
workflows
© Instaclustr Pty Limited, 2023
2
Integration With Kafka Adds
Step 1: Customer Places an Order—
Order Sent to Kafka New Orders Topic
1
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
2
Consumer
Step 2: Start New Order Workflow—
Kafka Consumer Gets Order, Starts New Order Workflow Using Cadence Client
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
3
Activity
Step 3: Order Ready for Drone Pickup—
Activity: Send Order Ready Message to Orders Ready Topic
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
4
Activity
Consumer
A Drone+Order Matching
Microservice
Step 4: Drone Workflow—
Activity: Send Drone Ready Message to Drone Ready Topic, Kafka Consumer
Gets an Order ID and Sends Signal Back to Drone to start the order pickup
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
5
Step 5: Drone Workflow—Fly To Order
Activity: Fly to Order Location
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
5
Step 5: Drone Workflow—Fly To Order
And Pickup Order
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
6
Step 6: Drone Workflow—Fly To Delivery Location
Activity: Fly to Delivery Location
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
Step 6: Drone Workflow—Fly To Delivery Location
And Drop Order; Send Location Updates to Order Workflow Every 10s
6
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
7
Step 7: Drone Workflow—Fly To Base
Activity: Fly to Delivery Location; recharge when back at base and start new drone workflow
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
8
Step 8: Order Workflow—Update Location
Receive State and Location Signal From Drone Workflow, Update State;
If Delivered Then End Workflow
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
Architectural Analysis
Similarities, differences, timescales, performance
© Instaclustr Pty Limited, 2023
(Source: Getty Images) (Source: Getty Images)
Uber’s Cadence + Apache Kafka =
Similarities
© Instaclustr Pty Limited, 2023
Cadence (Workflows) Kafka (Streaming Events)
Scalable (event sourcing) Scalable (partitions, cluster)
Persistent (event sourcing) Persistent (event replaying)
Reliable workflow execution (event
sourcing)
Reliable event delivery
Asynchronous signals Asynchronous events
Open Source Open Source
Available as a managed service Available as a managed service
Uber’s Cadence =
Orchestration (synchronous/timed sequences)
© Instaclustr Pty Limited, 2023
Different
architectural
(musical)
styles
(Source: Getty Images)
Apache Kafka =
Choreography (asynchronous)
© Instaclustr Pty Limited, 2023
Different
architectural
(musical)
styles
(Source: Getty Images)
Combined Cadence + Kafka = Ballet!
© Instaclustr Pty Limited, 2023
Integrated in a new
style
Cadence + Kafka =
Complementary Timescales
© Instaclustr Pty Limited, 2023
(Source: Getty Images)
Cadence + Kafka =
Complementary Timescales
© Instaclustr Pty Limited, 2023
Cadence (Slow Workflows) Kafka (Fast Streaming Events)
Synchronous Events Asynchronous Events
Stateful flows Stateless events
Sequences One-off events
Slow/long-running flows Fast/instantaneous events
Sleep/Schedule events Real-time processing of events
Complex flow logic Complex Stream Processing (Kafka
Streams)
Cadence + Kafka =
Integration à Drone Ballet
© Instaclustr Pty Limited, 2023
Drone show, Japan (Source: Getty Images)
How Many Drones
Can We Fly?
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
Cluster Details (VCPUS):
Client (8), Cadence (6), Cassandra (18)
6
18
8
VCPUs Per Cluster (32 total)
Cadence Cassandra Client (EC2)
© Instaclustr Pty Limited, 2023
Load Test:
2,000 Drones + 2,000 Orders = 4,000 Workflows
2000 2000
4000
0
500
1000
1500
2000
2500
3000
3500
4000
4500
Concurrent Workflows
Drones Orders Total
© Instaclustr Pty Limited, 2023
20 Drones Flying
Purple = base
Black = drone
Orange = shop
Red = delivery location
Green = successful delivery
© Instaclustr Pty Limited, 2023
© Instaclustr Pty Limited, 2023
Part 2
© Instaclustr Pty Limited, 2023
Goal: Predict which shops
will be busy
Busy
(Source: Getty Images)
Kafka+ML (TensorFlow) over
spatiotemporal drifting streaming data
Kafka+ML (TensorFlow) over
spatiotemporal drifting streaming data
© Instaclustr Pty Limited, 2023
Not Busy
Goal: Predict which shops
will be busy, or not busy
(Source: Getty Images)
Real-time ML is Everywhere—
TikTok+Cat Videos etc.
© Instaclustr Pty Limited, 2023 (Source: Shutterstock)
Incremental Learning Challenges
© Instaclustr Pty Limited, 2023
Big Data—lots of data
Fast Data—streaming, new data
constantly arriving
Changing Data—concept drift
Just-in-time learning—continuous
learning, model must be up to date
Streaming data is infinite, so can’t
assume access to all past data
(Source: Shutterstock)
The Drone Learning Problem
The Drone Delivery System
Generates massive amounts of
spatiotemporal data
Drone order data sent to Kafka
Can we learn how to predict which shops will
be busy in an hour?
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
ML Architecture
© Instaclustr Pty Limited, 2023
Kafka Streams
Kafka Streams computes aggregated
hourly shop & order details à
Busy/NotBusy categorization
Sent to TensorFlow
Simulation produces lots of
streaming spatiotemporal
data (drone and order state
and locations)
“C” Is for Cat!
Mark 1 Perceptron Circa 1960
© Instaclustr Pty Limited, 2023
TensorFlow is a
modern neural
network framework
which supports
incremental learning
Incremental ML—Incrementally!
Experiment 1: “Still” Batch Data Only, No Drift
© Instaclustr Pty Limited, 2023
6,000 samples over a week
Class: Shop busy/not busy per hour
Class and features are computed from
hourly aggregated delivery/shop data
Other features include weekday, shop
type, average delivery time, etc.
Time is quantized to hours, location to
“suburb” (this is “cheating” and ignores
actual time/space scale granularity)
Rule is a combination of shop type,
location, weekday and hour (Source: Shutterstock)
TensorFlow Steps
© Instaclustr Pty Limited, 2023
1 Setup Python TensorFlow on your computer
2 Import Pandas and “Numpies”
3 Define data columns (and class label)
4 Read the data into a Panda DataFrame
5 Split the data into training/evaluation subsets
6 Create a model (design, build, compile)
7 Prepare training data (features and class)
8 Train/fit the model (auto epochs)
9 Evaluate the model
In step 8, every time the “fit”
method is called it updates
the model – this is critical for
Incremental learning
10 Use the model on new data
In step 6, we used the “Adam”
optimizer
Evaluation: What Matters?
Accuracy
© Instaclustr Pty Limited, 2023
Can be misleading unless roughly equal positive/negative samples
(Source: Shutterstock)
Initial Results: 1 week of drone delivery data
with shop busy/not busy 50:50 split
© Instaclustr Pty Limited, 2023
Training: Accuracy improved during training from 0.5 to 0.88 over 125 Epochs
Evaluation confusion matrix – good results
But! Results not repeatable, accuracy (0.5-0.9) and training time (5-92s) vary
Sensitive to batch size (number of samples used per epoch: 8-64, 32 most consistent)
And it sometimes gets stuck in a bad local minima.
Data size = 6,000 samples
Shop busy/not busy
hourly over a week
Training/evaluation only
use a subset
Experiment 2: Incremental Learning—
No Kafka, No Drift
© Instaclustr Pty Limited, 2023
Incremental clicker games can be addictive
Goals:
Continuous model training
From streaming data
Incremental learning—don’t need all the data
Model is up-to-date all the time
Useful for real-time use cases
Can cope with concept drift in the data
(eventually)
This experiment:
Same data as last time
But incremental learning (Source: Shutterstock)
Approach and Results
© Instaclustr Pty Limited, 2023
Approach
Slicing the data to get 100 samples at a time
(simulating Kafka poll)
Fit with each sample
Batch 8, and 20 fixed epochs
Evaluate against all previous data
Results
Accuracy improves with time - good
Max accuracy comparable with Batch learning
But Oscillation! What’s going on?
Experiment 3:
Incremental Learning Using Kafka
© Instaclustr Pty Limited, 2023
“Franz Kafka reading data in the style of Dali”
(Source: Paul Brebner. Dalle-2)
Results:
Better, Not as Much Oscillation
© Instaclustr Pty Limited, 2023
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0 10 20 30 40 50 60
Accuracy over 1 week
X-axis is just “loop” number
But accuracy worse: 0.72 c.f. 0.9
for batch on same data
Experiment 4:
Incremental Learning, Kafka & Concept Drift
© Instaclustr Pty Limited, 2023
(Source: Shutterstock)
Concept Drift at Start of Week 2
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0 20 40 60 80 100 120
Concept Drift - incremental training (time vs accuracy)
same model guessing
Best accuracy during week 1 = 0.7
Concept drift introduced at start of week 2
Accuracy instantly drops to worse (0.3)
than guessing (0.5)
Accuracy gradually improves to 0.75
Oscillation still
Drift
© Instaclustr Pty Limited, 2023
Experiment 4b: Reset the Model
© Instaclustr Pty Limited, 2023
(Source: Getty Images)
Reset the Model After Drift
If accuracy drops too much, reset the model.
Retrain using only new data – removes pre-drift model “inertia”.
Helps immediately (accuracy 0.9)
But oscillation, and accuracy drops to 0.7 by end of week 2.
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 20 40 60 80 100 120
Concept Drift - incremental training (time vs
accuracy)
same model reset model guessing
© Instaclustr Pty Limited, 2023
Why Oscillation?
Accidental Drift
We had accidental drift!
Even though the rules weren’t changing,
the data was changing over time.
Why? Because temporal features (day of
week and time of day) were used to
determine shops busy/not busy.
And some hours had no busy shops (end
of day!) – so accuracy actually increased.
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
Time Bias/Fixation
I’m late! I’m late!
Incremental learning may result in
a temporal bias due to fixation on
recent samples
(Source: Wikimedia)
© Instaclustr Pty Limited, 2023
And Then Down a Rabbit-Hole
Model overfitting (indicated by Oscillation) on time-series data is a well-known problem
Time-series data + incremental learning = down the rabbit-hole (somewhere strange and hard to understand!)
(Source: Getty Images)
© Instaclustr Pty Limited, 2023
Spatiotemporal Challenges
© Instaclustr Pty Limited, 2023
Default time encodings have “temporal discontinuities”
E.g. Time wraps around at midnight/midday (12:00 = 00:00)
(Source: Wikimedia)
Spatiotemporal Challenges
© Instaclustr Pty Limited, 2023
Periodicity/repetition is common in temporal
data
Ocean Waves have Temporal and Spatial
Periodicity
Surfers, Gold Coast, Australia (Source: AdobeStock)
Can We Fix It? Get Rid of Time
Time to try “no time”
(Source: Shutterstock)
© Instaclustr Pty Limited, 2023
Experiment 4c: No Time Results
No wild oscillations
With reset model, big drop in accuracy initially, but slightly better accuracy by end of week 2.
In production could continue using old model until new one is trained up again.
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 20 40 60 80 100 120
Concept Drift - incremental training (time vs accuracy)
No time features
same model reset model guessing
© Instaclustr Pty Limited, 2023
Conclusions
• Incremental learning is fast, it should be able to keep up with streaming data in a production
system
• And incremental learning is able to keep the model up to date (more or less), in conjunction
with resetting
• Model accuracy may oscillate due to the presence
of time features, fixation on recent data, changes in sample
class distribution over time, and concept drift
• Overfitting on timeseries data is something to watch out
for and take action to prevent/mitigate
- Try “Rolling/Sliding Windows” to “flatten” oscillations
• Try multiple competing models concurrently
• Potential to use Cadence Workflows for MLOps
© Instaclustr Pty Limited, 2023
Rolling may be better (Source: Adobe Stock)
Spatial/Temporal Bias Is Inevitable
Observations are always
from a single point in
space and time—you only
directly experience ”here”
& “now”, and can only
inspect past events (not
future events)
You are (only) here
© Instaclustr Pty Limited, 2023
Try Cadence + Kafka + TensorFlow (BYO)
2 week free trial
www.instaclustr.com
info@instaclustr.com
@instaclustr
THANK
YOU!
© Instaclustr Pty Limited, 2023
www.instaclustr.com/paul-brebner/ ß 100+ Open Source Blogs

More Related Content

Similar to Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow

Day 2 Kubernetes - Tools for Operability (KubeCon)
Day 2 Kubernetes - Tools for Operability (KubeCon)Day 2 Kubernetes - Tools for Operability (KubeCon)
Day 2 Kubernetes - Tools for Operability (KubeCon)bridgetkromhout
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316Jupil Hwang
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSAOracle Korea
 
Addressing data plane performance measurement on OpenStack clouds using VMTP
Addressing data plane performance measurement on OpenStack clouds using VMTPAddressing data plane performance measurement on OpenStack clouds using VMTP
Addressing data plane performance measurement on OpenStack clouds using VMTPSuhail Syed
 
Vector Search / Generative AI introduction at Pulsar Meetup
Vector Search / Generative AI introduction at Pulsar MeetupVector Search / Generative AI introduction at Pulsar Meetup
Vector Search / Generative AI introduction at Pulsar MeetupDevin Bost
 
26Oct2023_Adding Generative AI to Real-Time Streaming Pipelines_ NYC Meetup
26Oct2023_Adding Generative AI to Real-Time Streaming Pipelines_ NYC Meetup26Oct2023_Adding Generative AI to Real-Time Streaming Pipelines_ NYC Meetup
26Oct2023_Adding Generative AI to Real-Time Streaming Pipelines_ NYC MeetupTimothy Spann
 
Episode 3: Kubernetes and Big Data Services
Episode 3: Kubernetes and Big Data ServicesEpisode 3: Kubernetes and Big Data Services
Episode 3: Kubernetes and Big Data ServicesMesosphere Inc.
 
Meetup: Streaming Data Pipeline Development
Meetup:  Streaming Data Pipeline DevelopmentMeetup:  Streaming Data Pipeline Development
Meetup: Streaming Data Pipeline DevelopmentTimothy Spann
 
A Review: Metaheuristic Technique in Cloud Computing
A Review: Metaheuristic Technique in Cloud ComputingA Review: Metaheuristic Technique in Cloud Computing
A Review: Metaheuristic Technique in Cloud ComputingIRJET Journal
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaRick Warren
 
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...Lightbend
 
Manage your kubernetes cluster with cluster api, azure and git ops
Manage your kubernetes cluster with cluster api, azure and git opsManage your kubernetes cluster with cluster api, azure and git ops
Manage your kubernetes cluster with cluster api, azure and git opsJorge Arteiro
 
Service Mesh on Kubernetes with Istio
Service Mesh on Kubernetes with IstioService Mesh on Kubernetes with Istio
Service Mesh on Kubernetes with IstioMichelle Holley
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programmingAraf Karsh Hamid
 
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...HostedbyConfluent
 
CN Asturias - Stateful application for kubernetes
CN Asturias -  Stateful application for kubernetes CN Asturias -  Stateful application for kubernetes
CN Asturias - Stateful application for kubernetes Cédrick Lunven
 
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...MSDEVMTL
 
Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Databricks
 
Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)bridgetkromhout
 
Meetup Streaming Data Pipeline Development
Meetup Streaming Data Pipeline DevelopmentMeetup Streaming Data Pipeline Development
Meetup Streaming Data Pipeline DevelopmentTimothy Spann
 

Similar to Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow (20)

Day 2 Kubernetes - Tools for Operability (KubeCon)
Day 2 Kubernetes - Tools for Operability (KubeCon)Day 2 Kubernetes - Tools for Operability (KubeCon)
Day 2 Kubernetes - Tools for Operability (KubeCon)
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Addressing data plane performance measurement on OpenStack clouds using VMTP
Addressing data plane performance measurement on OpenStack clouds using VMTPAddressing data plane performance measurement on OpenStack clouds using VMTP
Addressing data plane performance measurement on OpenStack clouds using VMTP
 
Vector Search / Generative AI introduction at Pulsar Meetup
Vector Search / Generative AI introduction at Pulsar MeetupVector Search / Generative AI introduction at Pulsar Meetup
Vector Search / Generative AI introduction at Pulsar Meetup
 
26Oct2023_Adding Generative AI to Real-Time Streaming Pipelines_ NYC Meetup
26Oct2023_Adding Generative AI to Real-Time Streaming Pipelines_ NYC Meetup26Oct2023_Adding Generative AI to Real-Time Streaming Pipelines_ NYC Meetup
26Oct2023_Adding Generative AI to Real-Time Streaming Pipelines_ NYC Meetup
 
Episode 3: Kubernetes and Big Data Services
Episode 3: Kubernetes and Big Data ServicesEpisode 3: Kubernetes and Big Data Services
Episode 3: Kubernetes and Big Data Services
 
Meetup: Streaming Data Pipeline Development
Meetup:  Streaming Data Pipeline DevelopmentMeetup:  Streaming Data Pipeline Development
Meetup: Streaming Data Pipeline Development
 
A Review: Metaheuristic Technique in Cloud Computing
A Review: Metaheuristic Technique in Cloud ComputingA Review: Metaheuristic Technique in Cloud Computing
A Review: Metaheuristic Technique in Cloud Computing
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
 
Manage your kubernetes cluster with cluster api, azure and git ops
Manage your kubernetes cluster with cluster api, azure and git opsManage your kubernetes cluster with cluster api, azure and git ops
Manage your kubernetes cluster with cluster api, azure and git ops
 
Service Mesh on Kubernetes with Istio
Service Mesh on Kubernetes with IstioService Mesh on Kubernetes with Istio
Service Mesh on Kubernetes with Istio
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming
 
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
 
CN Asturias - Stateful application for kubernetes
CN Asturias -  Stateful application for kubernetes CN Asturias -  Stateful application for kubernetes
CN Asturias - Stateful application for kubernetes
 
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
 
Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...
 
Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)Kubernetes Operability Tooling (GOTO Chicago 2019)
Kubernetes Operability Tooling (GOTO Chicago 2019)
 
Meetup Streaming Data Pipeline Development
Meetup Streaming Data Pipeline DevelopmentMeetup Streaming Data Pipeline Development
Meetup Streaming Data Pipeline Development
 

More from All Things Open

Building Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityBuilding Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityAll Things Open
 
Modern Database Best Practices
Modern Database Best PracticesModern Database Best Practices
Modern Database Best PracticesAll Things Open
 
Open Source and Public Policy
Open Source and Public PolicyOpen Source and Public Policy
Open Source and Public PolicyAll Things Open
 
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...All Things Open
 
The State of Passwordless Auth on the Web - Phil Nash
The State of Passwordless Auth on the Web - Phil NashThe State of Passwordless Auth on the Web - Phil Nash
The State of Passwordless Auth on the Web - Phil NashAll Things Open
 
Total ReDoS: The dangers of regex in JavaScript
Total ReDoS: The dangers of regex in JavaScriptTotal ReDoS: The dangers of regex in JavaScript
Total ReDoS: The dangers of regex in JavaScriptAll Things Open
 
What Does Real World Mass Adoption of Decentralized Tech Look Like?
What Does Real World Mass Adoption of Decentralized Tech Look Like?What Does Real World Mass Adoption of Decentralized Tech Look Like?
What Does Real World Mass Adoption of Decentralized Tech Look Like?All Things Open
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractAll Things Open
 
DEI Challenges and Success
DEI Challenges and SuccessDEI Challenges and Success
DEI Challenges and SuccessAll Things Open
 
Scaling Web Applications with Background
Scaling Web Applications with BackgroundScaling Web Applications with Background
Scaling Web Applications with BackgroundAll Things Open
 
Supercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblySupercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblyAll Things Open
 
Using SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksUsing SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksAll Things Open
 
Configuration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptConfiguration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptAll Things Open
 
Scaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramScaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramAll Things Open
 
Build Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceBuild Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceAll Things Open
 
Deploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamDeploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamAll Things Open
 
Sudo – Giving access while staying in control
Sudo – Giving access while staying in controlSudo – Giving access while staying in control
Sudo – Giving access while staying in controlAll Things Open
 
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsFortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsAll Things Open
 
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...All Things Open
 
Building AlmaLinux OS without RHEL sources code
Building AlmaLinux OS without RHEL sources codeBuilding AlmaLinux OS without RHEL sources code
Building AlmaLinux OS without RHEL sources codeAll Things Open
 

More from All Things Open (20)

Building Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityBuilding Reliability - The Realities of Observability
Building Reliability - The Realities of Observability
 
Modern Database Best Practices
Modern Database Best PracticesModern Database Best Practices
Modern Database Best Practices
 
Open Source and Public Policy
Open Source and Public PolicyOpen Source and Public Policy
Open Source and Public Policy
 
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
 
The State of Passwordless Auth on the Web - Phil Nash
The State of Passwordless Auth on the Web - Phil NashThe State of Passwordless Auth on the Web - Phil Nash
The State of Passwordless Auth on the Web - Phil Nash
 
Total ReDoS: The dangers of regex in JavaScript
Total ReDoS: The dangers of regex in JavaScriptTotal ReDoS: The dangers of regex in JavaScript
Total ReDoS: The dangers of regex in JavaScript
 
What Does Real World Mass Adoption of Decentralized Tech Look Like?
What Does Real World Mass Adoption of Decentralized Tech Look Like?What Does Real World Mass Adoption of Decentralized Tech Look Like?
What Does Real World Mass Adoption of Decentralized Tech Look Like?
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart Contract
 
DEI Challenges and Success
DEI Challenges and SuccessDEI Challenges and Success
DEI Challenges and Success
 
Scaling Web Applications with Background
Scaling Web Applications with BackgroundScaling Web Applications with Background
Scaling Web Applications with Background
 
Supercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblySupercharging tutorials with WebAssembly
Supercharging tutorials with WebAssembly
 
Using SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksUsing SQL to Find Needles in Haystacks
Using SQL to Find Needles in Haystacks
 
Configuration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptConfiguration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit Intercept
 
Scaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramScaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship Program
 
Build Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceBuild Developer Experience Teams for Open Source
Build Developer Experience Teams for Open Source
 
Deploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamDeploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache Beam
 
Sudo – Giving access while staying in control
Sudo – Giving access while staying in controlSudo – Giving access while staying in control
Sudo – Giving access while staying in control
 
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsFortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
 
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
 
Building AlmaLinux OS without RHEL sources code
Building AlmaLinux OS without RHEL sources codeBuilding AlmaLinux OS without RHEL sources code
Building AlmaLinux OS without RHEL sources code
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow

  • 1. © Instaclustr Pty Limited, 2023 Spinning your Drones with Cadence® Workflows, Apache Kafka®, and TensorFlow Paul Brebner Open Source Technology Evangelist Instaclustr (part of Spot by NetApp) www.instaclustr.com/paul-brebner/ All Things Open 2023
  • 2. A Talk in Two Parts © Instaclustr Pty Limited, 2023 (Source: Getty Images)
  • 3. Part 1: Cadence + Kafka + Drones © Instaclustr Pty Limited, 2023 (Source: Getty Images)
  • 4. Part 2: ML with TensorFlow à predictions © Instaclustr Pty Limited, 2023 (Source: Getty Images)
  • 5. Cloud Platform for Big Data Open Source Technologies A recent addition is Workflow Orchestration with Uber’s Open Source Instaclustr Managed Platform © Instaclustr Pty Limited, 2023
  • 6. This Talk Is About Cadence, Kafka, and TensorFlow (BYO) © Instaclustr Pty Limited, 2023
  • 7. © Instaclustr Pty Limited, 2023 Part 1
  • 8. Workflow Orchestration (Simple Concept): Task Ordering Start © Instaclustr Pty Limited, 2023
  • 9. Start Task 1 © Instaclustr Pty Limited, 2023 Workflow Orchestration (Simple Concept): Task Ordering
  • 10. Start Task 1 Task 2 © Instaclustr Pty Limited, 2023 Workflow Orchestration (Simple Concept): Task Ordering
  • 11. Start Task 1 Task 2 End © Instaclustr Pty Limited, 2023 Workflow Orchestration (Simple Concept): Task Ordering But Harder In Practice…
  • 12. Pedalling with a high Cadence (pedal revolutions) is called Spinning! Mashing or grinding is slow (and bad). (Source: Shutterstock) © Instaclustr Pty Limited, 2023 Workload Orchestration with
  • 13. Cadence is Horizontally Scalable—the number of workflows is unlimited (Source: Shutterstock) © Instaclustr Pty Limited, 2023
  • 14. Cadence is Fault-Tolerant—Workflows can fail! (Source: Shutterstock) © Instaclustr Pty Limited, 2023
  • 15. ...And recover (Source: Shutterstock) © Instaclustr Pty Limited, 2023
  • 16. Cadence supports Long Running & Scheduled Workflows (Source: Photo by Soly Moses from Pexels) © Instaclustr Pty Limited, 2023 3, 2, 1, Go!
  • 17. Cadence has Advanced Visibility (Workflow Execution Visualisation and Search) (Source: Getty Images) © Instaclustr Pty Limited, 2023
  • 18. Cadence Workflows Are Code @Override public void startWorkflow(String a) { String b = activities.task1(a); String c = activities.task2(b); } A workflow implementation with 2 tasks executed sequentially © Instaclustr Pty Limited, 2023 Start Task 1 Task 2 End
  • 19. Cadence Architecture Instaclustr Managed Service Workers Run workflow logic Customer Managed Clients and Workers Workers Workers Clients and Workers Instaclustr Managed Cadence and Database Clusters Cadence Servers Database Cassandra PostgreSQL Kafka + OpenSearch (optional for Advanced Visibility) Java and Go Clients are supported APIs © Instaclustr Pty Limited, 2023
  • 20. © Instaclustr Pty Limited, 2023 Start Task 1 Task 2 End Database State Change History Written to Database – Write efficient S0 𝜹1 𝜹2 HERE How Does Cadence Fault-Tolerance Work? Event-Sourcing = State Change History + Replaying S1 S2
  • 21. Workflow State Recovery by Replaying History © Instaclustr Pty Limited, 2023 Start Task 1 Task 2 End Database Failure causes complete history replay Replay
  • 22. Workflow State Recovery by Replaying History © Instaclustr Pty Limited, 2023 Start Task 1 Task 2 End Database Replaying workflow history recreates Workflow state and restart point – Read inefficient but hopefully infrequent Replay Restart S2 = S0 +𝜹1 + 𝜹2 𝜹1 𝜹2 S0
  • 23. Sleep/Schedule use the same mechanism © Instaclustr Pty Limited, 2023 Start Task 1 Task 2 End Database Sleep… (Source: Getty Images)
  • 24. Sleep/Schedule use the same mechanism © Instaclustr Pty Limited, 2023 Start Task 1 Task 2 End Database Workflow state is recreated when tasks are scheduled to start Replay Schedule S2 = S0 +𝜹1 + 𝜹2 𝜹1 𝜹2 S0 Eat Sleep… (Source: Getty Images)
  • 25. Cadence Activities implement Tasks Activities (including backwards cycling) can fail © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 26. Activity: Task 2 Activity: Task 1 § Activities are core to Cadence, they implement tasks § Remote calls can fail, so wrap them in Activities § They can contain any code § Activities are executed at most once and can be automatically retried on failure § But must be deterministic Cadence Activities © Instaclustr Pty Limited, 2023 Start End Remote Call
  • 27. § 100s to millions of running workflows § Long running workflows, sleeping and scheduled tasks § Stateful fault-tolerant applications § Complex workflows § Integration with unreliable external systems § Integration with streaming and event-based systems (e.g. Kafka) § Short workflows § Short workflows (100s of steps) § Long workflows (1000s of steps) may take longer to replay history For example? Financial, retail, delivery! Good Use Cases? © Instaclustr Pty Limited, 2023
  • 28. Spinning your Drones! A Drone Delivery Application (Source: Shutterstock) © Instaclustr Pty Limited, 2023
  • 29. Drone Workflow Steps § Charged ready to go at base § Get an Order to deliver § Fly to Order location and collect Order § Fly to Delivery location and drop Order § Fly back to base § Recharge § Repeat © Instaclustr Pty Limited, 2023 Shop Customer
  • 30. 3 Legs: Base to Order to Delivery to Base Example (Pirates) of Drone Delivery Flight © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 31. Drone Way Point Flight Calculations § Drone flight path is computed in an activity § Using location, distance, bearing, speed, and charge § Every 10 seconds § On failure, the drone won’t crash and will continue flying from the last location Returning to Base Example © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 32. The System: Swim-Lane Diagrams 1st Workflow: Drone Workflow Recharge © Instaclustr Pty Limited, 2023 Start, Ready, Wait for Order, Movement Activities, Recharge, Repeat
  • 33. Orders Are Also Stateful→Workflow 2nd Workflow: Order Workflow © Instaclustr Pty Limited, 2023 (Source: Shutterstock) Start, Generate locations, ready for drone, update locations, End if delivered
  • 34. Orders Are Also Stateful→Workflow 2nd Workflow: Order Workflow So, we need coordination between the workflows: (1) Asynchronous Signaling between workflows But what about with other systems? (Source: Shutterstock) 1 © Instaclustr Pty Limited, 2023
  • 35. Next, Cadence Meets Kafka (Source: https://bahumbug.wordpress.com/2014/08/03/kafka-onna-bike/) © Instaclustr Pty Limited, 2023
  • 36. (1) Starting a workflow from Kafka © Instaclustr Pty Limited, 2023 1 Integration With Kafka Adds
  • 37. (2) Using a Kafka microservice to coordinate Drone and Order workflows © Instaclustr Pty Limited, 2023 2 Integration With Kafka Adds
  • 38. Step 1: Customer Places an Order— Order Sent to Kafka New Orders Topic 1 © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 39. 2 Consumer Step 2: Start New Order Workflow— Kafka Consumer Gets Order, Starts New Order Workflow Using Cadence Client © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 40. 3 Activity Step 3: Order Ready for Drone Pickup— Activity: Send Order Ready Message to Orders Ready Topic © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 41. 4 Activity Consumer A Drone+Order Matching Microservice Step 4: Drone Workflow— Activity: Send Drone Ready Message to Drone Ready Topic, Kafka Consumer Gets an Order ID and Sends Signal Back to Drone to start the order pickup © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 42. 5 Step 5: Drone Workflow—Fly To Order Activity: Fly to Order Location © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 43. 5 Step 5: Drone Workflow—Fly To Order And Pickup Order © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 44. 6 Step 6: Drone Workflow—Fly To Delivery Location Activity: Fly to Delivery Location © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 45. Step 6: Drone Workflow—Fly To Delivery Location And Drop Order; Send Location Updates to Order Workflow Every 10s 6 © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 46. 7 Step 7: Drone Workflow—Fly To Base Activity: Fly to Delivery Location; recharge when back at base and start new drone workflow (Source: Shutterstock) © Instaclustr Pty Limited, 2023
  • 47. 8 Step 8: Order Workflow—Update Location Receive State and Location Signal From Drone Workflow, Update State; If Delivered Then End Workflow © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 48. Architectural Analysis Similarities, differences, timescales, performance © Instaclustr Pty Limited, 2023 (Source: Getty Images) (Source: Getty Images)
  • 49. Uber’s Cadence + Apache Kafka = Similarities © Instaclustr Pty Limited, 2023 Cadence (Workflows) Kafka (Streaming Events) Scalable (event sourcing) Scalable (partitions, cluster) Persistent (event sourcing) Persistent (event replaying) Reliable workflow execution (event sourcing) Reliable event delivery Asynchronous signals Asynchronous events Open Source Open Source Available as a managed service Available as a managed service
  • 50. Uber’s Cadence = Orchestration (synchronous/timed sequences) © Instaclustr Pty Limited, 2023 Different architectural (musical) styles (Source: Getty Images)
  • 51. Apache Kafka = Choreography (asynchronous) © Instaclustr Pty Limited, 2023 Different architectural (musical) styles (Source: Getty Images)
  • 52. Combined Cadence + Kafka = Ballet! © Instaclustr Pty Limited, 2023 Integrated in a new style
  • 53. Cadence + Kafka = Complementary Timescales © Instaclustr Pty Limited, 2023 (Source: Getty Images)
  • 54. Cadence + Kafka = Complementary Timescales © Instaclustr Pty Limited, 2023 Cadence (Slow Workflows) Kafka (Fast Streaming Events) Synchronous Events Asynchronous Events Stateful flows Stateless events Sequences One-off events Slow/long-running flows Fast/instantaneous events Sleep/Schedule events Real-time processing of events Complex flow logic Complex Stream Processing (Kafka Streams)
  • 55. Cadence + Kafka = Integration à Drone Ballet © Instaclustr Pty Limited, 2023 Drone show, Japan (Source: Getty Images)
  • 56. How Many Drones Can We Fly? © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 57. Cluster Details (VCPUS): Client (8), Cadence (6), Cassandra (18) 6 18 8 VCPUs Per Cluster (32 total) Cadence Cassandra Client (EC2) © Instaclustr Pty Limited, 2023
  • 58. Load Test: 2,000 Drones + 2,000 Orders = 4,000 Workflows 2000 2000 4000 0 500 1000 1500 2000 2500 3000 3500 4000 4500 Concurrent Workflows Drones Orders Total © Instaclustr Pty Limited, 2023
  • 59. 20 Drones Flying Purple = base Black = drone Orange = shop Red = delivery location Green = successful delivery © Instaclustr Pty Limited, 2023
  • 60. © Instaclustr Pty Limited, 2023 Part 2
  • 61. © Instaclustr Pty Limited, 2023 Goal: Predict which shops will be busy Busy (Source: Getty Images) Kafka+ML (TensorFlow) over spatiotemporal drifting streaming data
  • 62. Kafka+ML (TensorFlow) over spatiotemporal drifting streaming data © Instaclustr Pty Limited, 2023 Not Busy Goal: Predict which shops will be busy, or not busy (Source: Getty Images)
  • 63. Real-time ML is Everywhere— TikTok+Cat Videos etc. © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 64. Incremental Learning Challenges © Instaclustr Pty Limited, 2023 Big Data—lots of data Fast Data—streaming, new data constantly arriving Changing Data—concept drift Just-in-time learning—continuous learning, model must be up to date Streaming data is infinite, so can’t assume access to all past data (Source: Shutterstock)
  • 65. The Drone Learning Problem The Drone Delivery System Generates massive amounts of spatiotemporal data Drone order data sent to Kafka Can we learn how to predict which shops will be busy in an hour? (Source: Shutterstock) © Instaclustr Pty Limited, 2023
  • 66. ML Architecture © Instaclustr Pty Limited, 2023 Kafka Streams Kafka Streams computes aggregated hourly shop & order details à Busy/NotBusy categorization Sent to TensorFlow Simulation produces lots of streaming spatiotemporal data (drone and order state and locations)
  • 67. “C” Is for Cat! Mark 1 Perceptron Circa 1960 © Instaclustr Pty Limited, 2023 TensorFlow is a modern neural network framework which supports incremental learning
  • 68. Incremental ML—Incrementally! Experiment 1: “Still” Batch Data Only, No Drift © Instaclustr Pty Limited, 2023 6,000 samples over a week Class: Shop busy/not busy per hour Class and features are computed from hourly aggregated delivery/shop data Other features include weekday, shop type, average delivery time, etc. Time is quantized to hours, location to “suburb” (this is “cheating” and ignores actual time/space scale granularity) Rule is a combination of shop type, location, weekday and hour (Source: Shutterstock)
  • 69. TensorFlow Steps © Instaclustr Pty Limited, 2023 1 Setup Python TensorFlow on your computer 2 Import Pandas and “Numpies” 3 Define data columns (and class label) 4 Read the data into a Panda DataFrame 5 Split the data into training/evaluation subsets 6 Create a model (design, build, compile) 7 Prepare training data (features and class) 8 Train/fit the model (auto epochs) 9 Evaluate the model In step 8, every time the “fit” method is called it updates the model – this is critical for Incremental learning 10 Use the model on new data In step 6, we used the “Adam” optimizer
  • 70. Evaluation: What Matters? Accuracy © Instaclustr Pty Limited, 2023 Can be misleading unless roughly equal positive/negative samples (Source: Shutterstock)
  • 71. Initial Results: 1 week of drone delivery data with shop busy/not busy 50:50 split © Instaclustr Pty Limited, 2023 Training: Accuracy improved during training from 0.5 to 0.88 over 125 Epochs Evaluation confusion matrix – good results But! Results not repeatable, accuracy (0.5-0.9) and training time (5-92s) vary Sensitive to batch size (number of samples used per epoch: 8-64, 32 most consistent) And it sometimes gets stuck in a bad local minima. Data size = 6,000 samples Shop busy/not busy hourly over a week Training/evaluation only use a subset
  • 72. Experiment 2: Incremental Learning— No Kafka, No Drift © Instaclustr Pty Limited, 2023 Incremental clicker games can be addictive Goals: Continuous model training From streaming data Incremental learning—don’t need all the data Model is up-to-date all the time Useful for real-time use cases Can cope with concept drift in the data (eventually) This experiment: Same data as last time But incremental learning (Source: Shutterstock)
  • 73. Approach and Results © Instaclustr Pty Limited, 2023 Approach Slicing the data to get 100 samples at a time (simulating Kafka poll) Fit with each sample Batch 8, and 20 fixed epochs Evaluate against all previous data Results Accuracy improves with time - good Max accuracy comparable with Batch learning But Oscillation! What’s going on?
  • 74. Experiment 3: Incremental Learning Using Kafka © Instaclustr Pty Limited, 2023 “Franz Kafka reading data in the style of Dali” (Source: Paul Brebner. Dalle-2)
  • 75. Results: Better, Not as Much Oscillation © Instaclustr Pty Limited, 2023 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 10 20 30 40 50 60 Accuracy over 1 week X-axis is just “loop” number But accuracy worse: 0.72 c.f. 0.9 for batch on same data
  • 76. Experiment 4: Incremental Learning, Kafka & Concept Drift © Instaclustr Pty Limited, 2023 (Source: Shutterstock)
  • 77. Concept Drift at Start of Week 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0 20 40 60 80 100 120 Concept Drift - incremental training (time vs accuracy) same model guessing Best accuracy during week 1 = 0.7 Concept drift introduced at start of week 2 Accuracy instantly drops to worse (0.3) than guessing (0.5) Accuracy gradually improves to 0.75 Oscillation still Drift © Instaclustr Pty Limited, 2023
  • 78. Experiment 4b: Reset the Model © Instaclustr Pty Limited, 2023 (Source: Getty Images)
  • 79. Reset the Model After Drift If accuracy drops too much, reset the model. Retrain using only new data – removes pre-drift model “inertia”. Helps immediately (accuracy 0.9) But oscillation, and accuracy drops to 0.7 by end of week 2. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 20 40 60 80 100 120 Concept Drift - incremental training (time vs accuracy) same model reset model guessing © Instaclustr Pty Limited, 2023
  • 80. Why Oscillation? Accidental Drift We had accidental drift! Even though the rules weren’t changing, the data was changing over time. Why? Because temporal features (day of week and time of day) were used to determine shops busy/not busy. And some hours had no busy shops (end of day!) – so accuracy actually increased. (Source: Shutterstock) © Instaclustr Pty Limited, 2023
  • 81. Time Bias/Fixation I’m late! I’m late! Incremental learning may result in a temporal bias due to fixation on recent samples (Source: Wikimedia) © Instaclustr Pty Limited, 2023
  • 82. And Then Down a Rabbit-Hole Model overfitting (indicated by Oscillation) on time-series data is a well-known problem Time-series data + incremental learning = down the rabbit-hole (somewhere strange and hard to understand!) (Source: Getty Images) © Instaclustr Pty Limited, 2023
  • 83. Spatiotemporal Challenges © Instaclustr Pty Limited, 2023 Default time encodings have “temporal discontinuities” E.g. Time wraps around at midnight/midday (12:00 = 00:00) (Source: Wikimedia)
  • 84. Spatiotemporal Challenges © Instaclustr Pty Limited, 2023 Periodicity/repetition is common in temporal data Ocean Waves have Temporal and Spatial Periodicity Surfers, Gold Coast, Australia (Source: AdobeStock)
  • 85. Can We Fix It? Get Rid of Time Time to try “no time” (Source: Shutterstock) © Instaclustr Pty Limited, 2023
  • 86. Experiment 4c: No Time Results No wild oscillations With reset model, big drop in accuracy initially, but slightly better accuracy by end of week 2. In production could continue using old model until new one is trained up again. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 20 40 60 80 100 120 Concept Drift - incremental training (time vs accuracy) No time features same model reset model guessing © Instaclustr Pty Limited, 2023
  • 87. Conclusions • Incremental learning is fast, it should be able to keep up with streaming data in a production system • And incremental learning is able to keep the model up to date (more or less), in conjunction with resetting • Model accuracy may oscillate due to the presence of time features, fixation on recent data, changes in sample class distribution over time, and concept drift • Overfitting on timeseries data is something to watch out for and take action to prevent/mitigate - Try “Rolling/Sliding Windows” to “flatten” oscillations • Try multiple competing models concurrently • Potential to use Cadence Workflows for MLOps © Instaclustr Pty Limited, 2023 Rolling may be better (Source: Adobe Stock)
  • 88. Spatial/Temporal Bias Is Inevitable Observations are always from a single point in space and time—you only directly experience ”here” & “now”, and can only inspect past events (not future events) You are (only) here © Instaclustr Pty Limited, 2023
  • 89. Try Cadence + Kafka + TensorFlow (BYO) 2 week free trial
  • 90. www.instaclustr.com info@instaclustr.com @instaclustr THANK YOU! © Instaclustr Pty Limited, 2023 www.instaclustr.com/paul-brebner/ ß 100+ Open Source Blogs