SlideShare a Scribd company logo
TaskFlow
and

OpenStack

Joshua Harlow
Yahoo!
The problem statement
‣

Statemanagementachitis
‣

Workflows today without state management in place
makes workflows hard to follow, alter and recover

‣

Unreliable workflow and resource state
‣

Distributed system correctness is a hard problem

‣

RPC boundaries are a constant balance of improving
scalability but decreasing consistency

‣

Race conditions occur more often than desired
Continued…
‣

Manager  Driver API boundary

‣

Organic growth of features and patches

‣

Application and state recovery typically patched
on after the fact instead of built-in from the
ground up (ex, periodic tasks)

‣

Capabilities to `service stop` an application cleanly
without manual (or periodic) clean up is crucial for
features like live upgrades
Why this matters???
‣

Customers expect stability and consistency
‣

API and service reliability

‣

Resource and/or state corruption (or people to fix
manually these problems) costs $$$

‣

Easily understood workflows and states allows the
development and alteration of existing workflows

‣

Upgrades (not even live), just upgrades
‣

Just say no to destroying the cloud to upgrade
‣

Pride: we can build a system that does
‣

We all want openstack cloud software to be very reliable
and if and when it does fail it should not cause
unrecoverable corruption

‣

Be the exception to the norm! 
Taskflow
Introducing: TaskFlow
A library for OpenStack that makes
task execution easy, consistent, and
reliable.
What it is
‣

A stackforge & pypi library
‣

‣

Developed by and for the community
‣

‣

Yahoo!, Grid Dynamics, Rackspace, AT&T, NTT …

Community driven & well documented
‣

‣

https://pypi.python.org/pypi/taskflow

https://wiki.openstack.org/wiki/TaskFlow

A paradigm and lightweight framework
What it is not
‣

A webservice with a REST API
‣

‣

See sessions about mistral

Solution to all the problems
‣
‣

‣

Does not solve world peace
Will not deliver your rainbow ponies

Still requires understanding and careful coding
Foundational 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
Taskflow
‣

Tasks
‣
‣

‣

Executes and reverts one action
Receives inputs and declares outputs

Flows
‣

Composes tasks (or subflows) into useful structures

‣

Imposes some definition of order onto the running of
your tasks or subflows
‣

Linear order, unordered, topological order…
Engines
‣

Runs your 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 (WIP)
Persistence
‣

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…
‣

Jobs
‣

The initial (and any derivative) set of tasks & flows
required to fulfill 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…
What exists
‣

Release 0.1
‣

Tagged & pypi uploaded on October 24, 2013

‣

Contains foundational concepts
‣

‣

Tasks, flows, resumption, persistence, local engines

Excellent documentation!
‣

Best practices, inputs & outputs, examples,
state transitions …

‣

Design – engines, persistence, primitives …
What’s missing
‣

Distributed engine

‣

Lock service
‣

Ensure your resources are not simultaneously trampled

‣

Zookeeper storage layer

‣

Job and job board reference implementation
‣

Currently being built out
Examples
‣

Miniature nova
‣

‣

Minature cinder
‣

‣

Try to control-c and then restart

Parallel volume creation
‣

‣

Try to control-c and then restart

Runs in parallel!

More …
Havana development
‣

Cinder
‣
‣

‣

Create volume workflow uses taskflow!!
Continued integration: sessions [1]

Billingstack
‣

‣

Being used in payment methods

TaskFlow (itself)
‣

Only started in early May of 2013
Planned integration
‣

Nova
‣
‣

‣

Under discussion
Sessions [1, 2]

Glance
‣
‣

‣

Under discussion
Sessions [1]

Trove, heat, quantum, rally, your project (?)
Mistral (recently announced!)
‣

Mistral service provides a convenient API based
on simple generic DSL for executing any task
flows
‣

‣

Use cases
‣

‣

Targeted at providing various scheduling and
orchestration capabilities for generic computational
tasks

Cloud cron, deployment & configuration management,
analytics & reporting…

Implements the convection proposal
Get involved!
‣

Developers wanted!
‣

Want to help taskflow get integrated quicker?
‣

‣

‣

More reliable, consistent openstack == better!

Want to help build taskflow 0.2+

Features wanted!
‣

Have a neat feature to implement?

‣

Have a neat use-case that currently is not satisfied?
‣

Weekly meetings
‣

http://wiki.openstack.org/wiki/Meetings#State_manage
ment_team_meeting

‣

Launchpad: http://launchpad.net/taskflow

‣

BPs: http://blueprints.launchpad.net/taskflow

‣

Code: http://github.com/stackforge/taskflow

‣

Wiki/docs: http://wiki.openstack.org/TaskFlow

‣

IRC at #openstack-state-management
?? Questions ??

More Related Content

PPTX
Nova states summit
PDF
Task flow
PDF
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
PDF
A simple workflow system using state machines
PDF
Performance tuning Grails applications
PDF
Time Machine
PDF
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
PDF
Understanding Reactive Programming
Nova states summit
Task flow
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
A simple workflow system using state machines
Performance tuning Grails applications
Time Machine
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
Understanding Reactive Programming

What's hot (20)

PDF
Advanced React
PDF
Cluster schedulerの紹介
PPT
UC4 SCHEDULING
PPTX
Flyway: The agile database migration framework for Java
PDF
Double Sync Replication
PPTX
Reactive programming intro
PPT
SAP ABAP Lock concept and enqueue
PDF
Abap slide lockenqueuedataclustersauthchecks
PDF
Introduction to Akka Streams
PPTX
Quick Tour On Zeppelin
PDF
Order Processing at Scale: Zalando at Camunda Community Day
PPTX
Taking Akka Streams & Akka Http to Large Scale Production Applications
PPTX
Introduction To Windows Workflow Foundation 4.0
PDF
Database migrations with Flyway and Liquibase
PPTX
Clontab webpage
PDF
SAP Rolling Kernel Switch RKS
PDF
Virtual Flink Forward 2020: Machine learning with Flink in Weibo - Yu Qian
PPTX
Capacity Management/Provisioning (Cloud's full, Can't build here)
PPT
SynapseIndia drupal presentation on drupal info
Advanced React
Cluster schedulerの紹介
UC4 SCHEDULING
Flyway: The agile database migration framework for Java
Double Sync Replication
Reactive programming intro
SAP ABAP Lock concept and enqueue
Abap slide lockenqueuedataclustersauthchecks
Introduction to Akka Streams
Quick Tour On Zeppelin
Order Processing at Scale: Zalando at Camunda Community Day
Taking Akka Streams & Akka Http to Large Scale Production Applications
Introduction To Windows Workflow Foundation 4.0
Database migrations with Flyway and Liquibase
Clontab webpage
SAP Rolling Kernel Switch RKS
Virtual Flink Forward 2020: Machine learning with Flink in Weibo - Yu Qian
Capacity Management/Provisioning (Cloud's full, Can't build here)
SynapseIndia drupal presentation on drupal info
Ad

Similar to Taskflow (20)

PDF
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
PDF
Varnishtest
PPTX
WinOps Conf 2016 - Michael Greene - Release Pipelines
PDF
Create a One Click Migration (OCM) process to Automate Repeatable Infrastruct...
PDF
Lambda Architectures in Practice
PPTX
Kovalenko Volodymyr "Distributed Systems: Theory and Practice"
PDF
Thinking DevOps in the era of the Cloud - Demi Ben-Ari
PDF
towards ruote 2.0
PDF
towards ruote 2.0
PPTX
Inventory management using temporal workflow engine
PDF
Automating EVA Workflows with AWS Step Functions
PDF
Continuous Delivery: How RightScale Releases Weekly
PPTX
Web Performance & Latest in React
PDF
Mad scalability: Scaling when you are not Google
PPT
DBMS MODULE-6.ppt database management system transaction
PPTX
Cassandra Lunch #88: Cadence
PDF
Backroll: Production Grade KVM Backup Solution Integrated in CloudStack
PDF
Orchestrating complex workflows with aws step functions
PDF
GitOps, Driving NGN Operations Teams 211127 #kcdgt 2021
PDF
Akka (1)
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
Varnishtest
WinOps Conf 2016 - Michael Greene - Release Pipelines
Create a One Click Migration (OCM) process to Automate Repeatable Infrastruct...
Lambda Architectures in Practice
Kovalenko Volodymyr "Distributed Systems: Theory and Practice"
Thinking DevOps in the era of the Cloud - Demi Ben-Ari
towards ruote 2.0
towards ruote 2.0
Inventory management using temporal workflow engine
Automating EVA Workflows with AWS Step Functions
Continuous Delivery: How RightScale Releases Weekly
Web Performance & Latest in React
Mad scalability: Scaling when you are not Google
DBMS MODULE-6.ppt database management system transaction
Cassandra Lunch #88: Cadence
Backroll: Production Grade KVM Backup Solution Integrated in CloudStack
Orchestrating complex workflows with aws step functions
GitOps, Driving NGN Operations Teams 211127 #kcdgt 2021
Akka (1)
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PPTX
Cloud computing and distributed systems.
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KodekX | Application Modernization Development
Cloud computing and distributed systems.
NewMind AI Weekly Chronicles - August'25 Week I
The Rise and Fall of 3GPP – Time for a Sabbatical?
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Building Integrated photovoltaic BIPV_UPV.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Unlocking AI with Model Context Protocol (MCP)
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

Taskflow

  • 2. The problem statement ‣ Statemanagementachitis ‣ Workflows today without state management in place makes workflows hard to follow, alter and recover ‣ Unreliable workflow and resource state ‣ Distributed system correctness is a hard problem ‣ RPC boundaries are a constant balance of improving scalability but decreasing consistency ‣ Race conditions occur more often than desired
  • 3. Continued… ‣ Manager  Driver API boundary ‣ Organic growth of features and patches ‣ Application and state recovery typically patched on after the fact instead of built-in from the ground up (ex, periodic tasks) ‣ Capabilities to `service stop` an application cleanly without manual (or periodic) clean up is crucial for features like live upgrades
  • 4. Why this matters??? ‣ Customers expect stability and consistency ‣ API and service reliability ‣ Resource and/or state corruption (or people to fix manually these problems) costs $$$ ‣ Easily understood workflows and states allows the development and alteration of existing workflows ‣ Upgrades (not even live), just upgrades ‣ Just say no to destroying the cloud to upgrade
  • 5. ‣ Pride: we can build a system that does ‣ We all want openstack cloud software to be very reliable and if and when it does fail it should not cause unrecoverable corruption ‣ Be the exception to the norm! 
  • 7. Introducing: TaskFlow A library for OpenStack that makes task execution easy, consistent, and reliable.
  • 8. What it is ‣ A stackforge & pypi library ‣ ‣ Developed by and for the community ‣ ‣ Yahoo!, Grid Dynamics, Rackspace, AT&T, NTT … Community driven & well documented ‣ ‣ https://pypi.python.org/pypi/taskflow https://wiki.openstack.org/wiki/TaskFlow A paradigm and lightweight framework
  • 9. What it is not ‣ A webservice with a REST API ‣ ‣ See sessions about mistral Solution to all the problems ‣ ‣ ‣ Does not solve world peace Will not deliver your rainbow ponies Still requires understanding and careful coding
  • 10. Foundational 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
  • 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 onto the running of your tasks or subflows ‣ Linear order, unordered, topological order…
  • 13. Engines ‣ Runs your 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 (WIP)
  • 14. Persistence ‣ 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…
  • 15. ‣ Jobs ‣ The initial (and any derivative) set of tasks & flows required to fulfill 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…
  • 16. What exists ‣ Release 0.1 ‣ Tagged & pypi uploaded on October 24, 2013 ‣ Contains foundational concepts ‣ ‣ Tasks, flows, resumption, persistence, local engines Excellent documentation! ‣ Best practices, inputs & outputs, examples, state transitions … ‣ Design – engines, persistence, primitives …
  • 17. What’s missing ‣ Distributed engine ‣ Lock service ‣ Ensure your resources are not simultaneously trampled ‣ Zookeeper storage layer ‣ Job and job board reference implementation ‣ Currently being built out
  • 18. Examples ‣ Miniature nova ‣ ‣ Minature cinder ‣ ‣ Try to control-c and then restart Parallel volume creation ‣ ‣ Try to control-c and then restart Runs in parallel! More …
  • 19. Havana development ‣ Cinder ‣ ‣ ‣ Create volume workflow uses taskflow!! Continued integration: sessions [1] Billingstack ‣ ‣ Being used in payment methods TaskFlow (itself) ‣ Only started in early May of 2013
  • 20. Planned integration ‣ Nova ‣ ‣ ‣ Under discussion Sessions [1, 2] Glance ‣ ‣ ‣ Under discussion Sessions [1] Trove, heat, quantum, rally, your project (?)
  • 21. Mistral (recently announced!) ‣ Mistral service provides a convenient API based on simple generic DSL for executing any task flows ‣ ‣ Use cases ‣ ‣ Targeted at providing various scheduling and orchestration capabilities for generic computational tasks Cloud cron, deployment & configuration management, analytics & reporting… Implements the convection proposal
  • 22. Get involved! ‣ Developers wanted! ‣ Want to help taskflow get integrated quicker? ‣ ‣ ‣ More reliable, consistent openstack == better! Want to help build taskflow 0.2+ Features wanted! ‣ Have a neat feature to implement? ‣ Have a neat use-case that currently is not satisfied?
  • 23. ‣ Weekly meetings ‣ http://wiki.openstack.org/wiki/Meetings#State_manage ment_team_meeting ‣ Launchpad: http://launchpad.net/taskflow ‣ BPs: http://blueprints.launchpad.net/taskflow ‣ Code: http://github.com/stackforge/taskflow ‣ Wiki/docs: http://wiki.openstack.org/TaskFlow ‣ IRC at #openstack-state-management