Simple Workflow Service (SWF)

  1. AWS SWS is a cloud based web service that enables a sequence of tasks to be completed by a distributed set of programs/lambdas/EC2s/humans.
    1. A good example to Amazon’s own order taking/processing/fulfillment/shipping/returns system with a large number of tasks withing a single workflow.
    2. SWS is task oriented service (as opposed to SQS which is message oriented service)
  2. Three types of actors
    1. Starters initiate the workflow
    2. Workers are programs that can be run inside an EC2 or behind your firewall.
      1. retrieve tasks from SWS
      2. process the received tasks
      3. send results back to SWS
    3. A Decider program coordinates/orders/schedules tasks.
      1. They run inside an EC2 or behind your firewall.
      2. Also responsible for concurrency
      3. Workers and Deciders can run independently
  3. SWS responsibilities:
    1. SWS coordinates across workers/deciders.
    2. SWS stores tasks, assigns the tasks, monitors the tasks
    3. A task is assigned only once and never duplicated (unlike SQS messages)
    4. SWS maintains the state of the workflow
    5. The workers/deciders do not have to remember the application state hence workers/deciders can run and scale independently
  4. Workflows are grouped into domains. Domains isolate a set of tasks/executions/types from other domains within a given AWS account.
  5. A workflow can take upto a maximum 1 year to finish.
  6. Task is only assigned once and never duplicated (main difference from SQS where messages can be processed multiple times).
  7. SQS Design Question:
    1. For mission critical business processes such as e-commerce order processing, SWF is preferable to SQS since you don’t want to process orders more than once.
    2. SQS can’t 100% guarantee these duplicate messages no matter how much you increase the visibility timeout and make sure processed SQS messages are deleted.
<<< Simple Queue Service (SQS)Elastic Transcoder >>>
Copyright 2005-2016 KnowledgeHills. Privacy Policy. Contact .