SWF
Genaral
coordinate work across distributed components
tracking and maintaining their execution state
WorkFlow Execution
1.Implement Activity workers with the processing steps
2.Implement Decider with the coordination logic
3.Register the Activities and workflow
4.Start the Activity workers and Decider:
start polling Amazon SWF for tasks
5.execution is started,until decider makes a decision to close the execution
WorkFlow
1.A workflow is a set of activities that carry out some objective
2.is the automation of a business process
Workflow History
the history provides a record of which activities were scheduled, their current status, and their results
enables applications to be stateless
provides a detailed audit trail
Markers:
be used to record information in the workflow history of a workflow execution
Domain
Each workflow runs in an AWS resource
Workflows in different domains cannot interact with each other
Limit
max 100 domains
10,000 workflow/activity types
max1000 open activity tasks
Activities
registered with SWF as an activity type with information such as name, version and timeout
Activity Worker:
a program that receives activity tasks, performs them, and provides results back
Activity tasks:
run synchronously or asynchronously
distributed across multiple computers,different regions
written in different programming languages and run on different operating systems
Decider
implements a Workflow’s coordination logic
Workers and Deciders are both stateless,負荷增加時,只要再增加 Worker and decider 數量即可
workers and the decider receive their tasks by "Polling" SWF
SWF allows “long polling” up to 60 secs
SWF Service can across 3 AZs
a running instance of a workflow