Getting Mobile with the Cloud
description
Transcript of Getting Mobile with the Cloud
![Page 1: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/1.jpg)
Getting Mobile with the Cloud
Chris RisnerTechnical EvangelistMicrosoft
http://chrisrisner.com@chrisrisner
![Page 2: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/2.jpg)
• How we got here• Mobile Services• Features and demos• Questions
What we’re going to talk about
![Page 3: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/3.jpg)
How did we get here?
![Page 4: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/4.jpg)
What we had
Cloud services
Storage Identity
![Page 5: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/5.jpg)
What we neededCross Platform Features
![Page 6: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/6.jpg)
What we made
![Page 7: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/7.jpg)
What is Windows Azure Mobile Services?
Data
Notifications
Auth
Server Logic
Scheduler
Logging & Diag
Scale
![Page 8: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/8.jpg)
Getting Started a backend for your mobile app in minutes Demo
![Page 9: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/9.jpg)
Structured StorageStructured Storage with SQL DatabaseSame DB – multiple Mobile Services
AppX.Todoitem
AppY.Todoitem
Manage data inPortal, SQL Portal
SQL Management Studio
REST API
CLI Tools
![Page 10: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/10.jpg)
REST API to SQL type mappings
JSON Value T-SQL Type
Numeric values (integer, decimal, floating point)
Float
Boolean Bit
DateTime DateTimeOffset(3)
String Nvarchar(max)
![Page 11: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/11.jpg)
Server Logic
Automatic REST API generated for storageDynamic Schema on/offAbility to customize server logic that intercepts table requests
![Page 12: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/12.jpg)
Server LogicSupported Modules + Globals
requestconsolepush.*tablesmssqlstatusCodesazurestore (pusher, sendgrid, twilio, etc)
mssql.query('select top 1 * from statusupdates', { success: function(results) { console.log(results);
} }
);
![Page 13: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/13.jpg)
Server Logicadding server logic on CRUD
operations Demo
![Page 14: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/14.jpg)
Push Notification Lifecycle Overview 1. Register for push
notifications
2. Register with your send token to Mobile Service
3. Push from server side scripts
iOS
(1)
(2)
(3)
(3)
![Page 15: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/15.jpg)
Push NotificationsDemo
![Page 16: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/16.jpg)
User Auth
![Page 17: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/17.jpg)
Auth Data and ScriptsTable level permissions for each CRUD operation
EveryoneAnyone with the Application KeyOnly Authenticated UsersOnly Scripts and Admins
More granular control with server side scriptsuser.level: {admin, authenticated, anonymous}user.userId: id or undefined if not authenticated
![Page 18: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/18.jpg)
Adding Authenticationintegrating with Twitter Demo
![Page 19: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/19.jpg)
Command Line ToolsCreate servicesDelete servicesCreate (with auth options), update, delete, list tablesUpload, delete, download, list scriptsGet, change configurationScale up, scale down
![Page 20: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/20.jpg)
Using the CLI Demo
![Page 21: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/21.jpg)
SchedulerExecute scripts on a ScheduleExecute scripts on DemandExamples Periodic purge of old data
Poll and aggregate from 3rd party (Twitter, RSS, others)
Process/resize images
Schedule sending push notifications for a given time of day
![Page 22: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/22.jpg)
Scheduling a taskAdding Todo Items Demo
![Page 23: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/23.jpg)
Diagnostics, Logging and Scale
DiagnosticsAPI callsCPU TimeData Out
Loggingconsole.error(…)console.log(…)…
Scale - ComputeScale out instance countScale up VM size
Scale - StorageScale out mobile service tenant to dedicated SQL DBScale up SQL DB
![Page 24: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/24.jpg)
Diagnostics, Logging, Scale
Demo
![Page 25: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/25.jpg)
Pricing Example:
10 x Mobile Services on shared instances
100MB SQLDatabase
Unlimited data in
<165MB daily out
How?10 FREE mobile services on shared instanceIncludes 165MB/day of FREE data out from API calls Cost - All services sharing a 100MB DB is $5 USD / Month Use Pricing Calculator to Estimate your costs
=$5/ Month
Note: Free data out is per subscription, not per mobile service
![Page 26: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/26.jpg)
Summary
Data
Notifications
Auth
Server Logic
Scheduler
Logging & Diag
Scale
![Page 27: Getting Mobile with the Cloud](https://reader035.fdocuments.us/reader035/viewer/2022062408/56813d58550346895da71ecb/html5/thumbnails/27.jpg)
Useful ResourcesGet a Windows Azure Free Trial Accounthttp://www.windowsazure.com/
Learn moreFind videos, tutorials and more at https://www.windowsazure.com/mobile
Help with Mobile ServicesQ&A Forum: Windows Azure Mobile Services ForumFeature Rqst: Windows Azure Mobile Services UserVoiceFeedback: [email protected]: @chrisrisner
Presentations, demos, hands on labsWindows Azure Training Kit: Download here