Transcript
Page 1: Hybrid organization   building modern business apps with windows azure notification

Saravana KumarFounder/CTO – BizTalk360

Ricardo TorreProduct Strategist – BizTalk360

Building Modern Business Apps with Windows Azure Notification Hubs

Page 2: Hybrid organization   building modern business apps with windows azure notification

Notification Hub Templates

Disruptive Mobile Apps

Modern Business Apps

Agenda

Introduction to Windows Azure Notification Hubs

Notification Hub Tags

Page 3: Hybrid organization   building modern business apps with windows azure notification

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

Page 4: Hybrid organization   building modern business apps with windows azure notification

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. 

Page 5: Hybrid organization   building modern business apps with windows azure notification

In the consumer space

WhatsApp is rapidly replacing SMS

Skype is replacing traditional phone calls

Disruptive mobile apps are changing the world

Page 6: Hybrid organization   building modern business apps with windows azure notification

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

Page 7: Hybrid organization   building modern business apps with windows azure notification

Push Notification

Page 8: Hybrid organization   building modern business apps with windows azure notification

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

Page 9: Hybrid organization   building modern business apps with windows azure notification

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.

Page 10: Hybrid organization   building modern business apps with windows azure notification

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

Page 11: Hybrid organization   building modern business apps with windows azure notification

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).

Page 12: Hybrid organization   building modern business apps with windows azure notification

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

Page 13: Hybrid organization   building modern business apps with windows azure notification

Code walkthrough

Page 14: Hybrid organization   building modern business apps with windows azure notification

Demo

Azure Notification Hub Simple notification

Page 15: Hybrid organization   building modern business apps with windows azure notification

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

Extreme scale

Topic-based multicast

Cross-platform delivery

Bing News

Page 16: Hybrid organization   building modern business apps with windows azure notification

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

Page 17: Hybrid organization   building modern business apps with windows azure 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”

Page 18: Hybrid organization   building modern business apps with windows azure notification

Code walkthrough

Page 19: Hybrid organization   building modern business apps with windows azure notification

Demo

Azure Notification Hub Using Tags

Page 20: Hybrid organization   building modern business apps with windows azure notification

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

!

Page 21: Hybrid organization   building modern business apps with windows azure notification

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

Page 22: Hybrid organization   building modern business apps with windows azure notification

Code walkthrough

Page 23: Hybrid organization   building modern business apps with windows azure notification

Demo

Azure Notification Hub Using Templates

Page 24: Hybrid organization   building modern business apps with windows azure notification

Demo

Azure Notification HubPublishing from on-premise app

Page 25: Hybrid organization   building modern business apps with windows azure notification