32
Marcus Tillett T:@drmarcustillett www.dotnetsolutions.co.uk

Developing For The Windows Azure Platform

Embed Size (px)

Citation preview

Page 1: Developing For The Windows Azure Platform

Marcus Tillett

T:@drmarcustillett

www.dotnetsolutions.co.uk

Page 2: Developing For The Windows Azure Platform

Dive into the Windows Azure Platform DEMO: Migrating an existing on-premise

application to Azure .NET development differences with the

Windows Azure Platform

Page 3: Developing For The Windows Azure Platform
Page 4: Developing For The Windows Azure Platform

Windows Azure

Applications

AppFabric

SQL Azure

Applications

Others Mobile Desktop Server

Page 5: Developing For The Windows Azure Platform

Fabric

Storage

Config

Compute

Application

AppFabric

Windows Azure

Applications

Applications

SQL Azure

Others Mobile

Desktop

Server

Page 6: Developing For The Windows Azure Platform
Page 7: Developing For The Windows Azure Platform

IIS7

Web Hosting Web Services

Storage Services

Public Internet

Web Role

Load Balancer

Page 8: Developing For The Windows Azure Platform

Self hosted

“Windows Services”

Infinite Loop

Storage Service

Public Internet

Worker Role

Load Balancer

Page 9: Developing For The Windows Azure Platform
Page 10: Developing For The Windows Azure Platform

Open - REST interface

HTTP or HTTPS

Authenticated using secret keys Can access from outside Azure All data replicated at least 3 times

Table Storage Blob Storage Queue Drive

Page 11: Developing For The Windows Azure Platform
Page 12: Developing For The Windows Azure Platform

Provide access rights to containers and blobs

Start

Expiry

Permission (r, w, d, l)

Resource (c, b)

Page 13: Developing For The Windows Azure Platform

No limits on number of Queues Message:

Max size 8kb

Operations:

▪ Enqueue

▪ Dequeue

▪ RemoveMessage

Page 14: Developing For The Windows Azure Platform
Page 15: Developing For The Windows Azure Platform

Queues guarantee a message will be processed at least once.

Allows recovery in the event of errors

Message come back to life if not Removed

Approximates First In First Out queue

Page 16: Developing For The Windows Azure Platform
Page 17: Developing For The Windows Azure Platform

Partition Key for Scale Row Key for performance

Non-RowKey queries result in a partition scan

Row Key and Partition Key as strings Data sorted by Row Key within a Partition

Denormalise the data for performance These aren’t SQL tables

Page 18: Developing For The Windows Azure Platform

PartitionKey (Category)

RowKey (Title)

Timestamp ReleaseDate

Action Fast & Furious … 2009

Action The Bourne Ultimatum

… 2007

… … … …

Animation Open Season 2 … 2009

Animation The Ant Bully … 2006

… … … …

Comedy Office Space … 1999

… … … …

SciFi X-Men Origins: Wolverine

… 2009

… … … …

War Defiance … 2008

Fast query by Partition Key and Row Key

Page 19: Developing For The Windows Azure Platform

PartitionKey (Category)

RowKey (Title)

ReleaseDate

Action Fast & Furious 2009

Action The Bourne Ultimatum

2007

… … …

Animation Open Season 2 2009

Animation The Ant Bully 2006

… … …

Comedy Office Space 1999

… … …

SciFi X-Men Origins: Wolverine

2009

PartitionKey (ReleaseDate)

RowKey (Title)

Category

2009 Fast & Furious Action

2007 The Bourne Ultimatum

Action

… … …

2009 Open Season 2 Animation

2006 The Ant Bully Animation

… … …

1999 Office Space Comedy

… … …

2009 X-Men Origins: Wolverine

SciFi

Film_ByCategory Film_ByReleaseDate

Page 20: Developing For The Windows Azure Platform

Example

Page 22: Developing For The Windows Azure Platform

PartitionKey

RowKey Title Date Approve Cost Centre

Description Amount

123 Client meeting

1/6/10 Y 123

123 1 Travel £15.00

123 2 Lunch £10.00

123 3 Drinks £25.00

456 Training course

5/8/10 N 123

.... .... .... .... .... .... .... ....

Page 23: Developing For The Windows Azure Platform

Motivation: Ensure that modifications to a master record and its

item records are performed in a transactional way.

Implementation : Multiple entity types stored in single table with the

same partition key can utilise the Windows Azure Table entity group transaction feature that provides batch transactions on entities.

Uses: When a transactional operation is required.

Page 24: Developing For The Windows Azure Platform
Page 25: Developing For The Windows Azure Platform
Page 26: Developing For The Windows Azure Platform

Retry when connections fail Expect network latency (e.g. SQL Azure) Be stateless Design for failure

Don’t rely on local storage

Allow for restart in inconsistent state

Be aware of the emerging patterns for Azure

http://bit.ly/9Wsrk

Choose you Table partition key carefully

Page 27: Developing For The Windows Azure Platform

Development Fabric Differences from development and live Test early and often

Limited registry and disk access Logging and Diagnostics Configuration

app and web config for runtime static configuration Azure configuration for simple strings Roll your own for more complex configuration

Deployment Only core .NET assemblies are pre-deployed in Azure. You

need to deploy any custom libraries yourself.

Page 28: Developing For The Windows Azure Platform

Transact-SQL Features Supported Transact-SQL Features Unsupported

Constants

Constraints

Cursors

Index management and rebuilding

indexes

Local temporary tables

Reserved keywords

Stored procedures

Statistics management

Transactions

Triggers

Tables, joins, and table variables

User-defined functions

Views, including sys.synonyms view

Spatial data and indexes (June 2010)

Common Language Runtime (CLR)

Database file placement

Database mirroring

Distributed queries

Distributed transactions

Filegroup management

Global temporary tables

SQL Server configuration options

SQL Server Service Broker

System tables

Trace Flags

Page 29: Developing For The Windows Azure Platform

Further reading http://www.azure.com/ http://blog.smarx.com/

Signup for Azure http://www.microsoft.com/windowsazure/offers/

(Credit card required) Ensure that you complete delete a deployment –

otherwise you will be charged! Join your local user group

UK (http://ukazurenet.com) Buy a book

Page 30: Developing For The Windows Azure Platform

http://tinyurl.com/azurebook

“Thinking of... Delivering Solutions on the Windows Azure Platform?”

ISBN: 0956155634

Page 31: Developing For The Windows Azure Platform

Marcus Tillett

T:@drmarcustillett

www.dotnetsolutions.co.uk

Page 32: Developing For The Windows Azure Platform