Azure Artificial Intelligence Services
Design for IoT
Design Messaging Solution Architectures
Design Media Service Solutions
The course is part of these learning paths
This course is focused on creating practical solutions using Azure technologies in areas such as AI, messaging, the Internet of Things, and video media. This will require familiarity with dozens of Azure solutions.
This course will take you through all of the relevant technologies and ensure you know which ones to pick to solve specific problems. This course is for developers, engineering managers, and cloud architects looking to get a better understanding of Azure services.
Whether your app deals with artificial intelligence, managing IoT devices, video media, or push notifications for smartphones, Azure has an answer for every use case. This course will help you get the most out of your Azure account by preparing you to make use of many different solutions.
Design solutions using Azure AI technologies
Design solutions for IoT applications using Azure technologies
Create a scalable messaging infrastructure using Azure messaging technologies
- Design media solutions using Azure media technologies and file encoding
People who want to become Azure cloud architects
General knowledge of IT architecture
There are many scenarios where you will need your application to send notifications to end users’ smart devices. It may be a fitness app that tracks how many steps we have walked and wants to let us know that we reached a daily goal. It could be a messenger app letting alerting us to a new contact request. If you have a smartphone you can surely think of many other examples.
To demonstrate how to set up a push notification system, we’re going to take the example of a bank application. It needs to notify users whenever they receive a deposit over a certain amount of money. The centerpiece for our system will be Azure Notification Hubs. We’re going to walk through it step by step.
So let’s start by considering what our backend might look like. Consider this architecture. Financial data is managed by a legacy system. We’re using Azure Service Bus to ingest messages and event data. Then there is a mobile backend that subscribes to specific topics and is responsible for pushing messages to our banking mobile app.
The easiest way to integrate our mobile app backend with notification hub would be to use something like Azure App Service Mobile Apps. This is an Azure Platform as a Service tool that has direct integration with notification hubs.
App Service mobile Apps: https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-value-prop
However if we want to take a more open-ended approach, the basic solution is to create a notification hub and connect it to our mobile app project. We have included a link to a detailed example for how to do that with Android. It is a little out of scope to cover how to set up an Android project, so we’re going to focus on setting up the notification hub. You can do this in the web UI by simply clicking on “create a resource,” then selecting “Web + Mobile” and finally selecting “Notification Hub.” The next menu will ask for some basic information to configure your hub, such as your Azure region, a name for the hub, and a resource group.
Android example: https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-android-push-notification-google-fcm-get-started
Once the hub exists you will need to get the connection string from the Access Policies page. This is the credential that will let your mobile backend actually connect to your hub for pushing messages. It will be part of your mobile backend code. From there, usually your code will use some library to handle transmitting the notification with relevant target details. If a library is not available for your use-case, you can use the REST API to send notification messages.
The nice thing about Azure notification hubs is that it makes it easy to test push notifications once you are ready. As you can see from the diagram, in the web UI you can select a platform, create a payload, and do a “test send.” If you have configured your app correctly you should see it on targeted phones running the app.
So that’s basically it, at a high level at least. Actually implementing all of this in a real software stack is of course more complex and requires some programming knowledge. What we wanted to demonstrate here was just problem solved by Azure Notification Hubs - namely, giving your app a centralized easily managed service for handling transmission of notifications.
So now we will close out this section by talking about scaling. It’s all well and good to be able to handle lots of messages with Service Bus and send notifications with Notification hub. But how do we deal with bottlenecks and sudden increases in traffic? How do we optimize our performance? Stick around for the next lesson and you’ll find out!
Jonathan Bethune is a senior technical consultant working with several companies including TopTal, BCG, and Instaclustr. He is an experienced devops specialist, data engineer, and software developer. Jonathan has spent years mastering the art of system automation with a variety of different cloud providers and tools. Before he became an engineer, Jonathan was a musician and teacher in New York City. Jonathan is based in Tokyo where he continues to work in technology and write for various publications in his free time.