- SWF is a webservice that makes it easy to coordinate work across distributed application components.
- SWF enables applications for a wide range of use cases, including media processing, web-applications 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 serice calls, human actions, and scripts.
SWF Workers & Deciders:
- The Workers and Deciders can run on Cloud Infrastructure, such as Amazon EC2, or on machines behind the firewalls. SWF brokers the interaction between the workers and deciders.
It allows the deciders to get consistent views into the progress of tasks and to initiate new tasks in an ongoing manner. - At the same time, Amazon SWF stores tasks, assign them to workers when they are ready, and monitors their progress. It ensures that the task is assigned only once and is never duplicated. Since SWF maintains the applications state durably, workers and deciders dont have to keep track of execution state. They can run independantly and scale quickly.
SQS and SWF-- SWF is assinged only once and SQS can have duplicate messages.
SWF Domain:
The 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.
We can register a domain using amazon console or by RegisterDomain action in the Amazon SWF API.
SQS - By default 12 hours and SWF - 1 year and the value is always measured in seconds.
SWF -- Task Oriented API, Message only once never duplicated, Keeps track of all the events and tasks, Human interaction
SQS -- Message Oriented API, Duplicate messages need to be handled, Application level tracking, No Human Interaction
No comments:
Post a Comment