Amazon Simple Workflow Service (SWF) is a web service that enables workflow orchestration across multiple applications or application components.

In simple terms, SWF enables coordination of tasks by managing execution dependencies, scheduling, and concurrency. Some of the key functions that SWF handle:

  • Maintain application state
  • Track workflow executions and logging
  • Hold and dispatch tasks
  • Deciding on task assignment to specific application hosts

 


Key Components of Amazon Simple Workflow Service (SWF)

 

Actor

In this context, an Actor is an application or component that acts upon SWF API. There are three types of Actors:

  • Workflow Starter – an application that initiates workflow executions. Example – in case of an ecommerce it can be the website (or app) where order initiates.
  • Decider – a decider controls the flow of activity tasks by implementing workflow’s coordination logic. Every time a task has completed (successfully or not), the control is passed to Decider to determine next step.
  • Activity Worker – a process or thread that performs the activity task(s). Activity Workers poll SWF for new tasks to take on.

 

Task

A Task is a work assignment that SWF tell Activity Worker(s) to perform. There are three types of Tasks:

  • Activity Task tells Activity Worker to perform its function (e.g., process a payment).
  • Lambda Task is similar to Activity Task, but designed for executing a Lambda function.
  • Decision Task tells a decider about completion of workflow execution so decider can decides on the next step.

 


Key Points

  • SWF is a fully managed service.
  • SWF enables logical separation. Using its API you can integrate its workflow in your application.
    • You can use the API even from non-AWS services, including your on-prem applications

Note: SWF is not recommended by AWS for new applications, and recommended replacement is Step Functions

 


External Resources