Mobile + Cloud: Building Mobile Applications with Windows Azure Wade Wegner Blog: AZR324
Who am I?
This session is focused on building device applications with Windows Azure We’ll talk about storage, identity, communications, platform services, and tools Several demos Agenda
Features in Action
Web sites Build with ASP.NET, Node.js or PHP Deploy in seconds with FTP, Git or TFS Start for free, scale up as your traffic grows
Windows Azure Mobile Services
Storage
Storage: What are our options? Benefits: Non-relational structured storage Massive scale-out Windows Azure Tables Benefits: Big files Windows Azure Blobs Benefits: Persistent Async Messaging Enqueue, Dequeue Windows Azure Queues Benefits: Relational database Highly available Managed for you as a service Windows Azure SQL Database
Storage: Secrets Windows Azure Storage name Storage key Windows Azure SQL Database Username Password Once you share your secret, it’s no longer secret
Storage: How do we keep secrets secret? Proxy the requests Client sends data to web role Web role sends data to storage (1) (2) Web Role
Storage: Windows Azure SQL Database Client sends request to proxy Proxy makes SQL call against SQL Database SQL Database returns a response Proxy returns response to device (1) (3) Web Role (2) (4)
Storage: Using Shared Access Signatures Client makes request of Web Role for SAS Web Role sends client SAS Client makes request Client gets response (1) (3) Web Role (2) (4)
Demo
Identity
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 IdP protocol Outsource identity management Access Control Service
Security challenge Authentication Authorization User store Management UI Forget password? Customer support Data protection Integration with AD LDAP User mapping Synchronization Integration With Facebook More User mapping Facebook Auth API More Synchronization
Solution: Claim-based architecture
Demo
Identity
Communications
Communications: Device-initiated Device-initiated options HTTP-based, request/response Framework choices (WCF, Web API, OData, WebRequest, etc.) Wire format choices (SOAP, JSON, POX, etc.) - Drivers T22:12:38Z T22:12:38Z Rob Tiffany T22:12:38Z Loke Uei Tan T22:12:38Z Dan Bouie T22:12:38Z John Dietz T22:12:38Z Derek Snyder T22:12:38Z Steve Hegenderfer T22:12:38Z Chip Vollers T22:12:38Z James Pratt The same list of 8 Customers using SOAP and a DataSet dropped us down to 3 kb but still too big for my taste. 1 1 Rob Tiffany 2 1 Loke Uei Tan 3 1 Dan Bouie 4 1 John Dietz 5 2 Derek Snyder 6 2 Steve Hegenderfer 7 2 Chip Vollers 8 2 James Pratt <ArrayOfDriver xmlns= xmlns:i=" 1 1 Rob Tiffany 1 2 Loke Uei Tan 1 3 Dan Bouie 1 4 John Dietz 2 5 Derek Snyder 2 6 Steve Hegenderfer 2 7 Chip Vollers 2 8 James Pratt [{"DistributionCenterId":1,"DriverId":1,"FirstName":"Rob","LastName":"Tiffany"}, {"DistributionCenterId":1,"DriverId":2,"FirstName":"Loke Uei","LastName":"Tan"}, {"DistributionCenterId":1,"DriverId":3,"FirstName":"Dan","LastName":"Bouie"}, {"DistributionCenterId":1,"DriverId":4,"FirstName":"John","LastName":"Dietz"}, {"DistributionCenterId":2,"DriverId":5,"FirstName":"Derek","LastName":"Snyder"}, {"DistributionCenterId":2,"DriverId":6,"FirstName":"Steve","LastName":“Harris"}, {"DistributionCenterId":2,"DriverId":7,"FirstName":"Chip","LastName":"Vollers"}, {"DistributionCenterId":2,"DriverId":8,"FirstName":"James","LastName":"Pratt"}] OData – XML 8.5kb REST-XML 1.2kb JSON 639 bytes
Communications: Cloud-initiated Push Notifications !Raaawww
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 Web Role *NS (1)(2) (3) (4) (5)
Communications: Cloud-initiated 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 Web Role *NS (3) (2) (4) (1)
Notifications: Different services Windows 8: Windows Phone: iOS: Android:
Demo
Platform services
Application Building Blocks
Tools & Resources
Windows Azure Toolkits for Devices Easier for device developers to use Windows Azure AndroidiOSWindows Phone
Devices + Cloud Summary Toolkits Storage Identity Communications Platform Services