SNS - Simple WorkFlow Service Flashcards
What is SWF?
Web service that makes it easy to coordinate work across distributed components.
Enables variety of use cases: media processing, business process workflows.
Coordinates tasks - steps in an application that can be done by human actions, code, scripts, etc.
What are workers?
programs that interact with SWF to get tasks, process received tasks, return results
What is the decider?
program that controls coordination of tasks: ordering, scheduling, etc. according to program logic
Describe overview of workers and decider
Workers and deciders run on the cloud, or machines behind firewalls
SWF brokers interactions between workers and decider. Allows decider to get consistent views into progress of tasks and initiate new ones
SWF stores tasks, assigns them to workers.
SWF ensures tasks are assigned only once, never duplicated
SWF allows scaling since workers & deciders don’t have to track the execution state
SWF vs SQS key differences
SWF - task only assigned once, never duplicated
SQS - task could be duplicated
SWF - task-oriented API
SQS - message oriented API
SWF process can last a year
SQS can last a few days
What is the maximum workflow time?
Up to 1 year
Always measured in seconds
Compare tracking in SWF and SQS
SWF tracks all tasks and events in application
SQS requires you to implement your own tracking