Amazon Simple Workflow Service (SWF)

Preview:

DESCRIPTION

Apresentação realizada sobre Amazon Simple Workflow Service (SWF) na disciplina de Engenharia de Software no Centro de Informática na Universidade Federal de Pernambuco no dia 19/03/2012.

Citation preview

Amazon Simple Workflow Service (SWF)

Informatics Center

Federal University of Pernambuco

Airton Pereira

March, 2012

Agenda

• Contextualization

• SWF Definition

• SWF Basic Concepts

• How to use it (quick view)

• SWF Pricing

• RighScale – Case Study

• Thinking about our startups

Workflow- Example

Customer Order (Start)

Verify Order

Charge Credit Card

Ship Order

Record Completition

End

Order Verifiers

Credit Card Processors

Warehouse Employees

Databases Recorders

Workflow ??

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.....

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.

• 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

• Workflow History

• Tasks

• Actors

• Domains

• Timeout Types

Basic Concepts in SWF

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

– Activity task.

– Decision task.

Tasks

Actors

Actors - Workflow Starters

• A decider is an implementation of a workflow's coordination logic

• A decider represents a single computer process or thread.

Actors - Deciders

history

+Decision

• 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

• ScheduleActivityTask

• RequestCancelActivityTask

• CompleteWorkflowExecution

• FailWorkflowExecution

• ContinueAsNewWorkflowExecution

Actors – Deciders - Decisions

Some Decision Examples

• 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

• 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

How to use SWF?

Dashboard

What will happen?

Create a domain

Registration

Deployment

Run an execution

Finish.

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.

Case - RightScale Workflow

The problem

Automatically launching and terminating servers based on monitoring metrics, such as cpu load

Bringing the new servers into full operation

Let’s to think about ourstartups!

Search Products

Sort ByPrice

Trace Route

Search Events

Check Cost

To bid a Packet

Ship Order

Record Completition

End

Against bid

UploadVideos

ConvertVideos

Streaming

CreatePlaylist

MixedTV

Thanks!!

• SWF site

– http://aws.amazon.com/swf/

• Amazon Web Services Blog

– http://tinyurl.com/76grl69

Recommended