SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
AWS
Simple WorkFlow

    by Nathan McCourtney
        May 2nd, 2012
          @beaknit
"Workflow"?

A workflow management system is a computer system that
manages and defines a series of tasks within an
organization to produce a final outcome or outcomes.

At each stage in the workflow, one individual or group is
responsible for a specific task. Once the task is complete,
the workflow software ensures that the individuals
responsible for the next task are notified and receive the
data they need to execute their stage of the process


http://en.wikipedia.org/wiki/Workflow
Amazon's Workflow Model

● A Workflow is the automation of a business process.
● A Domain is a collection of related Workflows.
● Actions are the individual tasks undertaken to carry out
  a Workflow.
● Activity Workers are the pieces of code that actually
  implement the tasks. Each kind of Worker has its own
  Activity Type.
● A Decider implements a Workflow's coordination logic.
- From Jeff Barr's post
Workers & Deciders = Actors
From wikipedia:

In computer science, the Actor model is a mathematical
model of concurrent computation that treats "actors" as the
universal primitives of concurrent digital computation: in
response to a message that it receives, an actor can make
local decisions, create more actors, send more messages,
and determine how to respond to the next message
received.
Essentially, SWF is a framework for
 abstracting out actors and passing
messages between them via queues
Act!


                                       Work
                                       Queue



      Actor
                            Messages


1. Fetches its work
2. Drops off its results
                                       Result
                                       Queue
AWS Message Passing

 ●   HTTPS
 ●   Long-poll interval of 60 seconds
 ●   Message format is JSON:

           {"decisionType": "ScheduleActivityTask",
            "scheduleActivityTaskDecisionAttributes":
             {"activityType":
               {"name": "activityVerify",
                "version": "1.0"},
              "activityId": "verification-27",
              "control": "digital music",
              "input": "5634-0056-4367-0923,12/12,437",
              "scheduleToCloseTimeout": "900",
              "taskList":
               {"name": "specialTaskList"},
              "scheduleToStartTimeout": "300",
              "startToCloseTimeout": "600",
              "heartbeatTimeout": "120"}
           }

 ●   One decision queue per Workflow
 ●   Many activity queues per Workflow
Decider to SWF Comms

                                         SWF

      Decider




                                  DTL              ATL




 1.   Decider polls Decision Task List (DTL) for new
      decision tasks
 2.   Decision task returned with entire workflow
      execution history to provider context for
      decisions
 3.   Decider executes conditional logic and returns
      an activity task back to SimpleWorkFlow which
      then deposits in the Activity Task List (ATL)

Note: Multiple deciders can process the same DTL
From AWS Ruby SDK

# poll for decision tasks from 'my-task-list'
  domain.decision_tasks.poll( 'my-task-list' ) do |task|

    # investigate new events and make decisions
    task.new_events.each do |event|
      case event.event_type
      when 'WorkflowExecutionStarted'
        task.schedule_activity_task 'do-something' , :input => 'abc xyz'
      when 'ActivityTaskCompleted'
        task.complete_workflow_execution :result => event.attributes.result
      end
    end

  end # decision task is completed here
Worker to SWF Comms

                                       SWF

   Worker




                                ATL               DTL




 1.   Worker polls ATL for appropriate tasks - different
      workers can consume different tasks
 2.   Task completion returned to SWF which makes
      the result available to the Decider via the DTL

 Note: Multiple workers can process the same ATL
From AWS Ruby SDK
# poll 'my-task-list' for activities
  domain.activity_tasks.poll( 'my-task-list' ) do |activity_task|

    case activity_task.activity_type.name
    when 'do-something'
      # ...
    else
      activity_task.fail! :reason => 'unknown activity task type'
    end

  end
AWS example order-processing SWF




 Source: SWF Dev Guide
Practical Exercise


Nightly restore of a database to QA nodes combined with automated release
migration.
Examples
Further Reading


●   Official Announcement
●   Rightscale's blog on their use
●   Dev Guide - Basic Concepts
●   AWS Ruby SDK

Contenu connexe

Tendances

Infrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsInfrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsMykyta Protsenko
 
AWS IoT 핸즈온 워크샵 - 실습 4. Device Failure 상황 처리하기 (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 4. Device Failure 상황 처리하기 (김무현 솔루션즈 아키텍트)AWS IoT 핸즈온 워크샵 - 실습 4. Device Failure 상황 처리하기 (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 4. Device Failure 상황 처리하기 (김무현 솔루션즈 아키텍트)Amazon Web Services Korea
 
Designing a Scalable Data Platform
Designing a Scalable Data PlatformDesigning a Scalable Data Platform
Designing a Scalable Data PlatformAlex Silva
 
Altitude SF 2017: Nomad and next-gen application architectures
Altitude SF 2017: Nomad and next-gen application architecturesAltitude SF 2017: Nomad and next-gen application architectures
Altitude SF 2017: Nomad and next-gen application architecturesFastly
 
How Yelp uses Mesos to Power its SOA Infrastructure
How Yelp uses Mesos to Power its SOA InfrastructureHow Yelp uses Mesos to Power its SOA Infrastructure
How Yelp uses Mesos to Power its SOA InfrastructureEvanKrall
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS BackendLaurent Cerveau
 
NetflixOSS season 2 episode 2 - Reactive / Async
NetflixOSS   season 2 episode 2 - Reactive / AsyncNetflixOSS   season 2 episode 2 - Reactive / Async
NetflixOSS season 2 episode 2 - Reactive / AsyncRuslan Meshenberg
 
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...Codemotion
 
React Lifecycle and Reconciliation
React Lifecycle and ReconciliationReact Lifecycle and Reconciliation
React Lifecycle and ReconciliationZhihao Li
 
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - Code E...
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - Code E...Cracking JWT tokens: a tale of magic, Node.js and parallel computing - Code E...
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - Code E...Luciano Mammino
 
Mistral OpenStack Meetup Feb 5
Mistral OpenStack Meetup Feb 5Mistral OpenStack Meetup Feb 5
Mistral OpenStack Meetup Feb 5Renat Akhmerov
 
10 minutes fun with Cloud API comparison
10 minutes fun with Cloud API comparison10 minutes fun with Cloud API comparison
10 minutes fun with Cloud API comparisonLaurent Cerveau
 
Batch Processing with Amazon EC2 Container Service
Batch Processing with Amazon EC2 Container ServiceBatch Processing with Amazon EC2 Container Service
Batch Processing with Amazon EC2 Container ServiceAmazon Web Services
 
Designing a reactive data platform: Challenges, patterns, and anti-patterns
Designing a reactive data platform: Challenges, patterns, and anti-patterns Designing a reactive data platform: Challenges, patterns, and anti-patterns
Designing a reactive data platform: Challenges, patterns, and anti-patterns Alex Silva
 
Dropwizard Internals
Dropwizard InternalsDropwizard Internals
Dropwizard Internalscarlo-rtr
 
Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?Andrzej Ludwikowski
 
Altitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeAltitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeFastly
 
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Codemotion
 

Tendances (19)

Infrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsInfrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and Ops
 
AWS IoT 핸즈온 워크샵 - 실습 4. Device Failure 상황 처리하기 (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 4. Device Failure 상황 처리하기 (김무현 솔루션즈 아키텍트)AWS IoT 핸즈온 워크샵 - 실습 4. Device Failure 상황 처리하기 (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 4. Device Failure 상황 처리하기 (김무현 솔루션즈 아키텍트)
 
Designing a Scalable Data Platform
Designing a Scalable Data PlatformDesigning a Scalable Data Platform
Designing a Scalable Data Platform
 
React Internals
React InternalsReact Internals
React Internals
 
Altitude SF 2017: Nomad and next-gen application architectures
Altitude SF 2017: Nomad and next-gen application architecturesAltitude SF 2017: Nomad and next-gen application architectures
Altitude SF 2017: Nomad and next-gen application architectures
 
How Yelp uses Mesos to Power its SOA Infrastructure
How Yelp uses Mesos to Power its SOA InfrastructureHow Yelp uses Mesos to Power its SOA Infrastructure
How Yelp uses Mesos to Power its SOA Infrastructure
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS Backend
 
NetflixOSS season 2 episode 2 - Reactive / Async
NetflixOSS   season 2 episode 2 - Reactive / AsyncNetflixOSS   season 2 episode 2 - Reactive / Async
NetflixOSS season 2 episode 2 - Reactive / Async
 
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
 
React Lifecycle and Reconciliation
React Lifecycle and ReconciliationReact Lifecycle and Reconciliation
React Lifecycle and Reconciliation
 
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - Code E...
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - Code E...Cracking JWT tokens: a tale of magic, Node.js and parallel computing - Code E...
Cracking JWT tokens: a tale of magic, Node.js and parallel computing - Code E...
 
Mistral OpenStack Meetup Feb 5
Mistral OpenStack Meetup Feb 5Mistral OpenStack Meetup Feb 5
Mistral OpenStack Meetup Feb 5
 
10 minutes fun with Cloud API comparison
10 minutes fun with Cloud API comparison10 minutes fun with Cloud API comparison
10 minutes fun with Cloud API comparison
 
Batch Processing with Amazon EC2 Container Service
Batch Processing with Amazon EC2 Container ServiceBatch Processing with Amazon EC2 Container Service
Batch Processing with Amazon EC2 Container Service
 
Designing a reactive data platform: Challenges, patterns, and anti-patterns
Designing a reactive data platform: Challenges, patterns, and anti-patterns Designing a reactive data platform: Challenges, patterns, and anti-patterns
Designing a reactive data platform: Challenges, patterns, and anti-patterns
 
Dropwizard Internals
Dropwizard InternalsDropwizard Internals
Dropwizard Internals
 
Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?
 
Altitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeAltitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edge
 
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
 

En vedette

Shenzhen longreen products brochure
Shenzhen longreen  products brochureShenzhen longreen  products brochure
Shenzhen longreen products brochureAnna Cao
 
LumaNext ppt.11.16.15
LumaNext ppt.11.16.15LumaNext ppt.11.16.15
LumaNext ppt.11.16.15Bob Radcliffe
 
Proactively Managing Your Data Center Infrastructure
Proactively Managing Your Data Center InfrastructureProactively Managing Your Data Center Infrastructure
Proactively Managing Your Data Center Infrastructurekimotte
 
Leading the Way in Intelligent Data Center Infrastructure
Leading the Way in Intelligent Data Center InfrastructureLeading the Way in Intelligent Data Center Infrastructure
Leading the Way in Intelligent Data Center InfrastructureHuawei Enterprise Hong Kong
 
QFabric: Enabling The New Data Center
QFabric: Enabling The New Data CenterQFabric: Enabling The New Data Center
QFabric: Enabling The New Data CenterJuniper Networks
 
Architecting data center networks in the era of big data and cloud
Architecting data center networks in the era of big data and cloudArchitecting data center networks in the era of big data and cloud
Architecting data center networks in the era of big data and cloudbradhedlund
 
Managing human resources at data centers 1.0
Managing human resources at data centers 1.0Managing human resources at data centers 1.0
Managing human resources at data centers 1.0aqel aqel
 
Huawei presentation at TADHack
Huawei presentation at TADHackHuawei presentation at TADHack
Huawei presentation at TADHackAlan Quayle
 
Fabric Arch Compet
Fabric Arch CompetFabric Arch Compet
Fabric Arch CompetHe Hariyadi
 
Data Center Trends 2014
Data Center Trends 2014Data Center Trends 2014
Data Center Trends 2014Belden Inc
 
Data Center Network Topologies
Data Center Network TopologiesData Center Network Topologies
Data Center Network Topologiesrjain51
 
Arista Networks - Building the Next Generation Workplace and Data Center Usin...
Arista Networks - Building the Next Generation Workplace and Data Center Usin...Arista Networks - Building the Next Generation Workplace and Data Center Usin...
Arista Networks - Building the Next Generation Workplace and Data Center Usin...Aruba, a Hewlett Packard Enterprise company
 
AWS DC Symposium Keynote: Teresa Carlson
AWS DC Symposium Keynote: Teresa CarlsonAWS DC Symposium Keynote: Teresa Carlson
AWS DC Symposium Keynote: Teresa CarlsonAmazon Web Services
 
Tia 942 Data Center Standards
Tia 942 Data Center StandardsTia 942 Data Center Standards
Tia 942 Data Center StandardsSri Chalasani
 
Data center Building & General Specification
Data center Building & General Specification Data center Building & General Specification
Data center Building & General Specification Ali Mirfallah
 

En vedette (16)

Shenzhen longreen products brochure
Shenzhen longreen  products brochureShenzhen longreen  products brochure
Shenzhen longreen products brochure
 
LumaNext ppt.11.16.15
LumaNext ppt.11.16.15LumaNext ppt.11.16.15
LumaNext ppt.11.16.15
 
OCP-SPIRIT-Final-v5
OCP-SPIRIT-Final-v5OCP-SPIRIT-Final-v5
OCP-SPIRIT-Final-v5
 
Proactively Managing Your Data Center Infrastructure
Proactively Managing Your Data Center InfrastructureProactively Managing Your Data Center Infrastructure
Proactively Managing Your Data Center Infrastructure
 
Leading the Way in Intelligent Data Center Infrastructure
Leading the Way in Intelligent Data Center InfrastructureLeading the Way in Intelligent Data Center Infrastructure
Leading the Way in Intelligent Data Center Infrastructure
 
QFabric: Enabling The New Data Center
QFabric: Enabling The New Data CenterQFabric: Enabling The New Data Center
QFabric: Enabling The New Data Center
 
Architecting data center networks in the era of big data and cloud
Architecting data center networks in the era of big data and cloudArchitecting data center networks in the era of big data and cloud
Architecting data center networks in the era of big data and cloud
 
Managing human resources at data centers 1.0
Managing human resources at data centers 1.0Managing human resources at data centers 1.0
Managing human resources at data centers 1.0
 
Huawei presentation at TADHack
Huawei presentation at TADHackHuawei presentation at TADHack
Huawei presentation at TADHack
 
Fabric Arch Compet
Fabric Arch CompetFabric Arch Compet
Fabric Arch Compet
 
Data Center Trends 2014
Data Center Trends 2014Data Center Trends 2014
Data Center Trends 2014
 
Data Center Network Topologies
Data Center Network TopologiesData Center Network Topologies
Data Center Network Topologies
 
Arista Networks - Building the Next Generation Workplace and Data Center Usin...
Arista Networks - Building the Next Generation Workplace and Data Center Usin...Arista Networks - Building the Next Generation Workplace and Data Center Usin...
Arista Networks - Building the Next Generation Workplace and Data Center Usin...
 
AWS DC Symposium Keynote: Teresa Carlson
AWS DC Symposium Keynote: Teresa CarlsonAWS DC Symposium Keynote: Teresa Carlson
AWS DC Symposium Keynote: Teresa Carlson
 
Tia 942 Data Center Standards
Tia 942 Data Center StandardsTia 942 Data Center Standards
Tia 942 Data Center Standards
 
Data center Building & General Specification
Data center Building & General Specification Data center Building & General Specification
Data center Building & General Specification
 

Similaire à Aws dc simple-workflow

Give your little scripts big wings: Using cron in the cloud with Amazon Simp...
Give your little scripts big wings:  Using cron in the cloud with Amazon Simp...Give your little scripts big wings:  Using cron in the cloud with Amazon Simp...
Give your little scripts big wings: Using cron in the cloud with Amazon Simp...Amazon Web Services
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsGary Yeh
 
Nyc big datagenomics-pizarroa-sept2017
Nyc big datagenomics-pizarroa-sept2017Nyc big datagenomics-pizarroa-sept2017
Nyc big datagenomics-pizarroa-sept2017delagoya
 
iOS Multithreading
iOS MultithreadingiOS Multithreading
iOS MultithreadingRicha Jain
 
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackLinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackOpenShift Origin
 
Dragoncraft Architectural Overview
Dragoncraft Architectural OverviewDragoncraft Architectural Overview
Dragoncraft Architectural Overviewjessesanford
 
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on KubernetesApache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on KubernetesDataWorks Summit
 
Evolution of netflix conductor
Evolution of netflix conductorEvolution of netflix conductor
Evolution of netflix conductorvedu12
 
e-suap - client technologies- english version
e-suap - client technologies- english versione-suap - client technologies- english version
e-suap - client technologies- english versionSabino Labarile
 
Using AWS Batch and AWS Step Functions to Design and Run High-Throughput Work...
Using AWS Batch and AWS Step Functions to Design and Run High-Throughput Work...Using AWS Batch and AWS Step Functions to Design and Run High-Throughput Work...
Using AWS Batch and AWS Step Functions to Design and Run High-Throughput Work...Amazon Web Services
 
Akka Microservices Architecture And Design
Akka Microservices Architecture And DesignAkka Microservices Architecture And Design
Akka Microservices Architecture And DesignYaroslav Tkachenko
 
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade ServerlessKatyShimizu
 
[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Enterprise-Grade Serverless[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Enterprise-Grade ServerlessKatyShimizu
 
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
 
Apache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataApache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataDataWorks Summit/Hadoop Summit
 
FireWorks workflow software
FireWorks workflow softwareFireWorks workflow software
FireWorks workflow softwareAnubhav Jain
 

Similaire à Aws dc simple-workflow (20)

Give your little scripts big wings: Using cron in the cloud with Amazon Simp...
Give your little scripts big wings:  Using cron in the cloud with Amazon Simp...Give your little scripts big wings:  Using cron in the cloud with Amazon Simp...
Give your little scripts big wings: Using cron in the cloud with Amazon Simp...
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
 
Ondemand scaling-aws
Ondemand scaling-awsOndemand scaling-aws
Ondemand scaling-aws
 
Nyc big datagenomics-pizarroa-sept2017
Nyc big datagenomics-pizarroa-sept2017Nyc big datagenomics-pizarroa-sept2017
Nyc big datagenomics-pizarroa-sept2017
 
iOS Multithreading
iOS MultithreadingiOS Multithreading
iOS Multithreading
 
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackLinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
 
Reliable Messaging with AWS
Reliable Messaging with AWSReliable Messaging with AWS
Reliable Messaging with AWS
 
JavaScript for real men
JavaScript for real menJavaScript for real men
JavaScript for real men
 
Dragoncraft Architectural Overview
Dragoncraft Architectural OverviewDragoncraft Architectural Overview
Dragoncraft Architectural Overview
 
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on KubernetesApache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
 
Wwf
WwfWwf
Wwf
 
Evolution of netflix conductor
Evolution of netflix conductorEvolution of netflix conductor
Evolution of netflix conductor
 
e-suap - client technologies- english version
e-suap - client technologies- english versione-suap - client technologies- english version
e-suap - client technologies- english version
 
Using AWS Batch and AWS Step Functions to Design and Run High-Throughput Work...
Using AWS Batch and AWS Step Functions to Design and Run High-Throughput Work...Using AWS Batch and AWS Step Functions to Design and Run High-Throughput Work...
Using AWS Batch and AWS Step Functions to Design and Run High-Throughput Work...
 
Akka Microservices Architecture And Design
Akka Microservices Architecture And DesignAkka Microservices Architecture And Design
Akka Microservices Architecture And Design
 
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
 
[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Enterprise-Grade Serverless[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Enterprise-Grade Serverless
 
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 ...
 
Apache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataApache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing data
 
FireWorks workflow software
FireWorks workflow softwareFireWorks workflow software
FireWorks workflow software
 

Dernier

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 

Dernier (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 

Aws dc simple-workflow

  • 1. AWS Simple WorkFlow by Nathan McCourtney May 2nd, 2012 @beaknit
  • 2. "Workflow"? A workflow management system is a computer system that manages and defines a series of tasks within an organization to produce a final outcome or outcomes. At each stage in the workflow, one individual or group is responsible for a specific task. Once the task is complete, the workflow software ensures that the individuals responsible for the next task are notified and receive the data they need to execute their stage of the process http://en.wikipedia.org/wiki/Workflow
  • 3. Amazon's Workflow Model ● A Workflow is the automation of a business process. ● A Domain is a collection of related Workflows. ● Actions are the individual tasks undertaken to carry out a Workflow. ● Activity Workers are the pieces of code that actually implement the tasks. Each kind of Worker has its own Activity Type. ● A Decider implements a Workflow's coordination logic. - From Jeff Barr's post
  • 4. Workers & Deciders = Actors From wikipedia: In computer science, the Actor model is a mathematical model of concurrent computation that treats "actors" as the universal primitives of concurrent digital computation: in response to a message that it receives, an actor can make local decisions, create more actors, send more messages, and determine how to respond to the next message received.
  • 5. Essentially, SWF is a framework for abstracting out actors and passing messages between them via queues
  • 6. Act! Work Queue Actor Messages 1. Fetches its work 2. Drops off its results Result Queue
  • 7. AWS Message Passing ● HTTPS ● Long-poll interval of 60 seconds ● Message format is JSON: {"decisionType": "ScheduleActivityTask", "scheduleActivityTaskDecisionAttributes": {"activityType": {"name": "activityVerify", "version": "1.0"}, "activityId": "verification-27", "control": "digital music", "input": "5634-0056-4367-0923,12/12,437", "scheduleToCloseTimeout": "900", "taskList": {"name": "specialTaskList"}, "scheduleToStartTimeout": "300", "startToCloseTimeout": "600", "heartbeatTimeout": "120"} } ● One decision queue per Workflow ● Many activity queues per Workflow
  • 8. Decider to SWF Comms SWF Decider DTL ATL 1. Decider polls Decision Task List (DTL) for new decision tasks 2. Decision task returned with entire workflow execution history to provider context for decisions 3. Decider executes conditional logic and returns an activity task back to SimpleWorkFlow which then deposits in the Activity Task List (ATL) Note: Multiple deciders can process the same DTL
  • 9. From AWS Ruby SDK # poll for decision tasks from 'my-task-list' domain.decision_tasks.poll( 'my-task-list' ) do |task| # investigate new events and make decisions task.new_events.each do |event| case event.event_type when 'WorkflowExecutionStarted' task.schedule_activity_task 'do-something' , :input => 'abc xyz' when 'ActivityTaskCompleted' task.complete_workflow_execution :result => event.attributes.result end end end # decision task is completed here
  • 10. Worker to SWF Comms SWF Worker ATL DTL 1. Worker polls ATL for appropriate tasks - different workers can consume different tasks 2. Task completion returned to SWF which makes the result available to the Decider via the DTL Note: Multiple workers can process the same ATL
  • 11. From AWS Ruby SDK # poll 'my-task-list' for activities domain.activity_tasks.poll( 'my-task-list' ) do |activity_task| case activity_task.activity_type.name when 'do-something' # ... else activity_task.fail! :reason => 'unknown activity task type' end end
  • 12. AWS example order-processing SWF Source: SWF Dev Guide
  • 13. Practical Exercise Nightly restore of a database to QA nodes combined with automated release migration.
  • 15.
  • 16. Further Reading ● Official Announcement ● Rightscale's blog on their use ● Dev Guide - Basic Concepts ● AWS Ruby SDK