amazon simple workflow service (swf)

35
Amazon Simple Workflow Service (SWF) Informatics Center Federal University of Pernambuco Airton Pereira March, 2012

Upload: airton-pereira

Post on 21-Apr-2015

35 views

Category:

Documents


2 download

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.

TRANSCRIPT

Page 1: Amazon Simple Workflow Service (SWF)

Amazon Simple Workflow Service (SWF)

Informatics Center

Federal University of Pernambuco

Airton Pereira

March, 2012

Page 2: Amazon Simple Workflow Service (SWF)

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)

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)
Page 5: Amazon Simple Workflow Service (SWF)

Workflow ??

Page 6: Amazon Simple Workflow Service (SWF)

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)

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)

• 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)

• Workflow History

• Tasks

• Actors

• Domains

• Timeout Types

Basic Concepts in SWF

Page 10: Amazon Simple Workflow Service (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

Page 11: Amazon Simple Workflow Service (SWF)

– Activity task.

– Decision task.

Tasks

Page 12: Amazon Simple Workflow Service (SWF)

Actors

Page 13: Amazon Simple Workflow Service (SWF)

Actors - Workflow Starters

Page 14: Amazon Simple Workflow Service (SWF)

• 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)

• 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)

• ScheduleActivityTask

• RequestCancelActivityTask

• CompleteWorkflowExecution

• FailWorkflowExecution

• ContinueAsNewWorkflowExecution

Actors – Deciders - Decisions

Some Decision Examples

Page 17: Amazon Simple Workflow Service (SWF)

• 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)

• 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)

How to use SWF?

Page 20: Amazon Simple Workflow Service (SWF)

Dashboard

Page 21: Amazon Simple Workflow Service (SWF)

What will happen?

Page 22: Amazon Simple Workflow Service (SWF)

Create a domain

Page 23: Amazon Simple Workflow Service (SWF)

Registration

Page 24: Amazon Simple Workflow Service (SWF)

Deployment

Page 25: Amazon Simple Workflow Service (SWF)

Run an execution

Page 26: Amazon Simple Workflow Service (SWF)

Finish.

Page 27: Amazon Simple Workflow Service (SWF)

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)

Case - RightScale Workflow

Page 29: Amazon Simple Workflow Service (SWF)

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)
Page 31: Amazon Simple Workflow Service (SWF)

Let’s to think about ourstartups!

Page 32: Amazon Simple Workflow Service (SWF)

Search Products

Sort ByPrice

Trace Route

Page 33: Amazon Simple Workflow Service (SWF)

Search Events

Check Cost

To bid a Packet

Ship Order

Record Completition

End

Against bid

Page 34: Amazon Simple Workflow Service (SWF)

UploadVideos

ConvertVideos

Streaming

CreatePlaylist

MixedTV

Page 35: Amazon Simple Workflow Service (SWF)

Thanks!!

• SWF site

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

• Amazon Web Services Blog

– http://tinyurl.com/76grl69