Download - Amazon Simple Workflow Service (SWF)
![Page 1: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/1.jpg)
Amazon Simple Workflow Service (SWF)
Informatics Center
Federal University of Pernambuco
Airton Pereira
March, 2012
![Page 2: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/2.jpg)
Agenda
• Contextualization
• SWF Definition
• SWF Basic Concepts
• How to use it (quick view)
• SWF Pricing
• RighScale – Case Study
• Thinking about our startups
![Page 3: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/3.jpg)
Workflow- Example
Customer Order (Start)
Verify Order
Charge Credit Card
Ship Order
Record Completition
End
Order Verifiers
Credit Card Processors
Warehouse Employees
Databases Recorders
![Page 4: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/4.jpg)
![Page 5: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/5.jpg)
Workflow ??
![Page 6: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/6.jpg)
1. The applications often incorporate a workflow
2. The workflow often represents a business process
3. Processes can be complex
4. Flexibility is key
5. Ease of use is important
What we learned.....
![Page 7: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/7.jpg)
SWF - Definition
Amazon Simple Workflow Service (Amazon SWF) is a workflow service for building
scalable, resilient applications. Whether automating business processes for finance or insurance applications, building sophisticated data analytics applications, or managing cloud infrastructure services, Amazon SWF reliably coordinates all of the processing steps within
an application.
![Page 8: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/8.jpg)
• Fully managed service
• No hardware or software to administer
• SWF provides simple API calls
• executed from code written in any language
• Running in your EC2 instance or machines located anywhere
SWF – Some Features
![Page 9: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/9.jpg)
• Workflow History
• Tasks
• Actors
• Domains
• Timeout Types
Basic Concepts in SWF
![Page 10: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/10.jpg)
Workflows HistoryThe workflow history is a detailed, complete, and
consistent record of every event that occurred since the workflow execution started.
Invoice0001 Start Workflow Execution Schedule Verify Order Start Verify Order Activity Complete Verify Order Activity Schedule Charge Credit Card Start Charge Credit Card Activity Complete Charge Credit Card Activity Schedule Ship Order Start Ship Order Activity
![Page 11: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/11.jpg)
– Activity task.
– Decision task.
Tasks
![Page 12: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/12.jpg)
Actors
![Page 13: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/13.jpg)
Actors - Workflow Starters
![Page 14: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/14.jpg)
• A decider is an implementation of a workflow's coordination logic
• A decider represents a single computer process or thread.
Actors - Deciders
history
+Decision
![Page 15: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/15.jpg)
• An activity worker is a process or thread that performs the activity tasks that are part of your workflow.
Actors – Activity Workers
Hey SWF, do you have any task to me?
SWF
![Page 16: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/16.jpg)
• ScheduleActivityTask
• RequestCancelActivityTask
• CompleteWorkflowExecution
• FailWorkflowExecution
• ContinueAsNewWorkflowExecution
Actors – Deciders - Decisions
Some Decision Examples
![Page 17: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/17.jpg)
• Domains provide a way of scoping Amazon SWF resources within your AWS account
• It is possible to have more than one workflow in a domain
• Workflows in different domains cannot interact with each other
Domains
![Page 18: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/18.jpg)
• Workflow Start to Close
• Decision Task Start to Close
• Activity Task Start to Close
• Activity Task Heartbeat
• Activity Task Schedule to Start
• Activity Task Schedule to Close
Timeouts
![Page 19: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/19.jpg)
How to use SWF?
![Page 20: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/20.jpg)
Dashboard
![Page 21: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/21.jpg)
What will happen?
![Page 22: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/22.jpg)
Create a domain
![Page 23: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/23.jpg)
Registration
![Page 24: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/24.jpg)
Deployment
![Page 25: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/25.jpg)
Run an execution
![Page 26: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/26.jpg)
Finish.
![Page 27: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/27.jpg)
Pricing
• Starting for free
– 1,000 Workflows and 10,000 tasks per month
• Beyond that, there are three pricing dimensions:
– Executions: You pay $0.0001 for every Workflow execution
– Tasks: $0.000025 for every task execution
– Bandwidth: Charging just next the 1º Gigabyte of data transferred out.
![Page 28: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/28.jpg)
Case - RightScale Workflow
![Page 29: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/29.jpg)
The problem
Automatically launching and terminating servers based on monitoring metrics, such as cpu load
Bringing the new servers into full operation
![Page 30: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/30.jpg)
![Page 31: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/31.jpg)
Let’s to think about ourstartups!
![Page 32: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/32.jpg)
Search Products
Sort ByPrice
Trace Route
![Page 33: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/33.jpg)
Search Events
Check Cost
To bid a Packet
Ship Order
Record Completition
End
Against bid
![Page 34: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/34.jpg)
UploadVideos
ConvertVideos
Streaming
CreatePlaylist
MixedTV
![Page 35: Amazon Simple Workflow Service (SWF)](https://reader034.vdocuments.us/reader034/viewer/2022051820/553758e955034686768b4d4f/html5/thumbnails/35.jpg)
Thanks!!
• SWF site
– http://aws.amazon.com/swf/
• Amazon Web Services Blog
– http://tinyurl.com/76grl69