Windows Phone 7 and Windows Azure – A Match Made in the Cloud

Post on 19-May-2015

3.495 views 1 download

Transcript of Windows Phone 7 and Windows Azure – A Match Made in the Cloud

Windows Phone 7 and Windows Azure –A Match Made in the Cloud

Day of Azure

Saturday, March 24th 2012

About Me

Michael S. Collier

National Architect,

Windows Azure

michael.collier@neudesic.com

@MichaelCollier

www.MichaelSCollier.com

The Perfect Match?

Contestants• Windows Azure• Windows Phone 7

Dimensions of Compatibility

The Dating Game• Do I Know You?• Dinner (setting the Table)• Movie (featuring “The Blob!”)• Following Up

Speed Dating• Scalability Image courtesy of Steve Marx

Profile: Windows Phone 7

• Connectivity• Easy to develop for• Familiar development

environment• Growing marketplace

• Best Feature: Transparency

Profile: Windows Azure

• Cloud == Connectivity• Easy to develop for• Familiar development

environments (.NET, Ruby, PHP, Java, etc.)

• Scalability

• Best Feature – Levels the Playing Field

Dimensions of Compatibility

Windows Phone 7

• Connectivity• Easy/Familiar

Environment• Marketplace• Transparency

Windows Azure

• Cloud Connectivity• Easy/Familiar

Environment• Scalability• Levels the Field

Windows Azure: Behind the Scenes

Windows Server 2008 / R2

.NET Framework 3.5 SP1 & 4.0

Runs on Windows Server -> Runs on Windows Azure

Virtual Machine – image/instance replicated as needed

Automatic load balancing (web roles)

Fabric Controller• Resource allocation• Recovery

Windows Azure: Behind the Scenes

Web Role

• IIS7 (Automatic Setup)• Requires at least 1 input

endpoint• Ideal for web applications• ASP.NET• Fast CGI + PHP

Worker Role

• Executable – Windows Service

• Serve as a host– Web server, database, etc.

• Generalized development• Long running or intermittent

tasks

The Key to Any Good Relationship - Communication

Windows Phone

• WCF• OData• JSON• POX

Windows Azure

• HTTP• ASP.NET• WCF• WCF Data Services

(OData)• Node.js

response

direct

request

Data Storage Options

Windows Azure

• Automatic scalability• REST-based API• Tables, blobs, & queues• Automatic geo-replication

SQL Azure

• Turn key SQL database• Tabular Data Stream (TDS)• DataSync (CTP)• SQL Azure Reporting

Services (CTP)

Windows Azure Service Bus

Robust messaging and routing services

Ability to connect services across networks• Defeats NATs and firewalls• Great for hybrid application scenarios!

Uses ACS for security

Examples at http://servicebus.codeplex.com

Do I Know You? – Identity Management

No need to build your own identity management• Another component to maintain

Likely not a distinguishable part of your application

Deal with user management• User support• Password management (including resets)

Do I Know You? – Identity Management

Roll Your Own

ASP.NET Membership Providers• Table Storage• SQL Azure

Integrate with Facebook, Windows Live, etc. via Access Control Services• Leverage ACS to handle authentication• Claims-based approach

DEMOWindows Phone and Access Control Services

The First Date – Table Time

Phone provides limited storage

Windows Azure

Non-relational data storage

Massive scalability (100 TB per Storage Account)

WCF Data Services (OData)

Security• HTTPS• Account Name and Key

Accessibility• Direct – Secure you key?• Web service (proxy) TABLE

Second Date – A Movie

Blobs provide mechanism for storage & retrieval of unstructured data.

Private by default.

Public read for web/phone apps.

Web role -> Blob?

Extra stress on the role instance

A Better Option

Get a little closer with Shared Access Signatures• Secure, limited access direct to Blob storage.• Create/Get Blob Container• Create SAS• Return SAS to WP7• WP7 will PUT data to Blob using the SAS• WP7 will GET data from Blob storage

Second Date – A Movie: CDN Edition

Windows Azure CDN• 24+ edge cache servers worldwide• Better user experience• HTTP/HTTPS

CDN CDNCDN CDN CDN CDN

DEMOWindows Phone 7 and Windows Azure Storage Services

Don’t call me . . . I’ll Call You

Ability for app provider to indirectly push data to phone.

Application alerts

Exchanging Numbers

1. Cr

eate

the c

hann

el4.

MPN

S sen

ds

notice

to p

hone

3. App sends notice

to MPNS

2. Register channel with app

MicrosoftPushNotificationService

My Cloud App

Scalability Options

Decompose – scalable work units• Web role(s)• Worker role(s)

Plan for scale out and in• Smallest unit that gets the job

done.• Direct financial impact

Web Role

Worker Role

Web RoleWeb Role

Web Role

Worker RoleWorker

RoleWorker RoleWorker

RoleWorker Role

NuGet Packages

Windows Phone

– Phone.Identity.*– Phone.Notifications.*– Phone.Storage.*

Windows Azure

– WindowsAzure.Notifications.*– WindowsAzure.Storage.*

More at http://www.wadewegner.com/2011/11/nuget-packages-for-windows-azure-and-windows-phone-developers/

https://github.com/WindowsAzure-Toolkits/wa-toolkit-wp-nugets

Quickly build new apps with advanced features and update existing apps

Windows Azure Toolkit for WP

http://watoolkitwp7.codeplex.com

Windows Azure & Mobility

Scalable mobile apps for iOS, Android, and WP

Windows Azure platform• Compute allows the app to quickly scale• Storage with tables, blobs, and SQL Azure• Messaging via storage queues or Service Bus• CDN provides content worldwide with low latency• Traffic Manager deploy globally & optimal routing• Identity authenticate users via social & corporate

Windows Azure toolkits and NuGet packages

Get Started!

http://bit.ly/AzureTrialMC

http://bit.ly/WindowsPhoneSDKMC

http://bit.ly/AzureSDKMC

Resources

Windows Azure Toolkit for Windows Phone 7http://watoolkitwp7.codeplex.com/

Windows Azure Training Kithttp://bit.ly/hRxBEC

Windows Phone 7 Training Kithttp://create.msdn.com/en-US/education/catalog/article/wp7_training_kit

Vittorio Bertoccihttp://blogs.msdn.com/b/vbertocci/

Steve Marxhttp://blog.smarx.com

Wade Wegnerhttp://www.WadeWegner.com

Friday, August 3rd

The Ohio UnionThe Ohio State University

Speakers – Early AprilRegistration opens in early

May

www.clouddevelop.org

@CloudDevConf

Q &

A

Ask your questions