SlideShare a Scribd company logo
TASKFLOW: STATE
MANAGEMENT FRAMEWORK
Vishal Yadav
NEC Technologies India Ltd.
Agenda
• Motivation for StateManagementics
• Expectations
• Scenario-1: VM Boot Abort & Resumption
• Scenario-2: Transaction Example
• Here Comes the TaskFlow
• Foundation Concepts
• Patterns
• Engines
• Persistence
• TaskFlow Demo
• Reference
• Questions
2
Motivation for StateManagementics
• Workflows without state management in place makes these hard
to follow, alter and recover
• Unreliable workflow and resource state
 It is hard to maintain correctness and consistency of distributed
systems
• RPC boundaries are a constant balance of improving scalability
but decreasing consistency
• Race conditions occur more often than desired
• Manager Driver API boundary
• Application and state recovery typically patched on after the fact
instead of built-in from the ground up (e.g. periodic tasks)
• Capability to service stop an application cleanly without manual
(or periodic) clean up is crucial for features like live upgrades
3
Expectations
• Customers expect stability and consistency
 API and service reliability
• Resource and/or state corruption (or people to fix manually these
problems) costs $$$
• Easy understanding of workflows and states allows the
development and alteration of existing workflows
• Upgrades (not even live), just upgrades
 Just say no to destroy the cloud to upgrade
4
5
Scenario-1: VM Boot Abort & Resumption
6
Scenario-1: VM Boot Abort & Resumption
We can continue the run instance process again from the point
where flow failed.
7
Scenario-2: Transaction Example
Flow resemblance with SQL transaction.
START TRANSACTION
task1: call API-1 to do op-1 || ROLLBACK
task2: task1 finish, call API-2 to do op-2 || ROLLBACK
...perform other tasks...
COMMIT
8
Here Comes the TaskFlow
• A library that makes task execution easy, consistent, and reliable
• Provides a framework for executing flow of operations such that
those flows can be paused, resumed, revoked at any time
• A paradigm and lightweight framework
• Community driven & well documented
• Library and code available though pypi & github
 https://pypi.python.org/pypi/taskflow
 https://github.com/openstack/taskflow
9
Foundation Concepts
• Code structure (your applications frame)
• Controlled execution
 Who & what manages the overall execution
• Persistence (how you know what was executed)
• Work recovery
 How you recover from failure/partial progress
10
Foundation Concepts
11
• Tasks
 Executes and reverts one action
 Receives inputs and declares outputs
• Flows
 Composes tasks (or subflows) into useful structures
 Imposes some definition of order also called patterns onto
the running of your tasks or subflows
Foundation Concepts
12
• Jobs
 The initial (and any derivative) set of tasks & flows required to
fulfil an action
 Can be transferred to a worker for completion
 Can be re-associated on worker failure (or timeout) for
resumption or undo/reversion
• Job Board
 A system where jobs can be atomically posted, reposted,
claimed, marked as completed
 Backed by varying implementations
 Message queue, zookeeper, database…
Foundation Concepts
13
Patterns
Attributes/
Patterns
Linear Unordered Graph
Summary Runs a list of tasks/flows,
one after the other in a serial
manner
Runs a set of tasks/flows, in
any order
Runs a graph composed of
tasks/flows in dependency
driven ordering
Constraints Predecessor tasks outputs
must satisfy successive tasks
inputs
Disallows inter-task
dependencies
Dependency driven, no
cycles. A tasks dependents
are guaranteed to be
satisfied before the task will
run
Use-Cases This pattern is useful for
structuring tasks/flows that
are fairly simple, where a
task/flow follows a previous
one
This pattern is useful for
tasks/flow that are fairly
simple and are typically
embarrassingly parallel
This pattern allows for a very
high level of potential
concurrency and is useful for
tasks which can be arranged
in a directed acyclic graph
(without cycles).
14
Attributes/
Patterns
Linear Unordered Graph
Benefits Simple Simple. Inherently
concurrent
Allows for complex task
ordering. Can be
automatically made
concurrent by running
disjoint tasks/flows in
parallel
Drawbacks Serial, no potential for
concurrency
No dependencies allowed.
Ease of tracking and
debugging harder due to
lack of reliable ordering
Complex. Can not support
cycles. Tracking and
debugging harder due to
graph dependency traversal
Patterns
15
• Runs flow (and associated tasks) in a well defined, reliable,
consistent and resumable manner
 Follows well defined state transitions
• Allows for deployers/developers of a service that uses taskflow to
select an engine that suites their setup best
• Backed by varying implementations
 Single-threaded
 Multi-threaded via native or green threads
 Distributed
• Support for other engines:
 Message based(RPC), oslo.messaging
 Celery
Engines
16
• Saves task state/progress/results and flow state
• Allows for reconstruction and resumption of flows and associated
tasks
• Allows the user to view the play-by-play action history of flows
and associated tasks
 Facilitates debugging of taskflow usage and integration
• Backed by varying implementations
 File system, memory, database…
Persistence
17
TaskFlow Demo
• Pre-requisite: Download taskflow library.
• Example: taskflow_linear_example.py
https://gist.github.com/chadlung/eea627fab8b26a869f4d#file-
fetch_example_linear-py
$ pip install taskflow
18
Questions??
19
Reference
• TaskFlow Documentation:
 https://wiki.openstack.org/wiki/TaskFlow
 docs.openstack.org/developer/taskflow
• TaskFlow Demo Example:
https://gist.github.com/chadlung/eea627fab8b26a869f4d#file-
fetch_example_linear-py
20
21

More Related Content

PPT
Taskflow
PPTX
VM Migration and Monitoring Software *SDLAB
PDF
Docker. Does it matter for Java developer ?
PDF
Building Robust Pipelines with Airflow
PDF
LCA13: Android Infrastructure Automation Improvements
PDF
Performance tuning Grails applications
PPTX
OOW13 Exadata and ODI with Parallel
PDF
A Journey to Reactive Function Programming
Taskflow
VM Migration and Monitoring Software *SDLAB
Docker. Does it matter for Java developer ?
Building Robust Pipelines with Airflow
LCA13: Android Infrastructure Automation Improvements
Performance tuning Grails applications
OOW13 Exadata and ODI with Parallel
A Journey to Reactive Function Programming

What's hot (20)

PDF
Introduction to Akka Streams
PDF
LCE13: Linaro Infrastructure Update
PDF
From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...
PPTX
Quick Tour On Zeppelin
PDF
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
PDF
PPTX
Apache Airflow (incubating) NL HUG Meetup 2016-07-19
PPT
Mistral Hong Kong Unconference track
PDF
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
PPTX
What’s expected in Spring 5
PDF
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
PDF
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
PPTX
Building a Self-Service Hadoop Platform at Linkedin with Azkaban
PPTX
Running Airflow Workflows as ETL Processes on Hadoop
PDF
Introduction to Apache Airflow - Data Day Seattle 2016
PDF
Reactive Jersey Client
PDF
Oracle 12c Parallel Execution New Features
PDF
Understanding Reactive Programming
PDF
Apache Airflow
PDF
12 Factor App: Best Practices for JVM Deployment
Introduction to Akka Streams
LCE13: Linaro Infrastructure Update
From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...
Quick Tour On Zeppelin
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow (incubating) NL HUG Meetup 2016-07-19
Mistral Hong Kong Unconference track
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
What’s expected in Spring 5
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Building a Self-Service Hadoop Platform at Linkedin with Azkaban
Running Airflow Workflows as ETL Processes on Hadoop
Introduction to Apache Airflow - Data Day Seattle 2016
Reactive Jersey Client
Oracle 12c Parallel Execution New Features
Understanding Reactive Programming
Apache Airflow
12 Factor App: Best Practices for JVM Deployment
Ad

Viewers also liked (20)

PDF
Openstack taskflow 簡介
PDF
Mistral OpenStack Meetup Feb 5
PDF
Murano: каталог приложений для OpenStack
PDF
Облачные тестовые среды Перфоманс лаб
PDF
Introductionof taskflow
PPTX
OpenStack Murano: управления приложениями в облаке на платформах Linux, Solar...
PDF
Mistral Atlanta design session
PPTX
ServerlessPresentation
PDF
Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build...
PDF
The Serverless Paradigm, OpenWhisk and FIWARE
PDF
Тестовая инфраструктура в облаке
PDF
OpenWhisk Under the Hood -- London Oct 16 2016
PDF
Apache kafka big data track
PDF
[AWSKRUG&JAWS-UG Meetup #1] Serverless Real-Time Analysis
PPTX
Architecture of a Kafka camus infrastructure
PDF
Open stack ocata summit enabling aws lambda-like functionality with openstac...
PDF
How to build an event-driven, polyglot serverless microservices framework on ...
PDF
BEEVA | Introducción a Docker
PDF
AWS Lambda from the Trenches
PDF
Building Serverless APIs on AWS
Openstack taskflow 簡介
Mistral OpenStack Meetup Feb 5
Murano: каталог приложений для OpenStack
Облачные тестовые среды Перфоманс лаб
Introductionof taskflow
OpenStack Murano: управления приложениями в облаке на платформах Linux, Solar...
Mistral Atlanta design session
ServerlessPresentation
Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build...
The Serverless Paradigm, OpenWhisk and FIWARE
Тестовая инфраструктура в облаке
OpenWhisk Under the Hood -- London Oct 16 2016
Apache kafka big data track
[AWSKRUG&JAWS-UG Meetup #1] Serverless Real-Time Analysis
Architecture of a Kafka camus infrastructure
Open stack ocata summit enabling aws lambda-like functionality with openstac...
How to build an event-driven, polyglot serverless microservices framework on ...
BEEVA | Introducción a Docker
AWS Lambda from the Trenches
Building Serverless APIs on AWS
Ad

Similar to Task flow (20)

PPTX
TaskFlow Y! + HP brownbag
PPTX
Flux - An open sourced Workflow orchestrator from Flipkart
PPTX
Cloud computing_Applications and paradigams.pptx
PPTX
Cloud computing_Applications and paradigams.pptx
PPTX
Introduction To Windows Workflow Foundation 4.0
PDF
Scalability truths and serverless architectures
PDF
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
PDF
饿了么工作流介绍
PPT
Windows Workflow Foundation
PDF
Oracle ADF Architecture TV - Design - Task Flow Overview
PPTX
Cassandra Lunch #88: Cadence
PDF
Overview of Scientific Workflows - Why Use Them?
PDF
Airflow presentation
PDF
Online Workflow Management and Performance Analysis with Stampede
PDF
Airflow Intro-1.pdf
PDF
Microservies Vienna - Lost in transactions
PPT
09 workflow
PDF
Apache Flink Internals: Stream & Batch Processing in One System – Apache Flin...
PPT
PDF
FireWorks workflow software
TaskFlow Y! + HP brownbag
Flux - An open sourced Workflow orchestrator from Flipkart
Cloud computing_Applications and paradigams.pptx
Cloud computing_Applications and paradigams.pptx
Introduction To Windows Workflow Foundation 4.0
Scalability truths and serverless architectures
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
饿了么工作流介绍
Windows Workflow Foundation
Oracle ADF Architecture TV - Design - Task Flow Overview
Cassandra Lunch #88: Cadence
Overview of Scientific Workflows - Why Use Them?
Airflow presentation
Online Workflow Management and Performance Analysis with Stampede
Airflow Intro-1.pdf
Microservies Vienna - Lost in transactions
09 workflow
Apache Flink Internals: Stream & Batch Processing in One System – Apache Flin...
FireWorks workflow software

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Approach and Philosophy of On baking technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Reach Out and Touch Someone: Haptics and Empathic Computing
Diabetes mellitus diagnosis method based random forest with bat algorithm
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
MYSQL Presentation for SQL database connectivity
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Approach and Philosophy of On baking technology
Spectral efficient network and resource selection model in 5G networks
NewMind AI Weekly Chronicles - August'25 Week I
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Monthly Chronicles - July 2025
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
“AI and Expert System Decision Support & Business Intelligence Systems”
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
A Presentation on Artificial Intelligence

Task flow

  • 1. TASKFLOW: STATE MANAGEMENT FRAMEWORK Vishal Yadav NEC Technologies India Ltd.
  • 2. Agenda • Motivation for StateManagementics • Expectations • Scenario-1: VM Boot Abort & Resumption • Scenario-2: Transaction Example • Here Comes the TaskFlow • Foundation Concepts • Patterns • Engines • Persistence • TaskFlow Demo • Reference • Questions 2
  • 3. Motivation for StateManagementics • Workflows without state management in place makes these hard to follow, alter and recover • Unreliable workflow and resource state  It is hard to maintain correctness and consistency of distributed systems • RPC boundaries are a constant balance of improving scalability but decreasing consistency • Race conditions occur more often than desired • Manager Driver API boundary • Application and state recovery typically patched on after the fact instead of built-in from the ground up (e.g. periodic tasks) • Capability to service stop an application cleanly without manual (or periodic) clean up is crucial for features like live upgrades 3
  • 4. Expectations • Customers expect stability and consistency  API and service reliability • Resource and/or state corruption (or people to fix manually these problems) costs $$$ • Easy understanding of workflows and states allows the development and alteration of existing workflows • Upgrades (not even live), just upgrades  Just say no to destroy the cloud to upgrade 4
  • 5. 5
  • 6. Scenario-1: VM Boot Abort & Resumption 6
  • 7. Scenario-1: VM Boot Abort & Resumption We can continue the run instance process again from the point where flow failed. 7
  • 8. Scenario-2: Transaction Example Flow resemblance with SQL transaction. START TRANSACTION task1: call API-1 to do op-1 || ROLLBACK task2: task1 finish, call API-2 to do op-2 || ROLLBACK ...perform other tasks... COMMIT 8
  • 9. Here Comes the TaskFlow • A library that makes task execution easy, consistent, and reliable • Provides a framework for executing flow of operations such that those flows can be paused, resumed, revoked at any time • A paradigm and lightweight framework • Community driven & well documented • Library and code available though pypi & github  https://pypi.python.org/pypi/taskflow  https://github.com/openstack/taskflow 9
  • 10. Foundation Concepts • Code structure (your applications frame) • Controlled execution  Who & what manages the overall execution • Persistence (how you know what was executed) • Work recovery  How you recover from failure/partial progress 10
  • 12. • Tasks  Executes and reverts one action  Receives inputs and declares outputs • Flows  Composes tasks (or subflows) into useful structures  Imposes some definition of order also called patterns onto the running of your tasks or subflows Foundation Concepts 12
  • 13. • Jobs  The initial (and any derivative) set of tasks & flows required to fulfil an action  Can be transferred to a worker for completion  Can be re-associated on worker failure (or timeout) for resumption or undo/reversion • Job Board  A system where jobs can be atomically posted, reposted, claimed, marked as completed  Backed by varying implementations  Message queue, zookeeper, database… Foundation Concepts 13
  • 14. Patterns Attributes/ Patterns Linear Unordered Graph Summary Runs a list of tasks/flows, one after the other in a serial manner Runs a set of tasks/flows, in any order Runs a graph composed of tasks/flows in dependency driven ordering Constraints Predecessor tasks outputs must satisfy successive tasks inputs Disallows inter-task dependencies Dependency driven, no cycles. A tasks dependents are guaranteed to be satisfied before the task will run Use-Cases This pattern is useful for structuring tasks/flows that are fairly simple, where a task/flow follows a previous one This pattern is useful for tasks/flow that are fairly simple and are typically embarrassingly parallel This pattern allows for a very high level of potential concurrency and is useful for tasks which can be arranged in a directed acyclic graph (without cycles). 14
  • 15. Attributes/ Patterns Linear Unordered Graph Benefits Simple Simple. Inherently concurrent Allows for complex task ordering. Can be automatically made concurrent by running disjoint tasks/flows in parallel Drawbacks Serial, no potential for concurrency No dependencies allowed. Ease of tracking and debugging harder due to lack of reliable ordering Complex. Can not support cycles. Tracking and debugging harder due to graph dependency traversal Patterns 15
  • 16. • Runs flow (and associated tasks) in a well defined, reliable, consistent and resumable manner  Follows well defined state transitions • Allows for deployers/developers of a service that uses taskflow to select an engine that suites their setup best • Backed by varying implementations  Single-threaded  Multi-threaded via native or green threads  Distributed • Support for other engines:  Message based(RPC), oslo.messaging  Celery Engines 16
  • 17. • Saves task state/progress/results and flow state • Allows for reconstruction and resumption of flows and associated tasks • Allows the user to view the play-by-play action history of flows and associated tasks  Facilitates debugging of taskflow usage and integration • Backed by varying implementations  File system, memory, database… Persistence 17
  • 18. TaskFlow Demo • Pre-requisite: Download taskflow library. • Example: taskflow_linear_example.py https://gist.github.com/chadlung/eea627fab8b26a869f4d#file- fetch_example_linear-py $ pip install taskflow 18
  • 20. Reference • TaskFlow Documentation:  https://wiki.openstack.org/wiki/TaskFlow  docs.openstack.org/developer/taskflow • TaskFlow Demo Example: https://gist.github.com/chadlung/eea627fab8b26a869f4d#file- fetch_example_linear-py 20
  • 21. 21