210 likes | 365 Views
Building iOS Apps with Windows Azure Mobile Services. Chris Risner Technical Evangelist Microsoft. http://chrisrisner.com @ chrisrisner. What is Windows Azure Mobile Services?. Auth. Data. Notifications. Logging & Diag. Server Logic. Scheduler. Scale. @ chrisrisner.
E N D
Building iOS Apps with Windows Azure Mobile Services Chris Risner Technical Evangelist Microsoft http://chrisrisner.com @chrisrisner
What is Windows Azure Mobile Services? Auth Data Notifications Logging & Diag Server Logic Scheduler Scale @chrisrisner
Getting Starteda backend for your mobile app in minutes Demo
Structured Storage Structured Storage with SQL Database If using single database apps are partitioned by schema AppX.Todoitem AppY.Todoitem Manage data in Portal, SQL Portal SQL Management Studio REST API CLI Tools @chrisrisner
Server Logic Automatic service REST API generated for storage Dynamic Schema on/off Ability to author server logic that intercepts CRUD operation pipeline @chrisrisner
Server Logic Supported Modules + Globals mssql request console push tables statusCodes mssql.query('select top 1 * from statusupdates', { success: function(results) { console.log(results); } } ); @chrisrisner
REST API to SQL type mappings @chrisrisner
Push Notification Lifecycle Overview Mobile Services iOS Register for push notifications Register with your send token to Mobile Service Push from server side scripts App (2) (3) (1) Apple Push Notification Service (3) @chrisrisner
Push Notifications Demo
Auth* Authenticate against multiple providers Table level permissions for each CRUD operation Everyone Anyone with the Application Key Only Authenticated Users Only Scripts and Admins More granular control with server side scripts user.level: {admin, authenticated, anonymous} user.userId: id or undefined if not authenticated @chrisrisner
Scheduler Execute scripts on a Schedule by Minutes by Hours by Days By Months Execute scripts on Demand Examples 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 @chrisrisner
Diagnostics, Logging and Scale Diagnostics API calls CPU Time Data Out Logging console.error(…) console.log(…) … Scale - Compute Scale out instance count Scale up VM size Scale - Storage Scale out mobile service tenant to dedicated SQL DB Scale up SQL DB @chrisrisner
Pricing during Preview service level agreements reserved mode shared mode PreviewNo availability SLA* General Availability99.9% Shared Instance Small instance is the only size available Free - 10 applications with unlimited inbound data. Capped max of 165MB outbound data/day Pay - SQL Database Private VM Small instance is the only size available Free - unlimited inbound data. 165MB outbound data/day, excess charged. Pay - SQLDatabase, Compute same reduced rate as Web Sites i.e 33% discount, excess outbound transfers starting at $0.12/GB Up to 100 applications @chrisrisner
Pricing Example: $5/ Month Unlimited ingress = <165MB daily egress 100MB SQL Database 10 x Mobile Services on shared instances • How? • 10 FREE mobile services on shared instance • Includes 165MB/day of FREE egress from API calls • Cost - All services sharing a 100MB DB is $5 USD / Month • Use Pricing Calculator to Estimate your costs Note: Free Egress is per subscription, not per mobile service
Don’t forget: Member Offers MSDN Subscribers up to $3700 / year BizSpark members up to $3700 / year MPN Members up to $1500 / year WebsiteSpark up to $1500 / year Full details here - http://www.windowsazure.com/en-us/pricing/member-offers/ @chrisrisner
Summary Auth Data Notifications Logging Server Logic Scale Diagnostics @chrisrisner
Useful Resources Get a Windows Azure Free Trial Account http://www.windowsazure.com/ Learn more & try tutorials Tutorials, Samples, Reference Docs: http://www.windowsazure.com/mobile Help with Mobile Services Q&A Forum: Windows Azure Mobile Services Forum Feature Rqst: Windows Azure Mobile Services UserVoice Feedback: mobileservices@microsoft.com Twitter: @chrisrisner and @cloudnick Presentations, demos, hands on labs Windows Azure Training Kit: Download here