Cloud Powered Mobile Apps
with Azure
Kris Wagner, Microsoft MVP
<Presenter Title>
Tahoe Partners @SharePointKirs Microsoft Azure
Agenda
2
Mobile Services Features and Demos
Advanced Features Scaling and Pricing
Questions
What is Mobile Services?
3
Storage
Authentication
Logic
Push
Scheduler
Demo: Getting Started
Your first Mobile Service
Structured Storage
• Powered by SQL Database
• Supports rich querying capabilities
• Dynamic Schematization
• Data management in:
• Azure Portal
• SQL Portal (Silverlight)
• SQL Management Studio
• REST API
• Azure CLI Tools
• SQL CLI
5Microsoft Azure
The REST API
6
Action HTTP Method URL Suffix
Create POST /TodoItem
Read GET /TodoItem?filter=id%3D42
Update PATCH /TodoItem/id
Delete DELETE /TodoItem/id
Microsoft Azure
Base Endpoint: https://MobileService.azure-
mobile.net/tables/*
JSON to SQL Type Mappings
7
JSON Type T-SQL Type
Numeric values (integer, decimal,
floating point)
Float(53)
Boolean bit
DateTime DateTimeOffset(3)
String Nvarchar(max)
Microsoft Azure
Auto-generated Columns
• id – unique guid
• __createdAt – date
• __updatedAt – date
• __version – timestamp
• Helps with concurrency and offline
8Microsoft Azure
Backend Logic:
JavaScript & .NET
Server Side Table Scripts
10
Node.js scripts
Intercept CRUD
requests to tables
Passes through to SQL
by default
Fully customizable
.NET Web API
backend in
Visual Studio
MongoDB, Table
Storage, SQL out of the
box
Node Modules
11
request push.*
console mssql
tables azure
sendgrid
pusher
twilio
Demo: Customizing Logic
Adding Data Validation
.NET Backend
• Web API based w/ additional functionality, developed in and deployed
from Visual Studio
• TableController data context can map to SQL, Table Storage, Mongo, etc
• Pull in NuGet modules and other .NET libraries
• Set permissions with attributes on classes
• Local Debug
13Microsoft Azure
Custom API
• Non-table based endpoints
• Accessible from
• GET
• POST
• PUT
• PATCH
• DELETE
• For node.js logic in scripts like table endpoints
• For .NET delivered through a WebAPI
• Expose any functionality you want
14Microsoft Azure
File Storage
• Don’t store files in Mobile Services DB
• Use Mobile Service to provide a Valet Key Pattern to Blob Storage,
aka BLOB SAS
• Create table / custom API script to talk to Blob Storage
• Script generates Shared Access Signature (SAS) URL
• Script returns SAS URL to client app
• Client app uploads data to blob storage directly
• Store file URL in Mobile Service DB as needed
• Blob storage costs less and is built for redundant file storage
• Resource Broker extension for .NET and Node backends
15Microsoft Azure
Push Notifications
Push Notification Flow
17Microsoft Azure
Demo: Adding Push Notifications
Notification Hubs
• Separate from Mobile Services
• Can be used regardless of whether you’re storing data in Azure
• Extremely scalable push notifications
• Cross platform support
• Push to iOS, Android, Kindle, Windows Phone, Windows Store
• Tags (i.e. tie my registration to this topic or user ID)
• Templates (i.e. when I get a push, send it in this format)
• Server SDKs for .NET, Java, and Node (also open as REST API)
19Microsoft Azure
Authorization
&
Authentication
Data Authorization
Per HTTP method auth options:
• App Key Required
• Not ideal for production use
• Everyone
• Authenticated Users
• Admins and other scripts
• Requires Master Key as header
401 Unauthorized response if security check fails
21Microsoft Azure
User Auth Flow (server)
22Microsoft Azure
GOOGLE
FACEBOOK
TWITTER
MOBILE SERVICE
DEVICE
MICROSOFT
ACCOUNT
AAD
User Auth Flow (client)
23Microsoft Azure
GOOGLE
FACEBOOK
TWITTER
MOBILE SERVICE
DEVICE
MICROSOFT
ACCOUNT
AAD
The User object
User.level
• Admin
• Authenticated
• Anonymous
User.userId
• Provider:id or undefined
User.getIdentities()
• UserId
• Provider Access Token / Secret
• Basic user information (i.e. name, username, locale, picture, link)
24Microsoft Azure
Demo: Adding Auth
Lock Down and Login
Offline Sync
Offline support
TableController
(with optimistic
concurrency)
Mobile ServiceDevice
SQL Database
BYOD
MongoDB
Table Storage
SQLite
Explicit Push/Pull
Conflict resolution
Offline Sync: Potential Uses
• Improve app responsiveness by caching server data
locally on the device
• Make apps resilient against intermittent network
connectivity
• Allow end-users to create and modify data even when
there is no network access, supporting scenarios with
little or no connectivity
• Sync data across multiple devices and detect conflicts
when the same record is modified by two devices
28
Scheduler
Scheduled Jobs
• Executes a script on defined schedule
• Can be run on demand
• Ideal for any backend data processing job
• Length / frequency based of Mobile Service tier
30Microsoft Azure
Script
Source
Control
Script Source Control
• Creates a Git repo in Azure
• Node.js only, turned on by default
• Access table, scheduler, custom API, shared scripts and permissions
• Pushing changes triggers a redeploy of your Mobile Service
• Enables installing NPM modules (for Node backends)
• Shared Scripts
• Create scripts that can be used from all other scripts in your Service
32Microsoft Azure
Diagnostics
Logging
Scale
Diagnostics, Logging, Scale
34
API Calls, # of Devices,
Data Out
Console Logging (auto
error logging)
Scale Service Based off API
Calls
Auto-scale to Save Money
Free Tier for Mobile Free Tier for SQL
Mobile Service Scaling
 Free: 500k calls / month / subscription
 Basic: 1.5M calls / unit (6) / month
 Standard: 15M calls / unit (10) / month
Microsoft Azure
Demo: Scaling
Leaving Free Mode and Turning on AutoScale
Command
Line
Interface
CLI
38
Create / Delete Services Inspect / Delete Table Data
Create / Update / Delete
Tables and Permissions
Create / Upload / Delete
Scripts
Scale Up / Down Services Much More Across Azure
Demo: Using the CLI
Mobile Service Tiers
40
General Availability
99.9%
Free Basic Standard
Usage
Restrictions
Up to 10 services,
Up to 500 Active
Devices*
N/A N/A
API Calls 500K
(per subscription)
1.5M
(per unit)
15M
(per unit)
Scale N/A Up to 6 (in portal) Up to 10 (in portal)
Scheduled
Jobs
Limited Included Included
SQL
Database
(required)
20MB free DB 20MB free DB 20MB free DB
*Active devices refers to the number of physical devices and
emulators that make at least one call to or receive a push
notification from your mobile service.
Azure Mobile Services
41
Storage
Authentication
Logic
Push
Scheduler
Resources
• Get a FREE Microsoft Azure Trial Account:
• http://azure.microsoft.com
• Videos, Tutorials, and More
• http://azure.microsoft.com/mobile
• SDK Source Code on GitHub
• https://github.com/Azure/azure-mobile-services
• Contact Details
• <Contact Info>
42Microsoft Azure
Get started
Visit azure.microsoft.com
Cloud Powered Mobile Apps  with Azure
Azure
footprint
16 regions worldwide in 2014
Fortune 500 using Azure
>57% >250k
Active websites
Greater than
1,000,000
SQL Databases in Azure
>20TRILLION
storage
objects >300MILLION
AD users
>13BILLION
authentication/wk
>2
MILLION
requests/sec >1MILLION
Developers
registered with
Visual Studio
Online
Cloud Powered Mobile Apps  with Azure

More Related Content

PPTX
Introduction to Azure Functions
PPTX
Mobile Services for Windows Azure
PPTX
Cloud Powered Mobile Apps with Azure
PDF
Developing scalable enterprise serverless applications on azure with .net
PPTX
Serverless integrations using Azure Logic Apps (intro)
PPTX
Securing an Azure Function REST API with Azure Active Directory
PPTX
2 Speed IT powered by Microsoft Azure and Minecraft
PPTX
Windows Azure Mobile Services, Connecting Cross Platform Devices
Introduction to Azure Functions
Mobile Services for Windows Azure
Cloud Powered Mobile Apps with Azure
Developing scalable enterprise serverless applications on azure with .net
Serverless integrations using Azure Logic Apps (intro)
Securing an Azure Function REST API with Azure Active Directory
2 Speed IT powered by Microsoft Azure and Minecraft
Windows Azure Mobile Services, Connecting Cross Platform Devices

What's hot (20)

PPTX
Developing serverless applications with azure functions
PPTX
Windows Azure Active Directory
PPTX
Azure Logic Apps and Microsoft Flows
PPTX
Cloud Dev with Azure Functions - DogFoodCon 2018 - Brian T Jackett
PPTX
Real World Architectures Using Windows Azure Mobile Services
PPTX
Easy Auth Overview - Tokyo Azure Meetup - Feb 2018
PPTX
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
PDF
Going serverless with azure functions
PPTX
Azure Logic Apps
PPTX
Azure functions: Build apps faster with serverless architecture (March 2018)
PPTX
Azure Mobile Services
PPTX
No SQL, No Problem: Use Azure DocumentDB
PDF
Experiences using CouchDB inside Microsoft's Azure team
PPTX
Go Serverless with Cosmos DB, Azure Functions and Blazor
PPTX
Workflow All the Things with Azure Logic Apps
PPTX
Integrating SaaS application using Microsoft’s Azure App Service Platform
PPTX
Real Time Power BI
PPTX
Real-time web applications using SharePoint, SignalR and Azure Service Bus
PPTX
Build 2017 - P4062 - Delivering world-class game experiences using Microsoft ...
PPTX
Azure IoT, Power BI and Sharepoint Online
Developing serverless applications with azure functions
Windows Azure Active Directory
Azure Logic Apps and Microsoft Flows
Cloud Dev with Azure Functions - DogFoodCon 2018 - Brian T Jackett
Real World Architectures Using Windows Azure Mobile Services
Easy Auth Overview - Tokyo Azure Meetup - Feb 2018
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Going serverless with azure functions
Azure Logic Apps
Azure functions: Build apps faster with serverless architecture (March 2018)
Azure Mobile Services
No SQL, No Problem: Use Azure DocumentDB
Experiences using CouchDB inside Microsoft's Azure team
Go Serverless with Cosmos DB, Azure Functions and Blazor
Workflow All the Things with Azure Logic Apps
Integrating SaaS application using Microsoft’s Azure App Service Platform
Real Time Power BI
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Build 2017 - P4062 - Delivering world-class game experiences using Microsoft ...
Azure IoT, Power BI and Sharepoint Online
Ad

Viewers also liked (20)

PPTX
Azure Mobile Apps with Xamarin
PPTX
Xamarin + azure Mobile Apps
PPTX
Xamarin Dev Days - Connected & Disconnected Apps with Azure Mobile Apps
PPTX
Cross Platform Mobile Development with Xamarin
PDF
Apache flume by Swapnil Dubey
PDF
Xamarin & Azure - BFF, Really?
PPTX
Windows Azure & How to Deploy Wordress
PDF
Azure paa s v2 – microservices, microsoft (azure) service fabric, .apps and o...
PDF
Introdução ao Azure Mobile Apps
PPTX
Capture the Cloud with Azure
PDF
Account Planning in Salesforce (January 21, 2016)
PPTX
Continuous delivery with azure app service
PDF
Cloud Foundry Summit 2015: 12 Factor Apps For Operations
PPTX
Windows Azure Platform
PPTX
Azure app service to create web and mobile apps
PDF
JavaOne 2015: 12 Factor App
PPTX
The new Azure App Service Architecture
PPTX
Azure service fabric: a gentle introduction
PDF
Distributed Computing made easy with Service Fabric
PPTX
Azure app services API apps
Azure Mobile Apps with Xamarin
Xamarin + azure Mobile Apps
Xamarin Dev Days - Connected & Disconnected Apps with Azure Mobile Apps
Cross Platform Mobile Development with Xamarin
Apache flume by Swapnil Dubey
Xamarin & Azure - BFF, Really?
Windows Azure & How to Deploy Wordress
Azure paa s v2 – microservices, microsoft (azure) service fabric, .apps and o...
Introdução ao Azure Mobile Apps
Capture the Cloud with Azure
Account Planning in Salesforce (January 21, 2016)
Continuous delivery with azure app service
Cloud Foundry Summit 2015: 12 Factor Apps For Operations
Windows Azure Platform
Azure app service to create web and mobile apps
JavaOne 2015: 12 Factor App
The new Azure App Service Architecture
Azure service fabric: a gentle introduction
Distributed Computing made easy with Service Fabric
Azure app services API apps
Ad

Similar to Cloud Powered Mobile Apps with Azure (20)

PPTX
Cnam cours azure zecloud mobile services
PPTX
Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...
PPTX
Cloud Powered Mobile Apps with Azure
PPTX
Cloud Powered Mobile Apps With Azure
PPTX
2015.04.23 Azure Mobile Services
PPTX
Windows Azure Mobile Services - The Perfect Partner
PPTX
Get started azure- Azure Mobile Services
PPTX
Azure Mobile Services
PPTX
Azure Mobile Services Workshop
PPTX
Azure Mobile Service - Techdays 2014
PPTX
Building a chat app with windows azure mobile services
PDF
Uwams cloud enable-windows_store_apps_java_script
PDF
Using Windows Azure Mobile Services to Cloud-Enable
PPTX
World Azure Day Mobile Services Presentation
PPTX
Building a chat app with windows azure mobile
PPTX
Windows Azure Mobile Services - The Perfect Partner
PPTX
Azure: un parque de diversiones en la nube para el desarrollador moderno by A...
PPTX
Windows Azure - Mobile Services
PPTX
Pune microsoft azure developers 2nd meetup
PPTX
Azure mobile apps
Cnam cours azure zecloud mobile services
Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...
Cloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps With Azure
2015.04.23 Azure Mobile Services
Windows Azure Mobile Services - The Perfect Partner
Get started azure- Azure Mobile Services
Azure Mobile Services
Azure Mobile Services Workshop
Azure Mobile Service - Techdays 2014
Building a chat app with windows azure mobile services
Uwams cloud enable-windows_store_apps_java_script
Using Windows Azure Mobile Services to Cloud-Enable
World Azure Day Mobile Services Presentation
Building a chat app with windows azure mobile
Windows Azure Mobile Services - The Perfect Partner
Azure: un parque de diversiones en la nube para el desarrollador moderno by A...
Windows Azure - Mobile Services
Pune microsoft azure developers 2nd meetup
Azure mobile apps

More from Kris Wagner (8)

PPTX
CRM Online + Social Listening
PDF
Hooking SharePoint APIs with Android
PDF
Azure AD OAuth in Office 365
PDF
Empower Enterprise Mobility with Microsoft EMS
PDF
Hooking into Apps for SharePoint
PPTX
GAB Intro to Azure & Hands on Lab
PPTX
Microsoft Azure Identity and O365
PDF
The Social Side Of SharePoint
CRM Online + Social Listening
Hooking SharePoint APIs with Android
Azure AD OAuth in Office 365
Empower Enterprise Mobility with Microsoft EMS
Hooking into Apps for SharePoint
GAB Intro to Azure & Hands on Lab
Microsoft Azure Identity and O365
The Social Side Of SharePoint

Recently uploaded (20)

PPT
Geologic Time for studying geology for geologist
PDF
Comparative analysis of machine learning models for fake news detection in so...
PPTX
Configure Apache Mutual Authentication
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Five Habits of High-Impact Board Members
PPT
Module 1.ppt Iot fundamentals and Architecture
DOCX
search engine optimization ppt fir known well about this
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Modernising the Digital Integration Hub
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PPTX
Microsoft Excel 365/2024 Beginner's training
Geologic Time for studying geology for geologist
Comparative analysis of machine learning models for fake news detection in so...
Configure Apache Mutual Authentication
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Benefits of Physical activity for teenagers.pptx
Five Habits of High-Impact Board Members
Module 1.ppt Iot fundamentals and Architecture
search engine optimization ppt fir known well about this
TEXTILE technology diploma scope and career opportunities
Consumable AI The What, Why & How for Small Teams.pdf
A contest of sentiment analysis: k-nearest neighbor versus neural network
Modernising the Digital Integration Hub
The influence of sentiment analysis in enhancing early warning system model f...
NewMind AI Weekly Chronicles – August ’25 Week III
Taming the Chaos: How to Turn Unstructured Data into Decisions
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
CloudStack 4.21: First Look Webinar slides
Convolutional neural network based encoder-decoder for efficient real-time ob...
Microsoft Excel 365/2024 Beginner's training

Cloud Powered Mobile Apps with Azure

  • 1. Cloud Powered Mobile Apps with Azure Kris Wagner, Microsoft MVP <Presenter Title> Tahoe Partners @SharePointKirs Microsoft Azure
  • 2. Agenda 2 Mobile Services Features and Demos Advanced Features Scaling and Pricing Questions
  • 3. What is Mobile Services? 3 Storage Authentication Logic Push Scheduler
  • 4. Demo: Getting Started Your first Mobile Service
  • 5. Structured Storage • Powered by SQL Database • Supports rich querying capabilities • Dynamic Schematization • Data management in: • Azure Portal • SQL Portal (Silverlight) • SQL Management Studio • REST API • Azure CLI Tools • SQL CLI 5Microsoft Azure
  • 6. The REST API 6 Action HTTP Method URL Suffix Create POST /TodoItem Read GET /TodoItem?filter=id%3D42 Update PATCH /TodoItem/id Delete DELETE /TodoItem/id Microsoft Azure Base Endpoint: https://MobileService.azure- mobile.net/tables/*
  • 7. JSON to SQL Type Mappings 7 JSON Type T-SQL Type Numeric values (integer, decimal, floating point) Float(53) Boolean bit DateTime DateTimeOffset(3) String Nvarchar(max) Microsoft Azure
  • 8. Auto-generated Columns • id – unique guid • __createdAt – date • __updatedAt – date • __version – timestamp • Helps with concurrency and offline 8Microsoft Azure
  • 10. Server Side Table Scripts 10 Node.js scripts Intercept CRUD requests to tables Passes through to SQL by default Fully customizable .NET Web API backend in Visual Studio MongoDB, Table Storage, SQL out of the box
  • 11. Node Modules 11 request push.* console mssql tables azure sendgrid pusher twilio
  • 13. .NET Backend • Web API based w/ additional functionality, developed in and deployed from Visual Studio • TableController data context can map to SQL, Table Storage, Mongo, etc • Pull in NuGet modules and other .NET libraries • Set permissions with attributes on classes • Local Debug 13Microsoft Azure
  • 14. Custom API • Non-table based endpoints • Accessible from • GET • POST • PUT • PATCH • DELETE • For node.js logic in scripts like table endpoints • For .NET delivered through a WebAPI • Expose any functionality you want 14Microsoft Azure
  • 15. File Storage • Don’t store files in Mobile Services DB • Use Mobile Service to provide a Valet Key Pattern to Blob Storage, aka BLOB SAS • Create table / custom API script to talk to Blob Storage • Script generates Shared Access Signature (SAS) URL • Script returns SAS URL to client app • Client app uploads data to blob storage directly • Store file URL in Mobile Service DB as needed • Blob storage costs less and is built for redundant file storage • Resource Broker extension for .NET and Node backends 15Microsoft Azure
  • 18. Demo: Adding Push Notifications
  • 19. Notification Hubs • Separate from Mobile Services • Can be used regardless of whether you’re storing data in Azure • Extremely scalable push notifications • Cross platform support • Push to iOS, Android, Kindle, Windows Phone, Windows Store • Tags (i.e. tie my registration to this topic or user ID) • Templates (i.e. when I get a push, send it in this format) • Server SDKs for .NET, Java, and Node (also open as REST API) 19Microsoft Azure
  • 21. Data Authorization Per HTTP method auth options: • App Key Required • Not ideal for production use • Everyone • Authenticated Users • Admins and other scripts • Requires Master Key as header 401 Unauthorized response if security check fails 21Microsoft Azure
  • 22. User Auth Flow (server) 22Microsoft Azure GOOGLE FACEBOOK TWITTER MOBILE SERVICE DEVICE MICROSOFT ACCOUNT AAD
  • 23. User Auth Flow (client) 23Microsoft Azure GOOGLE FACEBOOK TWITTER MOBILE SERVICE DEVICE MICROSOFT ACCOUNT AAD
  • 24. The User object User.level • Admin • Authenticated • Anonymous User.userId • Provider:id or undefined User.getIdentities() • UserId • Provider Access Token / Secret • Basic user information (i.e. name, username, locale, picture, link) 24Microsoft Azure
  • 25. Demo: Adding Auth Lock Down and Login
  • 27. Offline support TableController (with optimistic concurrency) Mobile ServiceDevice SQL Database BYOD MongoDB Table Storage SQLite Explicit Push/Pull Conflict resolution
  • 28. Offline Sync: Potential Uses • Improve app responsiveness by caching server data locally on the device • Make apps resilient against intermittent network connectivity • Allow end-users to create and modify data even when there is no network access, supporting scenarios with little or no connectivity • Sync data across multiple devices and detect conflicts when the same record is modified by two devices 28
  • 30. Scheduled Jobs • Executes a script on defined schedule • Can be run on demand • Ideal for any backend data processing job • Length / frequency based of Mobile Service tier 30Microsoft Azure
  • 32. Script Source Control • Creates a Git repo in Azure • Node.js only, turned on by default • Access table, scheduler, custom API, shared scripts and permissions • Pushing changes triggers a redeploy of your Mobile Service • Enables installing NPM modules (for Node backends) • Shared Scripts • Create scripts that can be used from all other scripts in your Service 32Microsoft Azure
  • 34. Diagnostics, Logging, Scale 34 API Calls, # of Devices, Data Out Console Logging (auto error logging) Scale Service Based off API Calls Auto-scale to Save Money Free Tier for Mobile Free Tier for SQL
  • 35. Mobile Service Scaling  Free: 500k calls / month / subscription  Basic: 1.5M calls / unit (6) / month  Standard: 15M calls / unit (10) / month Microsoft Azure
  • 36. Demo: Scaling Leaving Free Mode and Turning on AutoScale
  • 38. CLI 38 Create / Delete Services Inspect / Delete Table Data Create / Update / Delete Tables and Permissions Create / Upload / Delete Scripts Scale Up / Down Services Much More Across Azure
  • 40. Mobile Service Tiers 40 General Availability 99.9% Free Basic Standard Usage Restrictions Up to 10 services, Up to 500 Active Devices* N/A N/A API Calls 500K (per subscription) 1.5M (per unit) 15M (per unit) Scale N/A Up to 6 (in portal) Up to 10 (in portal) Scheduled Jobs Limited Included Included SQL Database (required) 20MB free DB 20MB free DB 20MB free DB *Active devices refers to the number of physical devices and emulators that make at least one call to or receive a push notification from your mobile service.
  • 42. Resources • Get a FREE Microsoft Azure Trial Account: • http://azure.microsoft.com • Videos, Tutorials, and More • http://azure.microsoft.com/mobile • SDK Source Code on GitHub • https://github.com/Azure/azure-mobile-services • Contact Details • <Contact Info> 42Microsoft Azure
  • 46. Fortune 500 using Azure >57% >250k Active websites Greater than 1,000,000 SQL Databases in Azure >20TRILLION storage objects >300MILLION AD users >13BILLION authentication/wk >2 MILLION requests/sec >1MILLION Developers registered with Visual Studio Online

Editor's Notes

  • #3: Speaking Points: Topics covered in the session include What is Microsoft Azure What is Mobile Services, a feature of Azure Features and demos Advanced features throughout the session Scaling and pricing details Questions at the end
  • #4: Speaking Notes Azure Mobile Services is a Backend-as-a-Service Instead of you having to design, build, test, deploy, manage, and upgrade your whole backend, we do it for you Features of Mobile Services Storage – SQL DB Authentication – built in support for social providers w/ ability to custom auth Backend logic – data validation, logical flows, etc Push Notifications – across all major mobile platforms Scheduler – backend job processing
  • #5: Demo: Getting Started Go to the portal Create a new mobile service (Node backend works with most of deck) Walk through Getting started screen Choose platform Download quick start Run quick start Save and update data Show data in portal (Node) Walk through client code that deals with Mobile Service
  • #6: Speaking points Mobile Service easily connects to SQL Database SQL offers rich querying and indexing capabilities Dynamic Schematization means you don’t have to be a DBA and manage schema Data can be managed in: Azure Portal (read and delete data) SQL Portal (Silverlight) SQL Management Studio (windows) REST API (used by SDKs) Azure CLI tools SQL CLI (Node module)
  • #7: Speaking points This is the mapping for the REST API exposed by table storage Standard REST Anything that can talk REST can connect to your Mobile Service
  • #8: Speaking points JSON to SQL mapping Whatever JSON data type on left is passed in generates column of SQL type on right
  • #9: Speaking notes Auto-generated columns id – unique id used to handle querying, updating, and deleting specific rows createdAt, updatedAt, version help with optimistic concurrency (first update wins) Last three columns not pulled to client by default (Need to specify query parameter to get those back)
  • #10: Speaking points * Section change: Backend Logic
  • #11: Speaking points Node backend generates Node scripts for each table action Scripts intercept CRUD requests Pass to SQL by default Custom logic added here Edit in portal (NODE) .NET Backend creates Visual Studio project
  • #12: Speaking points Node backend comes with pre-included modules Request – make web requests against other services Push.* - perform push notifications Console – log information Mssql – call stored procedures / custom SQL Tables – OO way of accessing tables in backend Azure – access service bus, blob, table storage, notification hubs, etc Partners Sendgrid – send emails Pusher – web socket style communications Twilio – SMS and voice Most have a free tier you can use
  • #13: Demo: Customizing logic If using quick start Go into insert script and add validation to check length of item.text field Run app and show validation catching Show app still working if validation is fulfilled
  • #14: Speaking points .NET backend is currently in preview Bases off of Web API Develop and deploy in VS (also create new Mobile Services with VS project template) Debug locally Can pull in NuGet and other .NET libs TableController is base for accessing data, can be overridden to talk to Table Storage, Mongo, etc Permissions handled as attributes on classes
  • #15: Speaking points All scripts so far tied to a table action Custom APIs are non-table based endpoints Script functionality for normal HTTP methods
  • #16: File storage SQL DB for Mobile Services not ideal for file data storage Best practice is to use Mobile Service as Proxy Mobile Service script generates SAS URL Client uploads file to SAS URL Valet Key Pattern http://msdn.microsoft.com/en-us/library/dn568102.aspx
  • #17: Speaking points Section change: Push Notifications
  • #18: Speaking points Push notifications work the same no matter which client you’re working with Client talks to PNS to register for push Client gets token, passes to Mobile Service Mobile Service asks PNS to deliver payload to token / channel URI / registration ID PNS delivers push to client app PNS = Push Notification Service (i.e. MPNS, WNS, GCM, ADM, APNS)
  • #19: Demo: Adding Push Configure server side for push (Apple Dev portal / Android portal / Win Portal) Copy certificate / api key / etc to Azure portal Set up push on client Enable push from server to client
  • #20: Speaking points Notification Hubs are a separate service from Mobile Services but also used by Mobile Services Pushes to iOS, Android, Kindle, Windows Phone, Windows Store Extremely scalable (millions of pushes in minutes) Tags and templates Server SDKs: .NET, Java (beta), Node, REST API
  • #21: Speaking points Section change: Authorization and Authentication Controlling who can access what
  • #22: Speaking points Data auth – locking data down Default is App Key Required, great for pre-release time period Not production ready due to key’s accessibility in public apps Authenticated users – requests must contain user ID and matching auth token Admins and other scripts – only external requests with Master Key make it through Otherwise 401 is returned
  • #23: Speaking Points Server auth flow uses OAUTH Mobile Service is registered with provider to allow auth Client calls auth method and passes in provider name User authenticates, Mobile Service and provider do OAUTH User ID and token (for Mobile Service) returned to client Provider token / secret accessible in Mobile Service
  • #24: Speaking points Client flow uses SDKs for provider / platform User auths using SDK on client Provider token / secret sent to Mobile Service Mobile Service checks validity and hands back user ID and token
  • #25: Speaking points User level indicates if they’ve logged in or came across with master key User ID for user making the request GetIdentities can be called to get provider token / secret and basic information from provider
  • #26: Demo: adding auth Lock table operations down to authenticated users Attempt to access and show 401 on client Set up auth provider and mobile service in portal Add auth code to client Show auth working Add logic to insert script to tie data to user Add logic to read script to only fetch data user can access
  • #27: Speaking notes Subject change: Scheduler
  • #30: Speaking notes Subject change: Scheduler
  • #31: Speaking points Schedule jobs (scripts) can be run by the scheduler Ideal for any backend job processing (regular push notification, remove old data, etc) Length and how often you can run job based off tier of your mobile service
  • #32: Speaking points Subject change: Script source control
  • #33: Speaking points Script source control creates GIT repo for all scripts and permission JSON files Enables you to pull scripts down and edit locally Lets you create shared scripts to reuse code Enables installing of NPM modules (Node)
  • #34: Speaking points Subject change: diagnostics, logging, scale
  • #35: Speaking points Some default stats like # of api calls, # of devices connecting, amount of data out Api calls are important because that’s how mobile services’ scale is baed All console statements and errors go to logging area Auto-scaling helps save money Free tier for Mobile Services and SQL while developing
  • #36: Speaking points Scaling Free 500k / month / sub (across entire subscription is important distinction) Basic 1.5M / unit / month (up to 6 units) Standard 15M / unit / month (up to 10 units) More units available by contacting support
  • #37: Demo: Scaling Go to scaling tab Go to Standard mode Turn on auto-scaling Explain that additional units will only be turned on / used if you need them based off daily API calls
  • #38: Speaking points Section change: Command Line Interface
  • #39: Speaking points CLI allows you to do many different things within Azure Create new Mobile Services, read table data, update permissions and scripts, change scale, turn on and off features, etc Also allows you to do things outside Mobile Services (create VMs, read debug logs, etc)
  • #40: Demo: Using the CLI Open the CLI tools Perform some commands azure mobile list azure mobile table list <service-name> Reference: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-manage-command-line-interface/
  • #41: Speaking points Review different tiers Mention that SQL database bills separately but is a full SQL DB and can be accessed from other resources (i.e. web sites, VMs)
  • #42: Speaking Notes Summarize earlier slide Azure Mobile Services is a Backend-as-a-Service Instead of you having to design, build, test, deploy, manage, and upgrade your whole backend, we do it for you Features of Mobile Services Storage – SQL DB Authentication – built in support for social providers w/ ability to custom auth Backend logic – data validation, logical flows, etc Push Notifications – across all major mobile platforms Scheduler – backend job processing
  • #43: Speaking points Sign up for a free Azure trial Mobile Services are free to develop with (to a point) on non-trial subscription Additional videos, tutorials, samples available SDK source code (for Mobile Services and Notification Hubs) available in GitHub