Coordinate work across distributed application components. Enables applications for a range of us cases, including media processing, web application back-ends, business process workflows, and analytics pipelines, to be designed as a coordination of tasks.
Tasks represent invocations of various processing steps in an application which can be performed by executable code, web service calls, human actions, and scripts
Workers are programs that interact with SWF to get task, process received tasks, and return results
Deciders are programs that controls the coordination of tasks, ie their ordering, concurrency, and scheduling according to the application logic
The works and deciders can run on cloud infrastructure such as EC2 or on machines behind firewalls. SWF brokers the interactions between workers and the decider. It allows the decider to get consistent views into the progress of tasks and to initiate new tasks in an ongoing manner
SWF stores tasks, assigns them to workers when they are ready, and monitors their progress. It ensures that a task is only assigned once and is never duplicated. SWF maintains the applications state durably, workers and deciders don’t have to keep track of execution state. They can run independently and scale quickly
Workflow and activity types and the workflow execution itself are all scoped to a domain. Domains isolate a set of types, executions, and task lists from others within the same account
You can register a domain by using the Console or by using the RegisterDomain action in the SWF API
The parameters are specified in JSON format
SWF vs SQS
SWF presents a task-oriented API, whereas SQS offers a message-oriented API
SWF ensures that a task is assigned only once and is never duplicated. SQS requires you to handle duplicated messages and may also need to ensure that a message is processed only once.
SWF keeps track of all the tasks and events in an application. With SQS you need to implement your own application level tracking, especially if your application uses multiple queues.