top
upGrad KnowledgeHut SkillFest Sale!

Search

AWS Tutorials

Amazon SWF (Simple workflow service) helps in building applications which make use of Amazon’s cloud, by coordinating work across distributed component units. Coordinating work/task involves the management of dependencies among tasks, scheduling them, and concurrency which should go hand-in-hand with the logical flow of the application.A ‘task’ is used to represent a logical unit of work that can be performed by one of the components present in the workflow.SWF gives the user full control over the implementation of tasks, as well as coordinating between them without having to be concerned about the underlying complexities which include tracking the progress of the tasks as well as maintenance of the task state.Tasks can be performed by implementing ‘workers’. These ‘workers’ run on cloud infrastructure (such as Amazon Elastic Compute Cloud or the user’s premise).A wide variety of tasks can be created. Some of them have been listed below:Tasks that run for long periods of time.Tasks that could fail.Tasks that could timeout.Tasks that need to be restarted at some point in time.Tasks that have varying throughput and latency measures.Tasks are stored and assigned to ‘workers’ when they are ready. Their progress is tracked by SWF, and it also helps in maintaining their state, which includes details regarding the time they took to complete.A program can be written that helps coordinate between multiple tasks and also fetches the latest/updated state of every task. This updated state can be used to initiate other subsequent tasks. The state of the application’s execution is maintained with high-durability so that the application shows high-resilience to failure (when individual components fail). All applications can be implemented, deployed, scaled, and modified according to the requirements independently.SWF can be used for many tasks which have coordination as their main requirement, and this includes media data processing, web application back-end, workflows of business processes, and analytics pipeline.With the help of SWF, a distributed, and synchronous application can be implemented as a ‘workflow’. A workflow can be visualized as a feature that helps coordinate and manage executing the activities which can be run synchronously across many computing machines, which can use both sequential as well as parallel processing methods.When a workflow is to be designed, the user has toanalyze the application and identify its component tasks, which will be represented as ‘activities’ in Amazon SWF. The order in which these tasks are performed depends on the logic of the workflow coordination itself.SWF supports a variety of ‘actions’ which include (but are not limited to) the following:DeprecateDomainListdomainsPollForActivityTaskRespondActivityTaskCompletedUntagResourceSWF API comes with many data types which can be used by ‘actions’. Some of them have been listed below:ActivityTaskActivityTypeDomainInfoExecutionTimeFilterHistoryEventResourceTagTaskListWorkFlowExecutionWorkFlowTypeInfoConclusionIn this post, we understood how Amazon’s SWF (Simple Workflow Service) can be used to coordinate between multiple tasks and process the data seamlessly.
logo

AWS Tutorials

Why Amazon Simple Workflow Service (SWF) is so important?

Amazon SWF (Simple workflow service) helps in building applications which make use of Amazon’s cloud, by coordinating work across distributed component units. Coordinating work/task involves the management of dependencies among tasks, scheduling them, and concurrency which should go hand-in-hand with the logical flow of the application.

A ‘task’ is used to represent a logical unit of work that can be performed by one of the components present in the workflow.

SWF gives the user full control over the implementation of tasks, as well as coordinating between them without having to be concerned about the underlying complexities which include tracking the progress of the tasks as well as maintenance of the task state.

Tasks can be performed by implementing ‘workers’. These ‘workers’ run on cloud infrastructure (such as Amazon Elastic Compute Cloud or the user’s premise).

A wide variety of tasks can be created. Some of them have been listed below:

  • Tasks that run for long periods of time.
  • Tasks that could fail.
  • Tasks that could timeout.
  • Tasks that need to be restarted at some point in time.
  • Tasks that have varying throughput and latency measures.

Tasks are stored and assigned to ‘workers’ when they are ready. Their progress is tracked by SWF, and it also helps in maintaining their state, which includes details regarding the time they took to complete.

A program can be written that helps coordinate between multiple tasks and also fetches the latest/updated state of every task. This updated state can be used to initiate other subsequent tasks. The state of the application’s execution is maintained with high-durability so that the application shows high-resilience to failure (when individual components fail). All applications can be implemented, deployed, scaled, and modified according to the requirements independently.

SWF can be used for many tasks which have coordination as their main requirement, and this includes media data processing, web application back-end, workflows of business processes, and analytics pipeline.

With the help of SWF, a distributed, and synchronous application can be implemented as a ‘workflow’. A workflow can be visualized as a feature that helps coordinate and manage executing the activities which can be run synchronously across many computing machines, which can use both sequential as well as parallel processing methods.

When a workflow is to be designed, the user has toanalyze the application and identify its component tasks, which will be represented as ‘activities’ in Amazon SWF. The order in which these tasks are performed depends on the logic of the workflow coordination itself.

SWF supports a variety of ‘actions’ which include (but are not limited to) the following:

  • DeprecateDomain
  • Listdomains
  • PollForActivityTask
  • RespondActivityTaskCompleted
  • UntagResource

SWF API comes with many data types which can be used by ‘actions’. Some of them have been listed below:

  • ActivityTask
  • ActivityType
  • DomainInfo
  • ExecutionTimeFilter
  • HistoryEvent
  • ResourceTag
  • TaskList
  • WorkFlowExecution
  • WorkFlowTypeInfo

Conclusion

In this post, we understood how Amazon’s SWF (Simple Workflow Service) can be used to coordinate between multiple tasks and process the data seamlessly.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments

tenzin nyima

Whoever has contributed to this article...I would like to say thank you... it has been of good help to the readers.

alvi

This blog is very helpful and informative, and I really learned a lot from it.

alvi

It is very helpful and very informative, and I really learned a lot from this article.

alvi

Such a very useful article. I would like to thank you for the efforts you made in writing this awesome blog.

Jeanne

Very useful and awesome blog!