Jerry Nixon @Work: Windows 8: Why push from Azure?

Jerry Nixon on Windows

Monday, March 12, 2012

Windows 8: Why push from Azure?

imageHave you discovered WNS? Windows Push Notification Services, it is a Microsoft service for pushing items to Windows 8 Metro-style applications. WNS is free.

WPNS is the similar service for Windows Phone applications. WNS is specifically for Windows 8 metro style applications.

Push what?

WNS pushes Toasts, Tiles and Badges. The best example of toasts is Skype toast indicating an incoming call. The best example of tiles is Weather showing current conditions. The best example of badges is Email showing your unread count. Each of these allows you to deliver value to users. None of these require your application to be running.

WNS is a web service?

This question is misleading, but asked frequently. In the spirit of the question: no. It is not an incarnation of your web service or your internet server(s). WNS is a routing service that is run by Microsoft. To better understand it, let’s consider the use case:

You already have an internet server. Your server is running your service. When your server (which might be running in Azure) wakes up and reacts to some condition (an incoming call, new messages, some time-based event, or whatever) and sends a message to the Windows 8 Metro-style desktop application, it cannot – not without WNS.

Simply stated: WNS is the only way any service may push tile updates or toast messages to Metro-style applications while they are not running.

Does WNS run desktop code?

No. Of course, Windows 8 could be considered desktop code – and that has to run for it to work. But, WNS does not execute code inside your Metro-style application. Instead, the toast you send or the tiles you update will draw the user to launch your code (even passing queues to your application).

Fundamentally, you cannot cause your code to run without user interaction. This is about preference for the user (Windows 8 is a predictable, protected, and safe environment for them), and attention to battery life. But perhaps this will be clear if we step through a scenario:

Let’s pretend your Metro-style application is a newspaper. Using WNS you can update the application’s tile to show latest headlines. Using WNS you can update the application’s glyph to indicate the new headline count. Using WNS you can pop a toast showing a subscribed category. So far, your client code has not executed.

Now, the user might click on your tile or toast and enter your application (specifically that headline). At that time, you can do anything. But until the user taps the tile or toast, your application remains idle. WNS is not a mechanism to execute desktop code.

Anything else?

Yes. Consider metrics from applications like Stocks and Weather – our interns built these demonstrating Developer Preview functionality. The telemetry is from the Developer Preview.  

Although very popular, the enthusiasm around the Consumer Preview dwarfs the Developer Preview in user interest and downloads. Fewer, still, used the Developer Preview as their primary operating system. With that in mind, consider this chart (winnowed to only the Stocks application):

qqq

In the graph above, look at the growth in WNS messages in a single month. In Windows 8, there has never been an opportunity like this. With 1.2 billion windows devices, 500 million are Windows 7, the developer opportunity is off the charts – look at what a sample app can do.

This is where it matters!

WNS will scale to your needs. It’s not WNS you need to worry about. It’s your servers and services. Are they hosted where you can scale up as you respond to the uptake in your application? Will your services simply slow down the more successful you are?

  • Azure is the platform that will scale with your needs (both up and down).
  • Azure is the platform that Microsoft built just for these scenarios.
  • Azure is the platform that makes winning Windows 8 metro-style apps successful.

Conclusion

It’s not a sales speech. It’s not a marketing ploy. It’s real. And if you are investing in a Windows 8 metro-style application, then you need to be ready for success. Don’t migrate to Azure later, risking momentum and reputation. Build on Azure now. The platform ideal for Windows 8 apps.

The Windows 8 Azure Toolkit is available on CodePlex.