Wednesday, April 21, 2021

Implementing a service for Mobile Application using public cloud services:

Introduction: We discussed an automation for the device synchronization service using a queue, a database, and a parallel-task library. This article discusses the public cloud services which provide a rich framework to write device synchronization service.

We look at some of the options to write this service using public cloud features. We have the same requirements as last time which are data model, push release and controllers. If we took the queue, the database, and the parallel-task library, then we could find corresponding offerings from the public cloud as the global database, queue storage, service bus, WebJobs and Functions. But we move up the Azure stack to make use of more customized and integrated services. For example, Azure provides the following services for mobile computing: API management, which publishes APIs to developers, partners, and employees securely and at scale, Azure Notification hubs which send push notifications to any platform from any backend, Azure cognitive search, which is a cloud-based search that uses AI models, Azure cognitive services which adds smart API capabilities to enable contextual interactions. Spatial anchors which create multi-user and spatially aware mixed reality experiences, App Service which creates cloud apps for web and mobile, Azure Maps which add location context to data with their APIs and Azure communication services which powers Microsoft Teams.

Among these we find that the Notification hub to send push notifications to any platform from the back end has several desirable features that target our requirements such as it reaches all major platforms which includes iOS, Android, Windows, Kindle, and Baidu. It uses any backend in the cloud or on-premises. It can push to millions of devices with a fast broadcast from a single API call. It can customize push notifications by customer, language, and location. It can dynamically define and notify customer segments. It can scale instantly to millions of mobile devices. It produces a variety of compliance certifications. It can target any audience with dynamic tags. It works with Apple Push Notifications Service, Google Cloud Messaging, Microsoft Push notification service, and it customizes notifications to specific customers, language, and location. It makes localization easier with templates. It is designed for massive scale. It can be enhanced with security and backup services.

Usually there are multiple backend systems that want to send push notifications to the mobile applications. The push delivery system remains consistent across all the backend systems and the notification consumers. It involves a Service Bus for publishing and subscribing to events. The subscribers are mobile backend systems that translate the events to push notifications. It also involves a notification hub which registers and then receives notifications.

This workflow is described by the following steps:

SendMessage(connectionString)

ReceiveMessageAndSendNotification(connectionString)

InitNotificationAsync() which is run from a store application that receives notifications from the WebJobs in the backend systems and sends out notifications on a notifications channel for applications.

 

 

 

 

No comments:

Post a Comment