Hybrid organization building modern business apps with windows azure notification

Preview:

DESCRIPTION

In this new era, apps became the new way for user to interact with their favourite services. Part of any modern day apps whether its iOS, Android, Windows Phone, or Windows Store notifying the users is one key element Ex: Facebook updates, Weather update, Traffic update etc. One of the key challenge here is sending notifications to millions of users in a reliable way across devices and platforms. That’s the exact problem Windows Azure Notifications solves for us. Notification are not just for consumer facing fancy apps, it can be used for business applications as well. In this session, Saravana Kumar shows how some of the business critical alerts can be transmitted to wide variety of devices taking advantage of some of the new Microsoft BizTalk Server 2013 capabilities and Windows Azure Service Bus Notification Hubs.

Citation preview

Saravana KumarFounder/CTO – BizTalk360

Ricardo TorreProduct Strategist – BizTalk360

Building Modern Business Apps with Windows Azure Notification Hubs

Notification Hub Templates

Disruptive Mobile Apps

Modern Business Apps

Agenda

Introduction to Windows Azure Notification Hubs

Notification Hub Tags

Modern business applications

• Span Multiple Devices

• Rapid lifecycle• Any data, any

size, anywhere• Secure &

available

Anywhere connection

Personalized experience

On your phoneOn the road On your device

Personalized devices

Aviva wanted to help customers save money by basing car insurance quotes on the behaviour of individual drivers instead of statistics

Aviva implemented a hybrid-cloud solution that connects mobile devices, on-premises applications, and social media. 

In the consumer space

WhatsApp is rapidly replacing SMS

Skype is replacing traditional phone calls

Disruptive mobile apps are changing the world

In the business world

Square “The Man Who Made the Cash Register Obsolete”

“At Delta Airlines more than 19,000 flight attendants will start using Windows Phone 8 devices to streamline on-board purchasing“

Disruptive mobile apps are changing the world

Push Notification

Notification Hubs makes it easy to push multi-platform, personalized notifications both to single users and very large groups.

Introduction to Windows Azure Notification HubsPush is essential to the user experience of many apps.Increase user engagement.• Update tiles/widgets with current financial/weather information.• Display badges with the number of current sales leads in a CRM app.

Real world apps have complex needs.Multi-platform push.Localization.User preferences.Different client app versions.Scale.

Push notification lifecycle

Registration at app launch.1. Client app contacts Platform Notification Service,

to retrieve current channel (e.g., ChannelURIs, device tokens, registrationIds).

2. App updates handle in back-end.

Sending Notification.3. App back-end send notification to PNS.4. PNS pushes the notification to the app

on the device.

Maintenance.5. Delete expired handles when PNS rejects them.

PlatformNotification

Service

App back-end

Client app

Challenges of push notifications

Platform dependencyDifferent communication protocols to PNS’ (e.g., HTTP vs. TCP, xml payload vs. JSON payload).Different presentation formats and capabilities (tiles vs. toasts vs. badges).

RoutingPNS’ provide a way to send a message to a device/channel.Usually notifications are targeted at users or interest groups(e.g., employees assigned to a customer account).App back-end has to maintain a registry associating device handles to interest groups/users.

ScaleApp back-end has to store current handles for each device high storage and VM costs.Broadcast to millions of devices with low latency requires parallelization (DB ad VM).

Using Notification Hubs

One-time set upCreate a Notification Hub in Service Bus.

RegisterThe client app retrieves its current handle from the PNS.Client app creates (or updates) a registration on the Notification Hub with the current handle.

Send NotificationThe app back-end sends a message to the Notification Hub.Notification Hub pushes it to the PNS’.

APNs WNS

Notification Hub

App back-end

iOS app Windows Storeapp

Code walkthrough

Demo

Azure Notification Hub Simple notification

Using Windows Azure Notification Hubs to Deliver Breaking News to Millions of Devices

Extreme scale

Topic-based multicast

Cross-platform delivery

Bing News

Scheduling a service call

Event processing Alert Generation

Analysis: Near real-time + historic processing

Fleet scheduling

Happy customers

6. Notification

1. Schedule service

2. Service call

3. Dynamic dispatch

4. GPS Telemetry

5. Notification

Sending notifications to specific devicesTags as interest groups.1. Client app can register with a set of tags.2. Tags are simple strings (no pre-provisioning is required).3. App back-end can target all clients with the same tag.

You can use tags also for:Multiple type of interest groups, e.g.,:• Follow bands: tag “followband:Beatles”.• Follow users: tag “followuser:Alice”.

Tag devices with a user ID.

Notification Hub

App back-end

Tag:”Beatles”Tag:”Wailers”

Tag:”Beatles”

Code walkthrough

Demo

Azure Notification Hub Using Tags

Using templates for multi-platform pushRegistration.Client apps can register with a platform specific template, e.g.,• Alice’s Surface registers with

Windows Store ToastText01 template.• Bob’s iPhone with the Apple JSON template:

{ aps: {alert: “$(message)”}}.

Send notification.App back-end sends a platform independent message: {message: “Hello!”}.

Version independence.Templates can be used to abstract different client app versions.

Service Bus Notification HubApp back-

end

<toast><visual><binding

template=\"ToastText01\"><text

id=\"1\">$(message)</text></binding>

</visual></toast>

{aps: {

alert: “$(message)”

}}

{ message: “Hello!” }

Hello!

Hello

!

Using templates for personalization

Registration.Client apps can register with personalized templates, e.g., • Alice’s Surface wants to receive weather information in F degrees.• Bob’s iPhone wants weather information in C degrees.

Send notification.App back-end sends a message including both temperatures: {tempC: “23”, tempF: “73”}.

Template Expressions.Template support a simple expression language:E.g., {‘Elio, ’+$(friend)+’ added you to ’+$(groupName)+‘ group’}.

Service Bus Notification HubApp back-

end

<toast><visual><binding

template=\"ToastText01\"><text id=\"1\">$(tempF)</text>

</binding></visual>

</toast>

{aps: {

alert: “$(tempC)”

}}

{tempC: “23”, tempF: “73”}

73

23

Code walkthrough

Demo

Azure Notification Hub Using Templates

Demo

Azure Notification HubPublishing from on-premise app

Recommended