Windows Azure Mobile Services - The Perfect Partner


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • We would not be able to host M3Conf the way we envision without the generous support of our wonderful sponsors.
  • Windows Azure National ArchitectWindows Azure MVPHelp customers nationwide with their Windows Azure projects. This can include architectural design sessions, training, development, evangelism, etc.Reach me via email, Twitter, or my blog.
  • "Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction."
  • Many advantages of cloud . . .
  • Build out services individually – lots of extra workNot something many mobile app developers want to do – want to FOCUS ON THE APPMessaging – Push Notifications and Service BusUnstructured Storage (tables, blobs, queues)
  • MobileServiceClientMobileServiceTableMobileServices.js
  • Demo the New Mobile Service Create a new Windows 8 application experience in the portalVery fast provisioningBuilt on Windows Azure Web Sites
  • * Ability to access Windows Azure Service Bus too.
  • X-ZUMO-APPLICATION – The application key of the mobile service.X-ZUMO-AUTH - The service-generated authentication token for an authenticated user. You must specify a token for an authenticated user when required to access the table operation.X-ZUMO-MASTER - The service master key. 
  • Show data in management portal and SQL Management Studio
  • Pre-Scripting- User authentication (populates the ‘user’ object)- Single JSON object (no array)Pre-Storage- Final validation layer: no complex objects- Capture and log errors
  • not yet published – should be coming soon.
  • Show push notifications, twilio, sendgrid, etc.
  • OAuthRenders the OAuth web interface for the selected provider.
  • OAuthRenders the OAuth web interface for the selected provider.
  • Show hooking up Windows Live
  • Show hooking up Windows Live
  • 1 Mobile Service = 1 backend for an app. Each mobile service can utilize multiple features ie a mobile service for to do app can use user auth, multiple types of push, and structured storage and still count as one mobile service.WA free trial DB expires after 90 days. Important to note that BizSpark and MSDN subscriptions provide longer free DB.Reserved offers 100 mobile services and unlimited outbound data (5GB free promotion).Preview: $0.08/hourGA: $0.12/hr
  • Preview: $0.08/hourGA: $0.12/hr
  • Windows Azure Mobile Services - The Perfect Partner

    1. 1. M3October 26th, 2012
    2. 2. National Architect,Windows
    3. 3. Image courtesy of Windows Azure Training Kit
    4. 4. Elastic ScaleNear-infinite CapacityConsumption-based PricingNo Long-Term CommitmentsHigh ReliabilityGlobal Presence vs.
    5. 5. Mobility CloudLimited Compute Virtually Limitless ComputeLimited Storage Virtually Limitless StorageConnect from Anywhere Services via the internet Standards based accessible APIsRapidly Growing Market Scale and Elasticity
    6. 6. Identity Structured Storage Messaging Windows Azure MobileUnstructured Storage Windows Azure Mobile Services Services MediaAdditional Services
    7. 7. Image courtesy of Windows Azure Training Kit
    8. 8. • Official SDKs for Windows 8 and iOS• JavaScript library• Android and Windows Phone coming soon Image courtesy of
    9. 9. Getting Started
    10. 10. Application KeyNOT A SECURITY TOKEN/CONTROLHint that user is coming from your app (reduce chance of misuse)Private until you publish the appMaster KeyAll powerfulDo NOT distribute with your applicationUse from server-side logic you control
    11. 11. Leverage Windows Azure Storage Tables: schemaless entity storage; NoSQL Blobs: storage for any binary object (files . . . whatever you want) Queues: simple messaging (push/pop)Access via Windows Azure module for node.js var azure = require(azure); var tableService = azure.createTableService(‘<storage account>,‘<storage key>,; tableService.insertEntity(‘<table>’, entity, function(error) { });
    12. 12. Leverage strengths of Windows Azure SQL DatabaseNew or Existing DatabaseReporting, TSQL support, existing tools, etc.Manage your way (portal, REST API, SSMS, etc.)Partition applications by schemaApp1.UsersApp2.UsersDynamic Schema Support (on/off)
    13. 13. REST APIOData InterfaceGET, POST, PATCH, DELETEhttps://<service><table_name>/{<item_id>}Authorization X-ZUM0-{APPLICATION | AUTH | MASTER}Send JSON in request bodyReceive JSON as response
    14. 14. It’s Your Data
    15. 15. Never trust the client!Handled via JavaScript scripts on the serverIntercept CRUD operations and apply your logic node.js Scripting Pre-Scripting Pre-Storage DB function(item, user, request) { ….. } User authentication Dynamic schematization Payload verification Final checks
    16. 16. Known objects and modulesazuresendgridconsolemssql var SendGrid = require(sendgrid).SendGrid;push var sendgrid = new SendGrid(‘<account>, ‘<password>);statusCodes sendgrid.send({ to: userItem.EmailAddress,table from:,request subject: New ToDoItem Added!!, text: A new MyToDoItem was added: + item.text},crypto function(success, message) {util // If the email failed to send, log it as an error. if (!success) { console.error(SendGrid Error! + message); } });
    17. 17. Microsoft Push Notification Service MobileDevice 1. Register channel with app Services
    18. 18. Obtain WNS client secret and package SID from Windows devportal.Enter WNS information to Mobile Services portal.Ability to send Tile, Toast, Badge, and Raw notifications.push.wns.* Node.js module to create push notifications Handles authentication against WNS
    19. 19. Server Scripts
    20. 20. Microsoft Account – Use the Live SDK Tight integration with Windows Live services
    21. 21. Microsoft Account, Facebook, Twitter, and GoogleOAuthDoes not use Windows Azure ACS
    22. 22. Table level authorization for CRUD operations Everyone: any request by anyone is accepted. Anyone with Application Key: app key distributed w/ the app (default) Authenticated Users: users authenticated by Live Connect. Scripts and Admins: registered scripts or requests via the master keyYour application can add whatever other authorization is needed.
    23. 23. Server script to match against your table (role-based access, specificuser, etc.)Match against user.userId
    24. 24. Adding User Authentication
    25. 25. • API Calls• CPU Time• Data Out
    26. 26. console objectlog(formatString, obj, .. .)info(…)warn(…)error(…)
    27. 27. ComputeScale out number of instancesScale up the VM sizeStorageDedicated SQL DatabaseLarger sized SQL Database
    28. 28. Diagnostics, Logging, and Scale
    29. 29. Official Android and Windows Phone SDKs coming soonOfficial iOS SDK in Preview on GitHub Windows Phone: MonoTouch (iOS and Android): Windows Azure Evangelist (iOS and Android)REST API
    30. 30. 10 MobileServices 1GB SQL From WA Free Trial Database No SLA during Preview. Only small instances available. Can upgrade to a reserved instance at 33% discount from normal Pay-As-You-Go rates during Preview. Source: Windows Azure Training Kit
    31. 31. Shared Instance Reserved InstanceMultitenant Environment Private VM (3 instance max) Small Only (1.6GHz, 1.75 GB, 225 GB Storage)10 mobile service applications 100 mobile service applicationsFree Same rate as Windows Azure Web SitesService Level AgreementPreview – No availability SLAGA – 99.9%
    32. 32.
    33. 33. • Windows Azure Mobile Services –• SDK and Samples available on GitHub –• Inside Windows Azure Mobile Services – Mobile-Services• Josh Twist’s Blog –• Carlos Figueira’s Blog –• Windows Azure FREE Trial –