Azure Notification Hub (Steps To Create)

Azure Notification Hub
Azure Cloud

Share Post Now :

HOW TO GET HIGH PAYING JOBS IN AWS CLOUD

Even as a beginner with NO Experience Coding Language

Explore Free course Now

Table of Contents

Loading

The Application market is blooming rapidly ever since its advent, and to maintain user loyalty and engagement, it is necessary to keep the user informed. The user must know about the latest updates and events that may have happened in the application. So the Azure Notification Hub has been a boon to this market and provides many facilities to ease the developer’s life.

I will cover the following  topics in this blog:

What is Azure Notification Hub

Azure Notification Hub is the notification service provided by Microsoft Azure. These notifications can be sent to various platforms like Windows, Android, iOS, WindowsPhone, etc. It is an infrastructure that sends a push notification to any platform. Through Notification Hub, one can monitor, schedule, and telemetry the push notification. Tags and Templates are two main components to understand the Notification Hub.

Azure Notification Hub

Tags – It is thought of as an ‘interest group‘ that helps deliver the notification to that target group. It is a string value that is defined according to the requirement. For example, an entertainment application could define tags as movies, videos, songs and so forth. For authentication application, the user id will be described as a tag.

Templates – It is an instruction segment that helps in enabling the notification format for the application. It provides the following benefits: customised notification, easy localisation, independence of client-version communication and platform-depended backend.

Push Notification

An application and user communicate via push notification. These push notification appear on the device either as a dialogue box or a pop-up to notify the users.

Now, let me brief how these Push Notifications work.

PNS (Platform Notification System), a platform infrastructure, helps deliver the push notification. The overall work of PNS revolves around the handle. The handle could be registration ID, URL of channel or any device token.

Through the Registration process, devices are registered with the notification hub. The registration process helps in linking PNS handles with tags and templates. Tags help direct the notification to the appropriate handle, and Templates help define the key/value pair for the notification registered on the hub.

Azure Notification Hub

PNS lifecycle

The process takes place in 4 steps:

  1. An application connects with PNS, requests the handle for the targeted platform, and conducts the registration process with Notification Hub.
  2. Then, these handles get stored in the App backend on the client app.
  3. The App backend, through the handles, connects with PNS to target the client app.
  4. Finally, notifications are forwarded to the device based on the handles specified.

Also Check: Our blog post on Azure Compute. Click here

Need for Azure Notification Hub

Consider a scenario where you made an application say a mobile app or a web app, and after few days you make some changes to it. So, how you will notify people about the changes? One way you can do this is personally tell everyone, but what if in the case of more than a million people.  Hence, in this case, Azure Notification Hub comes into play.

So, the different scenarios where the notification hub can aid its support are:

It can help send notifications to millions of people at one go. It also allows sending notification related to application events, for example, events like sports, gaming, finance. Furthermore, it let you send coupons (based on location) to specific users. In addition to that, it helps in engaging the customer by sending informational content. Likewise, it also makes sure to send codes for authentication purpose.

Besides that, Notification Hub resolves the complexities faced while sending the push notification from the app backend. The various advantages of Notification Hub include:

  •  Compatability – It helps send a notification to multiple platforms like Android, Windows, and iOS. Moreover, it can efficiently work with the backend created in any language.
  • Security – Notification Hub ensures security by following the federation authentication process or SAS (Shared Access Secret).
  • Delivery Pattern – It provides a varied range of delivery pattern. One can choose according to one’s need. To name a few: Silent, Direct, Scheduled, Personalized, and Localized push.

Note: To know more about the delivery pattern,  ☚ click here.

  • Telemetry – It is present in the Azure Portal by default. Telemetry records the pushes, starting from its request to sending notification to the user.
  • Scalability –  Notification can be sent to millions of people without restructuring infrastructure.

Create Azure Notification Hub in Azure Portal

Prerequisite:  Ensure that you have a Microsoft Azure account with a valid subscription plan. If you don’t, you can create a free account, with a one-month FREE TRIAL subscription.

Note: Learn how to create an Azure Free Trial Account.

Step 1) Log in to Azure Portal 🚀

Step 2) Click on the Hamburger icon on the top left corner. Select ‘All services‘.

Select All Services Option

Step 3) Under the All services categories, (1 )- Select the ‘Mobile’ option,  then (2 ) – Click on ‘Notification Hubs’.

Selection of Mobile and Notification Hub

Step 4) The Notification Hubs page section provides you with the option to create a new hub by clicking on ‘+New’; alternatively, you can also opt for the option ‘Create notification hub’.

Create Notification Hub

Step 5) Then,  the  following wizard asks to fill in the following details

  1. Subscription – Select the subscription plan.
  2. Resource Group – Click on the ‘Create new option if you want to create a new resource group.
  3. Notification Hub Namespace – It is the cluster of the notification hub in a particular region. Specify the name of the namespace.
  4. Notification Hub  – Specify the name for the Azure Notification Hub.
  5. Location – Select the region.
  6. Select Pricing Tier – It provides us with various option pricing tier. We have selected ‘Free Tier’ for the demo purpose.

Click on the ‘Create’ button to get to the deployment screen.

Detail filling

Step 6) Once you click on the create button, the deployment process is initiated. After completing the deployment process, click on ‘Go to Resource’.

Go to Resource

Step 7) The following screen will appear describing Notification Hub’s details. The various platforms compatible with the Notification Hub are shown in the image below.

Azure Notification Hub

Step 8) Again, when we go to Notification Hubs under the Mobile section in All services, we will see the created Notification Hub. Refer to the image below for a better understanding.

Notification Hub

Voila !!! We successfully created a Notification Hub.

Conclusion

Azure Notification Hub makes it very easy to send push notification across multi-platforms. Due to its various advantages like scalability, cross-platform, security, and rich telemetry have been widely recognised. One of the most significant features of Notification Hub is a different type of push notification delivery pattern that makes the task very easy and convenient. I hope this blog has been helpful in increasing your knowledge about Notification Hub. Keep Reading. 📖

Related/References

Next Task For You

Begin your journey towards becoming a Microsoft Azure Solutions Architect Expert. Just click on the register now button below to register for a Free Class on Microsoft Azure Solutions Architect Expert Certification [AZ-305], which will help you to understand better, so you can choose the right path and clear the certification exam.

Picture of mike

mike

I started my IT career in 2000 as an Oracle DBA/Apps DBA. The first few years were tough (<$100/month), with very little growth. In 2004, I moved to the UK. After working really hard, I landed a job that paid me £2700 per month. In February 2005, I saw a job that was £450 per day, which was nearly 4 times of my then salary.