1 / 41

Push to ALL the iPhones with Azure

Push to ALL the iPhones with Azure. Chris Risner Senior Technical Evangelist @ chrisrisner. Microsoft Azure. About me. @ chrisrisner. Technical Evangelist. Live in Washington. Chrisrisner.com. Mobile dev for 5+ years. Grew up in Michigan. Agenda. Microsoft Azure. Push Notifications.

wilmet
Download Presentation

Push to ALL the iPhones with Azure

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Push to ALL the iPhones with Azure Chris Risner Senior Technical Evangelist @chrisrisner Microsoft Azure

  2. About me @chrisrisner Technical Evangelist Live in Washington Chrisrisner.com Mobile dev for 5+ years Grew up in Michigan

  3. Agenda Microsoft Azure Push Notifications Tags Azure Notification Hubs Questions Templates

  4. Push Notifications are BIG Provide updates to users Alert users when app isn’t running Trigger background sync Pull users back into your apps!

  5. Emails Game updates Flight reminder Rental car reminder Appointments Video chat requests Data usage alerts Bills due Push Notifications I Receive

  6. Challenges of push notifications Platform dependency • Different communication protocols to PNS’ (e.g. HTTP vs TCP, xml payload vsjson payload) • Different presentation formats and capabilities (tiles vs toasts vs badges) Routing • PNS’ provide a way to send a message to a device/channel • Usually notifications are targeted at users or interest groups (e.g. employees assigned to a customer account) • App back-end has to maintain a registry associating device handles to interest groups/users Scale • App back-end has to store current handles for each device  high storage and VM costs • Broadcast to millions of devices with low latency requires parallelization (DB ad VM)

  7. Push Notification Lifecycle Platform Notification Service App back-end App registers with provider App gets token App sends token to backend Push requested Backend delivers push to provider Provider pushes to device

  8. Microsoft Azure IaaS PaaS SaaS BaaS Infrastructure-as-a-Service Platform-as-a-Service Backend-as-a-Service Software-as-a-Service build ~consume consume host

  9. Notification Hubs • Cross-platform Push Notifications • Highly scalable • Managed

  10. Client SDKs for Android – GCM and ADM iOS – APNS Windows Phone – MPNS Windows Store – WNS Capable of pushing to specific platform or to all at once Server SDKs for REST API .NET Node.JS Java Cross-Platform Push

  11. Part of Azure Service Bus Three levels of scale Free (1 million) Basic Standard Millions of push notifications in minutes Highly Scalable

  12. Notification Hubs deals with Storing device registration information Signing push requests and sending to PNS Dealing with invalid push ID registrations Handling templates and tags You just need to Configure your hub and app Register with the PNS Pass along the push ID Managed

  13. App registers with provider App gets token App sends token to Hub Push requested Hub delivers push to provider Provider pushes to device Hub handles expired tokens Using Notification Hubs iOS app Windows app Notification Hub App back-end APNs WNS MPNS GCM ADM

  14. Demo: Hubs Creating a Hub Configuring a Hub Register and Push

  15. Tags

  16. Clients register with set of tags Tags are strings tied to the Push ID Requests to push to a Tag will push to connected Push IDs “Interest based push” Tags

  17. Tags: Example Notification Hub Tag:”Tablet” App back-end Tag:”Tablet” Tag:”Phone”

  18. Conference name Username Zip code Sports team Band name Stock ticker Other Tag Usages

  19. Demo: Tags Registering with Tags Pushing with Tags

  20. Logic based tag pushed Social: “All of this group but me” Group:id && !user:id Version and platform Version:1.0 && platform:iOS Events: “Anyone interested in the game” FollowTeam:SeaHawks || FollowTeam:Broncos || EventInterest:SuperBowl Tag Expressions

  21. Geo Push

  22. Client requests location Client uses reverse geocoding service to get zip (etc) Client registers with Hubs using zip as a tag Server pushes to zip code All clients in that zip code receive notification Making GeoPush Work

  23. Demo: Geo Push

  24. Templates

  25. Clients can specify templates when registering Templates specify format of payload when specific push is sent If “Message” push is sent, send it in this format { alert : “$info” } Enables app backend to send platform independent messages i.e. push to all the devices with this tag Multiple templates per device Different tags per template Templates

  26. Demo: Templates Registering with Templates Push to all the devices!

  27. Client vs Server Registration

  28. Client app talks directly with Notification Hub Sends over the wire Push ID (Channel URI, Registration ID, Token) Tags Templates Notification Hub Listen Connection String Not completely secure Registering from the Client

  29. Authenticate the request before registering Is the user who they say they are? Can still specify tags and templates Great for setting up registrations from a web app Good for when an app update requires a user’s registrations being updated i.e. manager adding an employee to a group Registering from the Server

  30. Registering from the Server createId() upsert({id}, channel, tags) Notification Hub App back-end {id}

  31. Demo: Server Registration

  32. Push-to-Sync

  33. Different support on different platforms Windows / Windows Phone – Only Lock Screen Apps iOS – only iOS 7 and up Android / Kindle Useful in scenarios where push isn’t satisfactory Too much data to fit in payload Don’t want to send secure information through PNS Push-to-Sync

  34. Notification Hubs • Cross-platform Push Notifications • Highly scalable • Managed

  35. Resources Microsoft Azure • Get a FREE Microsoft Azure Trial Account: • http://azure.microsoft.com • Check out Notification Hubs • http://aka.ms/NH • SDK Source Code on GitHub • https://github.com/Azure/azure-notificationhubs • Contact Details • http://chrisrisner.com • http://aka.ms/CommonWams • @chrisrisner • chrisner@microsoft.com

  36. Thanks! Questions?

  37. 16 regions worldwide in 2014 Azure footprint

  38. >57% >250k Fortune 500 using Azure Greater than 1,000,000 Active websites >20 >300 • TRILLIONstorageobjects MILLION >1 AD users MILLION Developers registered with Visual Studio Online SQL Databases in Azure >2 >13 MILLIONrequests/sec BILLION authentication/wk

  39. Get started Visit azure.microsoft.com

More Related