27

CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Embed Size (px)

Citation preview

Page 1: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved
Page 2: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

CONNECTING PHONE APPLICATIONS TO THE CLOUD

Nick Randolph (Built to Roam)

SESSION CODE: COS-WPH208

Page 3: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

AgendaPhone + Cloud

► Phone / Cloud Facts► Data – Odata– WCF Services– Blob Storage

► Notifications► Azure Toolkit for Windows Phone

Page 4: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Mobile ≠ Connected

(c) 2011 Microsoft. All rights reserved.

Page 5: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

Cloud ≠ High Availability

Page 6: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

More Challenges

► More subscribers (data, image, video)► Network congestion– Spectrum + cell towers + antennas

► Bandwidth caps► High Latency– Phone Tower Mobile Infrastructure Internet

Mobile developers must solve these problems to delight the end user!

Page 7: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Supporting Millions of Connected Devices

Database(s) that nobody touches

Thousands of servers on commodity hardware

Replicated, horizontally-scaled NoSQL databases; Data sharding using small tables for fast access

Load-balancing at every tier

Terabytes in an in-RAM, distributed cache

MapReduce for parallel analysis of “big data”

Page 8: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

How will You Scale?Windows Azure

SQL Azure is never touched by devicesWorker Roles replicate outbound data from SQL Azure to NoSQL Table or Blob StorageWorker Roles move inbound data from Azure queues to SQL Azure

Scale-out Windows Azure instances as needed

Wireless efficiency is realized via Web Roles that use REST + JSON WCF Services

Distributed caching via AppFabric Caching

Devices cache data and work offline

Page 9: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

Case Study: Capture TechEd

► Image capture via Phone► Upload to Blob Storage► Tag image with TechEd Track► Queue image for processing► Receive tile notification of new images► Retrieve recent images list

Page 10: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

IMAGE CAPTURE

demoCamera Capture TaskLaunchers and Choosers

Page 11: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Architecture

MobileClient

BlobStorage

BlobStorage

WCFWeb Role

MobileClient Mobile

Client

BlobStorage

Retrieve SharedAccess Signature

HTTP Post Image

Page 12: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

IMAGE UPLOAD

demoBlob UploadShared Access Signatures

Page 13: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Architecture

MobileClient

WCFWeb Role

TechEdOData

MobileClient Mobile

Client

RetrieveTracks

UploadProcessing Job

Page 14: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

UPLOAD PROCESSING JOB

demoTracks from REST serviceJSON SerialisationWCF Service

Page 15: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Architecture

WCFWeb Role

AzureQueue

AzureQueue

AzureQueue

QueueProcessing Job

Page 16: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

QUEUE PROCESSING JOB

demoAdd Job To QueueObject serialization

Page 17: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Architecture

BlobStorage

BlobStorage

WorkerRole

AzureQueue

AzureQueue

AzureQueue

BlobStorage

NextProcessing Job

Save Image Info

UpdateImage in Blob

Page 18: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

PROCESS JOB

demoImage ResizingRetrieve Job from QueueUpdate SQL AzureUpdate Blob with new Image

Page 19: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Architecture

MobileClient

WorkerRole

MobileClient Mobile

Client

Next Tile Update

HTTP PostTile Notification

Page 20: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

TILE NOTIFICATION

demoPush NotificationHTTP Post

Page 21: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Architecture

MobileClient

WCFWeb Role

MobileClient Mobile

Client

OutputCaching

Recent Images via OData

Page 22: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

RECENT IMAGES

demoOData Feed

Page 23: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Architecture

MobileClient

BlobStorage

BlobStorage

WCFWeb Role

TechEdOData

WorkerRole

AzureQueue

AzureQueue

AzureQueue

WorkerRole

MobileClient Mobile

Client

OutputCaching

BlobStorage

DONE

Page 24: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

WAZ Toolkit for WP

► ASP.NET Membership Via Table Storage► ACS► Push Notifications► Table, Blob and Queues

WP and iOS available now!Android coming soon

Page 25: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

WINDOWS AZURE TOOLKIT

demoCreating New ProjectOverview

Page 26: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

Enrol in Microsoft Virtual Academy TodayWhy Enroll, other than it being free?The MVA helps improve your IT skill set and advance your career with a free, easy to access training portal that allows you to learn at your own pace, focusing on Microsoft technologies.

What Do I get for enrolment?► Free training to make you become the Cloud-Hero in my Organization► Help mastering your Training Path and get the recognition► Connect with other IT Pros and discuss The Cloud

Where do I Enrol?

www.microsoftvirtualacademy.com

Then tell us what you think. [email protected]

Page 27: CONNECTING PHONE APPLICATIONS TO THE CLOUD Nick Randolph (Built to Roam) SESSION CODE: COS-WPH208 (c) 2011 Microsoft. All rights reserved

(c) 2011 Microsoft. All rights reserved.

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this

presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.