scott densmore-sic-2011
DESCRIPTION
Scott Densmore's presentation at Seattle Interactive Conference 2011TRANSCRIPT
![Page 1: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/1.jpg)
BUILDING CLOUD APPS WITH IOSScott Densmore – Senior SDE patterns & practices
![Page 2: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/2.jpg)
Agenda This talk is focused on building iOS
applications with Windows Azure We’ll talk about storage, identity,
communications, platform services, and tools
I’ll show a few demos for the concepts
![Page 3: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/3.jpg)
Expectations An understanding of how storage,
identity, and communications work with iOS when using Windows Azure
![Page 4: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/4.jpg)
Why Device + Cloud? The cloud levels the
playing field The cloud provides a
larger pool of resources from which to pull
The cloud provides a way to reach across device platforms
![Page 5: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/5.jpg)
Why Windows Azure? Platform as a Service (PaaS): you build it,
Windows Azure runs it Automatic O/S patching Elasticity and scale Utility billing Higher-level services
ACS, Traffic Manager, Caching, CDN
![Page 6: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/6.jpg)
What will we see today? Storage Identity Communications Platform Services
![Page 7: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/7.jpg)
Storage
![Page 8: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/8.jpg)
Storage: What are our options? Windows Azure Tables
Non-relational structured storage Massive scale-out OData
Windows Azure Blobs Big files REST
Windows Azure Queues Persistent Async Messaging Enqueue, Dequeue
![Page 9: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/9.jpg)
Storage: What are our options?
SQL Azure Relational database Highly available Managed for you as a
service
![Page 10: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/10.jpg)
Storage: Secrets Windows Azure
Storage name Storage key
SQL Azure Username Password
Once your share your secret, it’s no longer secret
![Page 11: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/11.jpg)
Storage: How to keep secrets secret?
Proxy the requests1. Client sends
data to web role2. Web role sends
data to storage
WebRole
(1)
(2)
![Page 12: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/12.jpg)
Storage: Shared Access Signatures
1. Client makes request of Web Role for SAS
2. Web Role sends client SAS
3. Client makes request4. Client gets response
WebRole
(1)
(2)(3)
(4)
![Page 13: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/13.jpg)
Storage: SQL Azure1. Client sends request to
proxy2. Proxy makes SQL call
against SQL Azure3. SQL Azure returns a
response4. Proxy returns response
to device
WebRole
(1)
(2)
(3)
(4)
![Page 14: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/14.jpg)
Storage: Offloading work with queues
1. Client writes a message to a queue
2. Worker role is polling the queue
3. Worker role finds the message
Worker Role
(1)
(2)
(3)
![Page 15: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/15.jpg)
Storage: What are the options?
Choices Direct Proxy Other
Blob (private) x x x (SAS)
Blob (public) x x (write)
x (read-only)
Table x x
Queue x x
Database x
![Page 16: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/16.jpg)
iOS and Storage
demo
![Page 17: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/17.jpg)
Identity
![Page 18: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/18.jpg)
Identity: What are the options?
Create your own Username + password, token, etc. ASP.NET Membership Providers
Use a single existing identity system Live Id, Facebook, etc. Develop directly against Identity Provider protocol
Outsource identity management Access Control Service
![Page 19: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/19.jpg)
Identity: Authenticating Users with ACS
Access Control Service
WebRole
![Page 20: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/20.jpg)
iOS and Identity
demo
![Page 21: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/21.jpg)
Communications
![Page 22: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/22.jpg)
Communications
Two forms of communication with devices Device-initiated Cloud-initiated
![Page 23: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/23.jpg)
Communications: Device-initiated
Device-initiated options HTTP-based, request/response Framework choices (WCF, OData, WebRequest, etc.)
Wire format choices (SOAP, JSON, POX, etc.)
![Page 24: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/24.jpg)
Communications: Cloud-initiated
Push Notifications Single connecting between the device and
the notification service Bandwidth- and battery-friendly No guarantee of delivery
![Page 25: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/25.jpg)
Communications: Subscribing to Push
Device requests a channel *NS returns channel Device sends URL to
cloud Channel URL is stored in
cloud Cloud sends notification *NS pushes to device
WebRole
*NS
![Page 26: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/26.jpg)
Communications: Cloud to Device
Common pattern Use cloud-initiated push to tell
the device to call to a service Cloud sends notification Notification services pushes
to device Device receives message
and calls to a service Web Role sends a response
WebRole
*NS
![Page 27: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/27.jpg)
Communications: Different notifications
Windows 8: Windows Push Notification Service (WNS)
Windows Phone: Microsoft Push Notification Service (MPNS)
iOS: Apple Push Notification Service (APNS)
Android: Cloud To Device Messaging (C2DM)
![Page 28: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/28.jpg)
iOS and Communications
demo
![Page 29: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/29.jpg)
Platform Services
![Page 30: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/30.jpg)
Platform Services Traffic Manager Content Delivery Network (CDN) SQL Azure Data Sync
SQL Azure Windows Azure Storage
Caching
![Page 31: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/31.jpg)
Putting it all together
![Page 32: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/32.jpg)
WAZ Storage
Windows Azure
Apple Push Notification
ServiceHawaii OCR &
Bing Translator
AuthenticateAccess TokenAccess TokenShared Access Signature
Any pictures?
Send ImageTranslated TextTranslated TextTranslated
Text
User Authentication
Store Image in Windows
Azure Blob Storage
SAS
Process ImageSend
Notification
Process Image
![Page 33: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/33.jpg)
Tools and Resources
![Page 34: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/34.jpg)
Toolkits Easier for device developers to use
Windows Azure Windows Phone: http://bit.ly/watwp7 iOS: http://bit.ly/watios Android: http://bit.ly/watandroid OData: http://bit.ly/odataobjc
Toolkits include: Native libraries (e.g. .NET, Objective-C) Samples Project templates Documentation
![Page 35: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/35.jpg)
Questions
![Page 36: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/36.jpg)
Windows Azure Office Hours
Talk to an expert Download the SDK and toolkits Get a free trial Enter to WIN a
Samsung Focus Windows phone
![Page 37: Scott densmore-sic-2011](https://reader033.vdocument.in/reader033/viewer/2022061303/54922471ac795963288b46a6/html5/thumbnails/37.jpg)
Vote your evaluation
This session was . . . A little lite Just right More than I hoped for!