23
Cai Zonghe / NCS Pte Ltd t: @caizonghe e: [email protected] w: studiohub.wordpress.com

Moving wf applications to the cloud

Embed Size (px)

Citation preview

Page 1: Moving wf applications to the cloud

Cai Zonghe / NCS Pte Ltd t: @caizonghee: [email protected]: studiohub.wordpress.com

Page 2: Moving wf applications to the cloud

Introduction to WF

Context of WF in Azure

Migration/development options

Quick Dive Demo (Basic WF)

Quick Dive Demo (Advanced WF)

Partial Demo (Azure Composite Application)

Page 3: Moving wf applications to the cloud

Introduction to WF

Context of WF in Azure

Migration/development options

Quick Dive Demo (Basic WF)

Quick Dive Demo (Advanced WF)

Partial Demo (Azure Composite Application)

Page 4: Moving wf applications to the cloud

Long running processes◦ Seconds / Minutes / Days / Months / Years

◦ System / Human

◦ Unreliable external world

Systems fail

People forget

Complex processes◦ Declarative representation of a process

◦ Easy to validate

◦ Increase maintainability

Page 5: Moving wf applications to the cloud
Page 6: Moving wf applications to the cloud
Page 7: Moving wf applications to the cloud

Versions:◦ .Net 3.0 / 3.5 – Sequence / State Machines

◦ .Net 4.0 – Sequence / Flowchart

◦ .Net 4.0 Update 1 – State Machines

◦ .Net 4.5 (Upcoming) – Contract First WF / Version Handling / C# Support

Hosting◦ Self Host – Windows Service / Exe

◦ IIS / WAS – [Windows Workflow Service Application]

Page 8: Moving wf applications to the cloud

Introduction to WF

Context of WF in Azure

Migration/development options

Quick Dive Demo (Basic WF)

Quick Dive Demo (Advanced WF)

Partial Demo (Azure Composite Application)

Page 9: Moving wf applications to the cloud

Handled by Batchjobs on premise◦ Mainframe concept, batch window / duration

◦ “Free”

◦ BJ mapped to worker roles in Azure

Not feasible to spin up workers / effective polling

Responsible for framework level stuff

Multi-threading, lock management, etc

Recovery from errors

Monitoring

Page 10: Moving wf applications to the cloud

WF is built to be used by multiple systems◦ Simple process workflow / complex business processes

◦ Resource queuing / lock mangement etc

◦ Recovery from errors

◦ Monitoring (with AppFabric)

Azure provides elastic scale

Azure AppFabric Composite Application◦ Monitoring

◦ Recovery

Page 11: Moving wf applications to the cloud

Introduction to WF

Context of WF in Azure

Migration/development options

Quick Dive Demo (Basic WF)

Quick Dive Demo (Advanced WF)

Partial Demo (Azure Composite Application)

Page 12: Moving wf applications to the cloud

Prerequisites◦ Microsoft .Net 4.0

◦ Microsoft .Net 4.0 Update 1

◦ Azure SDK 1.6 (Nov)

◦ Azure AppFabric Tools (June CTP)

◦ Azure / AzureSQL / CompApp Accounts

◦ Persistence scripts

<WinDir>\Microsoft.NET\Framework\v4.0.30319\SQL\en\

Page 13: Moving wf applications to the cloud

Current State◦ On-Premise WF Application with on-premise DB

.Net 4.0 Sequence WF

.Net 4.0 Update 1 State Machine WF

Requires WF Persistence

Requires Custom Property Persistance

References external WCF / Web services

Requires ability to suspend/resume/terminate running workflows

Page 14: Moving wf applications to the cloud

Cloud Option◦ On-Premise WF Application with Azure SQL DB

Run Schema.sql (Run this to clear DB for dev purpose)

Run Logic.sql

- High Overhead to configure Firewalls / Security / Network

- High Latency

Page 15: Moving wf applications to the cloud

Cloud Option◦ Azure Web Role hosting WF Application

Page 16: Moving wf applications to the cloud

Cloud Option◦ Azure Web Accelerator Project

Using Web Deploy

X Unable to publish endpoint [ WIP ]

Page 17: Moving wf applications to the cloud

Cloud Option◦ Azure AppFabric Composite Application

Different approach to looking at application

No more handling ServiceModel Client configuration for endpoints

Uses a service locator pattern to register and resolve deployed applications

Applications can be dynamically redeployed to scale

Provides representation of how the various components work together.

Page 18: Moving wf applications to the cloud

Cloud Option◦ Azure AppFabric Composite Application

Different approach to looking at application

No more handling ServiceModel Client configuration for endpoints

Uses a service locator pattern to register and resolve deployed applications

Applications can be dynamically redeployed to scale

Provides representation of how the various components work together.

Page 19: Moving wf applications to the cloud

Cloud Option◦ Azure AppFabric Composite Application

X CTP only

X Only if you can get an account

X A lot of configurations for Workflow

Page 20: Moving wf applications to the cloud

Quick Dive Demo (Basic WF)◦ Web App to place order via WF

service

◦ WF Service records order

◦ WF Service checks inventory

◦ WF Service calls payment service

◦ WF Service calls shipping service

◦ WF Service waits for shipping update

◦ WF Service completes when item delivered

Page 21: Moving wf applications to the cloud

Quick Dive Demo (Advanced WF)◦ How WF persistence is done

◦ How WF custom property persistence is done

◦ How to recover from WF errors

Page 22: Moving wf applications to the cloud

Partial Demo (Azure Composite Application)

Page 23: Moving wf applications to the cloud