SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Introduction to Akka Streams
Introduction to Akka StreamsIntroduction to Akka Streams
Introduction to Akka StreamsKnoldus Inc.
 
LCE13: Linaro Infrastructure Update
LCE13: Linaro Infrastructure UpdateLCE13: Linaro Infrastructure Update
LCE13: Linaro Infrastructure UpdateLinaro
 
From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...
From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...
From AWS Data Pipeline to Airflow - managing data pipelines in Nielsen Market...Itai Yaffe
 
Quick Tour On Zeppelin
Quick Tour On ZeppelinQuick Tour On Zeppelin
Quick Tour On ZeppelinKnoldus Inc.
 
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Kaxil Naik
 
Apache Airflow (incubating) NL HUG Meetup 2016-07-19
Apache Airflow (incubating) NL HUG Meetup 2016-07-19Apache Airflow (incubating) NL HUG Meetup 2016-07-19
Apache Airflow (incubating) NL HUG Meetup 2016-07-19Bolke de Bruin
 
Mistral Hong Kong Unconference track
Mistral Hong Kong Unconference trackMistral Hong Kong Unconference track
Mistral Hong Kong Unconference trackRenat Akhmerov
 
GR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
GR8Conf 2011: Tuning Grails Applications by Peter LedbrookGR8Conf 2011: Tuning Grails Applications by Peter Ledbrook
GR8Conf 2011: Tuning Grails Applications by Peter LedbrookGR8Conf
 
What’s expected in Spring 5
What’s expected in Spring 5What’s expected in Spring 5
What’s expected in Spring 5Gal Marder
 
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)Linaro
 
Building a Self-Service Hadoop Platform at Linkedin with Azkaban
Building a Self-Service Hadoop Platform at Linkedin with AzkabanBuilding a Self-Service Hadoop Platform at Linkedin with Azkaban
Building a Self-Service Hadoop Platform at Linkedin with AzkabanDataWorks Summit
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoopclairvoyantllc
 
Introduction to Apache Airflow - Data Day Seattle 2016
Introduction to Apache Airflow - Data Day Seattle 2016Introduction to Apache Airflow - Data Day Seattle 2016
Introduction to Apache Airflow - Data Day Seattle 2016Sid Anand
 
Reactive Jersey Client
Reactive Jersey ClientReactive Jersey Client
Reactive Jersey ClientMichal Gajdos
 
Oracle 12c Parallel Execution New Features
Oracle 12c Parallel Execution New FeaturesOracle 12c Parallel Execution New Features
Oracle 12c Parallel Execution New FeaturesRandolf Geist
 
Understanding Reactive Programming
Understanding Reactive ProgrammingUnderstanding Reactive Programming
Understanding Reactive ProgrammingAndres Almiray
 
12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM DeploymentJoe Kutner
 

Tendances (20)

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

En vedette

Openstack taskflow 簡介
Openstack taskflow 簡介Openstack taskflow 簡介
Openstack taskflow 簡介kao kuo-tung
 
Mistral OpenStack Meetup Feb 5
Mistral OpenStack Meetup Feb 5Mistral OpenStack Meetup Feb 5
Mistral OpenStack Meetup Feb 5Renat Akhmerov
 
Murano: каталог приложений для OpenStack
Murano: каталог приложений для OpenStackMurano: каталог приложений для OpenStack
Murano: каталог приложений для OpenStackOpenStackRussia
 
Облачные тестовые среды Перфоманс лаб
Облачные тестовые среды Перфоманс лабОблачные тестовые среды Перфоманс лаб
Облачные тестовые среды Перфоманс лабГлобал Позитив
 
Introductionof taskflow
Introductionof taskflowIntroductionof taskflow
Introductionof taskflowharubelle
 
OpenStack Murano: управления приложениями в облаке на платформах Linux, Solar...
OpenStack Murano: управления приложениями в облаке на платформах Linux, Solar...OpenStack Murano: управления приложениями в облаке на платформах Linux, Solar...
OpenStack Murano: управления приложениями в облаке на платформах Linux, Solar...Mirantis IT Russia
 
Mistral Atlanta design session
Mistral Atlanta design sessionMistral Atlanta design session
Mistral Atlanta design sessionRenat Akhmerov
 
ServerlessPresentation
ServerlessPresentationServerlessPresentation
ServerlessPresentationRohit Kumar
 
Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build...
Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build...Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build...
Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build...Joe Sepi
 
The Serverless Paradigm, OpenWhisk and FIWARE
The Serverless Paradigm, OpenWhisk and FIWAREThe Serverless Paradigm, OpenWhisk and FIWARE
The Serverless Paradigm, OpenWhisk and FIWAREAlex Glikson
 
Тестовая инфраструктура в облаке
Тестовая инфраструктура в облакеТестовая инфраструктура в облаке
Тестовая инфраструктура в облакеSQALab
 
OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016Stephen Fink
 
Architecture of a Kafka camus infrastructure
Architecture of a Kafka camus infrastructureArchitecture of a Kafka camus infrastructure
Architecture of a Kafka camus infrastructuremattlieber
 
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...Shaun Murakami
 
How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...Animesh Singh
 
BEEVA | Introducción a Docker
BEEVA | Introducción a DockerBEEVA | Introducción a Docker
BEEVA | Introducción a DockerBEEVA_es
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the TrenchesYan Cui
 

En vedette (20)

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

Similaire à Task flow

Cqrs and Event Sourcing Intro For Developers
Cqrs and Event Sourcing Intro For DevelopersCqrs and Event Sourcing Intro For Developers
Cqrs and Event Sourcing Intro For Developerswojtek_s
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Derek Ashmore
 
Software development life cycle (SDLC)
Software development life cycle (SDLC)Software development life cycle (SDLC)
Software development life cycle (SDLC)Simran Kaur
 
PayPal Resilient System Design
PayPal Resilient System DesignPayPal Resilient System Design
PayPal Resilient System DesignPradeep Ballal
 
ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2Erik Noren
 
Distributed Performance testing by funkload
Distributed Performance testing by funkloadDistributed Performance testing by funkload
Distributed Performance testing by funkloadAkhil Singh
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”EPAM Systems
 
Hierarchical Software Architecture.pptx
Hierarchical Software Architecture.pptxHierarchical Software Architecture.pptx
Hierarchical Software Architecture.pptxsaifSaif410805
 
Enhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxEnhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxRohit Radhakrishnan
 
Openstack upgrade without_down_time_20141103r1
Openstack upgrade without_down_time_20141103r1Openstack upgrade without_down_time_20141103r1
Openstack upgrade without_down_time_20141103r1Yankai Liu
 
Software Process Model.ppt
Software Process Model.pptSoftware Process Model.ppt
Software Process Model.pptSasiR18
 
Software Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureSoftware Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureTapio Rautonen
 
Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Uri Cohen
 

Similaire à Task flow (20)

Cqrs and Event Sourcing Intro For Developers
Cqrs and Event Sourcing Intro For DevelopersCqrs and Event Sourcing Intro For Developers
Cqrs and Event Sourcing Intro For Developers
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15
 
Software development life cycle (SDLC)
Software development life cycle (SDLC)Software development life cycle (SDLC)
Software development life cycle (SDLC)
 
PayPal Resilient System Design
PayPal Resilient System DesignPayPal Resilient System Design
PayPal Resilient System Design
 
ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2
 
Distributed Performance testing by funkload
Distributed Performance testing by funkloadDistributed Performance testing by funkload
Distributed Performance testing by funkload
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
 
Asp.net,mvc
Asp.net,mvcAsp.net,mvc
Asp.net,mvc
 
Hierarchical Software Architecture.pptx
Hierarchical Software Architecture.pptxHierarchical Software Architecture.pptx
Hierarchical Software Architecture.pptx
 
Enhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxEnhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptx
 
Grails Services
Grails ServicesGrails Services
Grails Services
 
Openstack upgrade without_down_time_20141103r1
Openstack upgrade without_down_time_20141103r1Openstack upgrade without_down_time_20141103r1
Openstack upgrade without_down_time_20141103r1
 
Software Process Model.ppt
Software Process Model.pptSoftware Process Model.ppt
Software Process Model.ppt
 
Sdlc models
Sdlc modelsSdlc models
Sdlc models
 
Software Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureSoftware Architecture for Cloud Infrastructure
Software Architecture for Cloud Infrastructure
 
MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014
 
Ioug oow12 em12c
Ioug oow12 em12cIoug oow12 em12c
Ioug oow12 em12c
 
Building Aneka clouds.ppt
Building Aneka clouds.pptBuilding Aneka clouds.ppt
Building Aneka clouds.ppt
 

Dernier

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Dernier (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

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