SitePoint and Microsoft live Q&A: Session 2, Azure Mobile Services & Notifications

Excellent; thank you, Andrew.

1 Like

Is there anything that makes push notifications different on Azure Mobile Services?

As I said on Monday, there’s always something new coming out :slight_smile:

To me, the thing that makes Azure stand out is its plethora of services from media to identity, to mobile notifications, to caching and more. Most impotantly though, the integration and management of these services makes using them at any scale, from individual to huge enterprise, easier and more efficient.

You’ve mentioned scalability a number of times last session as well. Can you tell us a bit more about it?

Hi Andrew! How do notifications actually work on Azure?

The Azure Notification Hubs (used by Mobile Services) are (I think) unique because they wrap the complexity of communicating with the three major notifications services from Apple, Google and Windows. You can send the one notification to the service and have it distributed, at massive scale, to all three. If you wanted to write and maintain that infrastructure yourself, you’d spend lots of your time keeping up wit what’s changed and making fixes. The beauty of having someone else (in this case, Microsoft) do all that is that you can get on with writing your unique application, and leave the common stuff to someone else.

(I’m wearing my TechEd 2013 shirt today and it says “only write the code that only you can write”)

2 Likes

I like that :smiley:

1 Like

Great! Thank you for that Andrew.

Words of wisdom!

1 Like

Welcome back Andrew

Somewhat related, “load”

i.e. if Mega notifications occur within a short period of time, are they queued or are more resources thrown at them?

I guess it wouldn’t matter much for non-time-critical notifications but it might if something was more urgent.

There’s some great documentation and information on the architecture and technology of Notification Hubs.

Scott Gutherie did a comprehensive blog post when it was released:
http://weblogs.asp.net/scottgu/broadcast-push-notifications-to-millions-of-mobile-devices-using-windows-azure-notification-hubs
There’s the Notification Hubs home page: http://azure.microsoft.com/en-us/services/notification-hubs/

Essentially, you get the user of your app to register for notifications with the service, and then when you want to send a notification you send a message to the service, and it handles the complexity of sending the notification to the appropriate registered users.

@ntarpin I’m a n00b, so I can only include 2 links per reply. Hereare the other 2 I was going to include:

The documentation home page (complete with video): http://azure.microsoft.com/en-us/documentation/services/notification-hubs/
and the MSDN documentation: https://msdn.microsoft.com/en-us/library/azure/jj927170.aspx

1 Like

For someone using Amazon EC cloud services, should I consider making a switch to Azure? I imagine your answer would be yes, but maybe you could shed some light on the reasons why?

1 Like

I’ll fix that for you now.

3 Likes

The Notification service infrastructure is not specific to your app, it’s done across all notifications globally and we closely monitor the load on it and scale as required. Of course, because there are many people using it, that tends to even out the load (one of the big advantages of a cloud-based, multi-user infrastructure is that you can run your hardware at much higher working loads because the peaks are smoothed out by the averaging of multiple disparate workloads across many timezones)

1 Like

So can you easily set notifications for specific timezones for your users? Are there any other cool tricks you can do with Notifications?

1 Like

It’s a very difficult question to answer without having a more detailed architectural discussion. The answer really depends on what you’re doing on Amazon.

One thing I would say (and I bet you weren’t expecting to hear this) is that unless you have a good reason to do so (like a service or capability that can’t be met elsewhere) I’d be wary about switching for the sake of change.

Having said that, as a developer, I’m really sold on the PaaS model and Azure seems to offer the best version of that I’ve seen.

2 Likes

@AndrewCoates I’m sure this will be answered on your site, but since you’re here, does Azure have a network of computers globally, or are they mostly centered in one location? (I don’t have a great understanding of how cloud services disperse their hosting!)

Notifications can be sent to channels, or categories to which a user (or app on behalf of a user) subscribes. One of those channels could be set up for a particular time zone. You could also set up channels based on people’s preferences for, say, sport. A cricket app might have channels for each team, for each competition, for specific players or whatever. When you send the notification, you tag it with the channel(s) that should receive it, and the infrastructure takes care of sending it to the right people.

@AndrewCoates Being a C Programmer can I use it to make an app? Will C be enough or is there any other language needed? Are there any specific databases needed?

1 Like

Yep, there are over 16 Data Centres around the world, including 2 in Australia (I said over 16, because the number increases fairly regularly). You can choose to put your services and data in one or more of these and we also automatically back up between data centres.

Lots more info about the data centres themselves here: http://www.microsoft.com/en-us/server-cloud/cloud-os/global-datacenters.aspx

There’s a list of the redundancy locations used here http://azure.microsoft.com/en-us/regions/geo-redundant-storage/, but it looks like it’s a little out of date as the Australian centres aren’t listed (they opened late last year)

1 Like