Mobilize Your Workforce. Kirill Gavrylyuk | Principal Program Manager Lead, Azure Mobile Miranda Luna | Product Manager, Azure Mobile. Course Topics. Please leave this area blank to allow for picture in picture recording. Setting Expectations. Target Audience
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Mobilize Your Workforce Kirill Gavrylyuk | Principal Program Manager Lead, Azure Mobile Miranda Luna | Product Manager, Azure Mobile
Please leave this area blank to allow for picture in picture recording Setting Expectations • Target Audience • Enterprise mobile developers • .NET developers that want to get up to speed with the .NET backend • Suggested Prerequisites/Supporting Material • MVA Building Secure Mobile Apps in the Enterprise • Channel9 Azure Mobile Services Learning Series • aka.ms/CommonWAMS
Join the MVA Community! • Microsoft Virtual Academy—Free online training! • Ask questions in the Born to Learn MVA Forum! • Visit http://aka.ms/MVAForum • Earn while you learn! • 50 MVA Points for this event! • Visit http://aka.ms/MVA-Voucher • Code: BldgBlks3
Push Notifications Mobile push notification engine for existing apps Enhance push notifications in any app with personalization and localization Improves user engagement and retention by delivering relevant content more quickly Mobile Backend Ready-made mobile app backend for iOS, Android and Windows Create new mobile apps or add a mobility layer to existing systems Speeds up development time and reduces ongoing maintenance cost Device Messaging Messaging infrastructure that sits between and within applications Build multi-tier and hybrid applications or smart device information exchange patterns Delivers inter- and intra-app messages faster and connects on-premises systems to the cloud
Mobile Services Overview Store Data in the Cloud SDKs Windows Store iOS Android Xamarin Sencha Windows Phone iOS Android HTML 5/JS Table Storage Blob Storage Mongo DB SQL Node.js Express .NET Web API User Authentication REST API Active Directory Facebook Twitter Microsoft Google Push Notifications Source Control WNS & MPNS Notification Hubs APNS GCM
How Mobile Services Helps Differentiating Characteristics of Enterprise Mobile
Mobile Services .NET backend A Backend for Your Employee or Customer App in minutes Your Backend Logic via .NET Web API built using VS Turn-key Mobile Backend Capabilities Secure data store/query/page, social integration, cross-plat push Single Sign On with Azure Active Directory Client SDK for iOS, Android, Windows, WinPhone, Xamarin, PhoneGap, Sencha Connectivity to Your On-Premise Enterprise Systems We Manage, Run, and Monitor it for you
Core scenarios • Data • Based on WebAPI • Various data stores supported: • Azure Databases • SQL Server on-prem/IaaS • Table Storage • MongoDB • Flexible data mapping via automapper • Auth • Server flows supported: • Facebook • Twitter • Google • Microsoft Account • Azure Active Directory Push Uses Notification Hubs integration for high-scale cross-platform push
Your backend code, our runtime Mobile Service Mobile Services runtime web.config Your controllers App settings injected here git User database: EF code-first migrations or custom migrations load Source Commit hook: Build project WebDeploy WebAPI controllers
Data • Use the corresponding XXXTableController for a turn-key OData REST API on top of any of the stores • Connect to on-prem data through Service Bus Relay • Full control over your data in all scenarios with native .NET API SQL Server On-Prem SQL Server in a VM Mongo DB Azure SQL db Azure Table Storage Azure Blob Storage
Enterprise Integration • Integrating with a REST Service Bus Relay Service - Connect your Mobile Service with an application running on-premises (in your own datacenter) via Service Bus Relayed Messaging. This specific example deals with communicating over REST. Code is shown in C# on the client side. Sample is also applicable to SQL Server in an Azure VM. • Integrating with a SOAP Service Bus Relay Service - Connect your Mobile Service with an application running on-premises (in your own datacenter) via Service Bus Relayed Messaging (another part of Windows Azure). This specific example deals with communicating over SOAP. Code is shown in C# on the client side. Sample is also applicable to SQL Server in an Azure VM. • Integrating with Windows Azure BizTalk Services - This walkthrough explains how to integrate your Mobile Service with Windows Azure BizTalk Services so you can communicate with other resources either running in the cloud or on-premises. Code is shown in C# on the client side. • Integrating with BizTalk Server via Service Bus - This walkthrough explains how to integrate your Mobile Service with other on-premises or cloud resources using BizTalk Server, Service Bus Brokered Messaging, and Service Bus Relayed Messaging. Code is shown in C# on the client side.
Mobility Layer for your Enterprise Systems On-Premises Systems & Data Service Bus Relay Mobile Services Web API Client Apps
Mobile Services + Azure Active Directory Bring turn-key login experience with corporate credentials to mobile developers Enable applications built around organizational structures Make AD users a first-class concept in Mobile Services, with push-to-user and per-user data
AAD Resources • General Getting Started: aka.ms/MobileAAD • Windows Store sample • Graph API • Matthew Henderson’s sample: AAD offers a rich graph API which can be used to obtain information about a user. In this post, I’ll show you how to personalize a user’s app experience based on that information. On the server, we’ll write a custom API which will contact AAD and return basic graph data. The mobile client will call this API following each login and use the data to welcome the user to the app. • Paolo Salvatori’s sample: This sample demonstrates how to integrate a Mobile Service with a line of LOB running on-premises via Service Bus Relayed Messaging. The mobile service uses Windows Azure Active Directory to authenticate users and Graph API to retrieve user information from the tenant domain.
Push Notifications for LOB apps Make the employee effective… Workforce management (e.g. Red Praire) Notifications: approvals, timecards, etc Warehouse management Arrivals, trucks movement Document approval Point of Sale Hospitality and Travel (e.g. check-in) ….
Mobile Push Notifications 101 • Register device handle at app launch • Client app contacts Platform Notification Service (PNS) • App updates handle in backend client app • Send Notification • App backend sends notification to PNS • PNS pushes the notification to the app on the device Platform Notification Service • Maintain device handles • Delete expired handles when PNS rejects them App back-end
Push Notification Challenges While there are significant benefits to using push notifications in a mobile app, rolling your own push infrastructure is extremely difficult in terms of implementing a system capable of: • Cross-Platform Push Notifications Each push service (APNS for iOS, GCM for Android, WNS for Windows, etc.) has different protocols (e.g., HTTP vs. TCP, xml payload vs. JSON payload) • Personalizing on the server-side based on interest and location Segmenting users based on interest tags and routing only the most relevant content to each segment • Localizing notifications on the client-side based on language, currency, device, etc. Each device displays notifications differently • High-Volume with Low Latency Limited by the capability of each VM so need to spin up scores of VMs and shard your application in order to serve a large user base • Maintaining accurate device handle registry Adding registrations upon installation, updating tags, pruning upon on uninstall
Azure Push Notifications One-time set up Create a Notification Hub Register The client app retrieves its current handle from the PNS. Client app (or app backend) registers the handle with Notification Hub Send Notification The app back-end sends a message to the Notification Hub. Notification Hub pushes it to the PNS Android app iOS app Windows 8.x app Notification Hub App back-end WNS APNs MPNS GCM
Push to Pull Send a push notification to the device Push notification prompts the device to pull information from the app backend Device then pulls the information directly from the app backend Information does not flow through PNS or NH PNS pushes the notification to the app on the device Information is displayed to the user just like a normal mobile push notification, even though it travels more directly and securely Notification Hub Platform Notification Service App back-end
Extending Push Notifications Extend push capabilities to support enterprise scenarios • Delivery acknowledgement • End-to-End encryption • Audit, etc Available today through SignalR and Service Bus
Security in Notification Hubs Auth • Simple Shared Access Signature pattern: short-lived keys + signature • Federated auth using Access Control Service • Protection • All operations to Hub over SSL • Requests are signed • Role-based access • Separate claims for Send/Registration CUD/management ops • Namespace-level and Hub-level isolation • Audit/logging
Enterprise Mobile at //build • Building Cross-Platform Line of Business Apps with Mobile Services • Friday 4/4 12:30 – 1:30 PST • Donna Malayeri, Chris Risner • @lindydonna, @ChrisRisner • Powerful mobile apps with Mobile Services and ASP.NET Web API • Thursday 4/3 5:30 – 6:30 PST • Kirill Gavrylyuk, Yavor Georgiev • @KirillG_MSFT, @theyavor • Mobile Push Notifications to Any Client with Azure Notification Hubs • Wednesday 4/2 5:30 – 6:30 PST • Elio Damaggio • @ElioDamaggio • All videos will be available on Channel9
Mobile Services Resources Windows Azure Mobile Services Overview, Tutorials and Resourceshttp://www.windowsazure.com/en-us/develop/mobile/ Collection of Helpful Tutorials and Resources http://aka.ms/CommonWAMS Learn/Channel 9http://channel9.msdn.com/Series/Windows-Azure-Mobile-Services SDKs on GitHub https://github.com/WindowsAzure/azure-mobile-services/ REST API Reference http://msdn.microsoft.com/en-us/library/windowsazure/jj710108.aspx Windows Azure Pricinghttps://www.windowsazure.com/en-us/pricing/calculator/ UserVoice for Feature Requests http://feedback.windowsazure.com/forums/216254-mobile-services Microsoft Azure Certified Traininghttp://www.microsoft.com/learning/en/us/training/azure.aspx
Notification Hubs Resources Windows Azure Mobile Services Overview, Tutorials and Resources Azure Documentation Center MSDN Documenation Android (tutorial) iOS (tutorial) Windows Store (tutorial) Windows Phone (tutorial) Learn/Channel 9Introduction | iOS | Windows Store | Tags and Templates REST API Reference http://msdn.microsoft.com/en-us/library/windowsazure/jj710108.aspx Windows Azure Pricinghttp://www.windowsazure.com/en-us/pricing/details/notification-hubs/ Microsoft Azure Certified Traininghttp://www.microsoft.com/learning/en/us/training/azure.aspx