SlideShare a Scribd company logo
@cloudbeatsch
Beat Schwegler
Microsoft Corporation
Twitter: @cloudbeatsch
Blog: http://cloudbeatsch.com
@cloudbeatsch
push notifications
integral part of modern applications
@cloudbeatsch
different platforms : gcm - apns - mpns
similar concepts and architecture
@cloudbeatsch
platform
notification
service
app
back-end
app
1
2
3
4
retrieve handle
store handle
send notification
@cloudbeatsch
platform
notification
service
app
back-end
1
2
3
4
Client
Notification
Service
App
retrieve handle
store handle
send notification
@cloudbeatsch
unique token per device and app
persist, refresh and retrieve millions of
tokens
challenge - registration management
@cloudbeatsch
~1 millisecond to send an async
notification
~16 minutes to send 1 million notifications
~32 servers to send them within 30
seconds
challenge - time to deliver message
@cloudbeatsch
personalized per user and/or device
language, message format, visuals
metrics (currency, temperature, length …)
challenge - message personalization
@cloudbeatsch
users/apps subscribe to topics
only interested in rugby and tennis news
and only when written by Rob, Ben or Paul
challenge - message routing
@cloudbeatsch
notification hubs
highly scalable pub/sub based service
@cloudbeatsch
10s
3+ <2
100s
3+ 150+
@cloudbeatsch
platform
notification
service
app
back-end
app
1
2
4
5
retrieve handle
store handle
send notification
notification hub
3
@cloudbeatsch
apns
app
back-end
Android app
1
2
4
5
notification hub
3
iOS app
gcm
5’
4’
3’
1’ 2’
retrieve handle
store handle
send gcm notification
send apn notification
@cloudbeatsch
Windows 8
var channel = await PushNotificationChannelManager.
CreatePushNotificationChannelForApplicationAsync();
var hub = new NotificationHub("<hub name>", "<connection str>");
var result = await hub.RegisterNativeAsync(channel.Uri);
iOS
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *) deviceToken {
SBNotificationHub* hub = [[SBNotificationHub alloc] initWithConnectionString:
@"<connection str>" notificationHubPath:@«<hub name>"];
[hub registerNativeWithDeviceToken:deviceToken];
Android
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
NotificationHub hub = new NotificationHub("<hub name>", "<connection str>", this);
String regid = gcm.register(SENDER_ID);
hub.register(regid);
@cloudbeatsch
var hub = NotificationHubClient.CreateClientFromConnectionString(
"<connection string>", “<hub name>");
hub.SendWindowsNativeNotificationAsync(@“<toast>
<visual>
<binding template="ToastText01">
<text id="1">This is a very simple notification</text>
</binding>
</visual>
</toast>“);
hub.SendAppleNativeNotificationAsync(@“{ aps: {
alert: "This is a very simple notification"
}}“);
hub.SendGcmNativeNotificationAsync(@“{"data" : {
"msg" : "This is a very simple notification"
}}");
@cloudbeatsch
templates
achieve platform independency
@cloudbeatsch
Android app
iOS app
{
aps: {
alert: "$(msg)"
}
}
notification hub
{
"data" : {
"msg" : "$(msg)"
}
}
app
back-end
hub.send(“
{msg: “hello”}
”);
@cloudbeatsch
Android app
iOS app
{
aps: {
alert: "hello"
}
}
notification hub
{
"data" : {
"msg" : “hello"
}
}
app
back-end
hub.send(“
{msg: “hello”}
”);
apns
gcm
@cloudbeatsch
templates
personalize notifications
@cloudbeatsch
Android app
iOS app
{
aps: {
alert: "$(msg_AF)"
}
}
notification hub
{
"data" : {
"msg" : "$(msg_EN)"
}
}
app
back-end
hub.send(“
{msg_EN: “good morning”}
{msg_AF: “goeie môre”}
”);
@cloudbeatsch
Android app
iOS app
{
aps: {
alert: "goeie môre"
}
}
notification hub
{
"data" : {
"msg" : “good morning"
}
}
app
back-end
apns
gcm
hub.send(“
{msg_EN: “good morning”}
{msg_AF: “goeie môre”}
”);
good
morning
goeie
môre
@cloudbeatsch
register templates:
Bob: {“image”:“$(img_5_days_C_EN)”}
Ben: {“image”:“$(img_3_days_F_EN)”}
Peter: {“image”:“$(img_3_days_C_AF)”}
notification message:
img_5_days_C_EN:”url1”,
img_5_days_F_EN:”url2”,
img_3_days_C_EN:”url3”,
img_3_days_F_EN:”url4”,
img_5_days_C_AF:”url5”,
img_5_days_F_AF:”url6”,
img_3_days_C_AF:”url7”,
@cloudbeatsch
tags
route notifications based on topics
@cloudbeatsch
Android app
iOS app
register tags: Eastern_Cape
notification hub
register tags: Western_Cape
app
back-end
tags: Western_Cape
msg: “weather warning”
msg: “weather warning”
weather
warning
@cloudbeatsch
Android app
iOS app
register tags: Eastern_Cape
notification hub
register tags: Western_Cape
app
back-end
tags: Western_Cape,Eastern_Cape
msg: “weather warning”
msg: “weather warning”
weather
warning
weather
warning
@cloudbeatsch
Android app
iOS app
register tags: Eastern_Cape,Western_Cape
notification hub
register tags: Western_Cape
app
back-end
tags: Western_Cape
msg: “weather warning”
msg: “weather warning”
weather
warning
weather
warning
@cloudbeatsch
Android app
iOS app
register tags: Western_Cape,Eastern_Cape,Heavy_Rain
notification hub
register tags: Western_Cape,Gails,Big_Waves
app
back-end
tags: (Western_Cape && Heavy_Rain)
msg: “weather warning”
msg: “weather warning”
weather
warning
@cloudbeatsch
tags are just strings
user:richard
group:id && !user:richard
device:sn0122299938
user:richard && device:sn0122299938
timezone:PST && follows:thaifood
version:1.0 && platform:Android
@cloudbeatsch
demo
weather warning app for south africa
@cloudbeatsch
under the hood
it’s the azure service bus
@cloudbeatsch
Gateway
Gateway
app
back-end
pns
iOS app
Notification
Message
Broker
Gateway
Store
Registratio
n Store
Messaging
Store
scale unit
@cloudbeatsch
in closing …
@cloudbeatsch
scaling push notifications
notification hubs are your friends
@cloudbeatsch
interconnect things (aka IoT)
service bus is a friend too
@cloudbeatsch
get started
www.azure.com

More Related Content

PDF
Sprayer: low latency, reliable multichannel messaging
PPTX
Hybrid organization building modern business apps with windows azure notifica...
PDF
20141021 AWS Cloud Taekwon - Big Data on AWS
PPTX
Enterprise-grade mobile barcode scanning with Scandit and Xamarin
PDF
Enterprise Mobile Success with Oracle and Xamarin
PPTX
Cross Platform Mobile Development with C# and Xamarin
PDF
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
PDF
Building Event-driven Serverless Apps
Sprayer: low latency, reliable multichannel messaging
Hybrid organization building modern business apps with windows azure notifica...
20141021 AWS Cloud Taekwon - Big Data on AWS
Enterprise-grade mobile barcode scanning with Scandit and Xamarin
Enterprise Mobile Success with Oracle and Xamarin
Cross Platform Mobile Development with C# and Xamarin
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
Building Event-driven Serverless Apps

What's hot (8)

PDF
Application Server-less Web Applications - Serverless Toronto Meetup
PPTX
Highlights from the Xamarin Evolve 2016 conference
PPTX
Salesforce APIs
PDF
Event-driven (serverless) Applications
PPTX
Android Cloud to Device Messaging with the Google App Engine
PPT
API Façade Pattern
PPTX
Xamarin cross platform
PPTX
Serverless everywhere
Application Server-less Web Applications - Serverless Toronto Meetup
Highlights from the Xamarin Evolve 2016 conference
Salesforce APIs
Event-driven (serverless) Applications
Android Cloud to Device Messaging with the Google App Engine
API Façade Pattern
Xamarin cross platform
Serverless everywhere
Ad

Similar to Scaling push notifications to millions of devices using notification hubs (20)

PPTX
Azure notification hubs
PPTX
Google DevFest MN - Windows Azure Notification Hubs
PPTX
Mobile March Windows Azure Notification Hubs
PDF
Cross Platform Mobile Push Notifications with Azure Notifications Hub
PDF
Mobile Push Notifications
PPTX
Net campus15 notification-hub
PPTX
AZURE NOTIFICATION HUB
PDF
Push to Me: Mobile Push Notifications (Zend Framework)
PPTX
Push_notifikacije_na_Azureu[1]
PDF
REST is not enough: Using Push Notifications to better support your mobile cl...
PPTX
St. Louis Day of .NET 2013 - Delivering Push Notifications to Millions of Mob...
PDF
Lime - Push notifications. The big way.
PPTX
Delivering Millions of Push Notifications in Minutes
PDF
Zend Framework Push Notifications
PDF
Leveraging Zend Framework for Sending Push Notifications
PDF
In the hunt of 100% delivery rate with mobile push notifications
PPTX
Push Notification
PDF
Get step-by-step instructions on implementing notifications in your apps.
PPTX
Ticketing Technology Forum - Opportunities within cloud technology
PDF
Push-Notification
Azure notification hubs
Google DevFest MN - Windows Azure Notification Hubs
Mobile March Windows Azure Notification Hubs
Cross Platform Mobile Push Notifications with Azure Notifications Hub
Mobile Push Notifications
Net campus15 notification-hub
AZURE NOTIFICATION HUB
Push to Me: Mobile Push Notifications (Zend Framework)
Push_notifikacije_na_Azureu[1]
REST is not enough: Using Push Notifications to better support your mobile cl...
St. Louis Day of .NET 2013 - Delivering Push Notifications to Millions of Mob...
Lime - Push notifications. The big way.
Delivering Millions of Push Notifications in Minutes
Zend Framework Push Notifications
Leveraging Zend Framework for Sending Push Notifications
In the hunt of 100% delivery rate with mobile push notifications
Push Notification
Get step-by-step instructions on implementing notifications in your apps.
Ticketing Technology Forum - Opportunities within cloud technology
Push-Notification
Ad

More from cloudbeatsch (7)

PPTX
Technologie als entscheidender Baustein für Smart Cities
PPTX
Proximity based interactions
PPTX
Large scale nlp using python's nltk on azure
PDF
The Rise of the Machines - A Primer to Machine Learning and Predictive Analyt...
PPTX
The opportunity when technology trends converge
PDF
cloud computing – an opportunity to disrupt
PDF
ScaleConf 2013 - Scaling on Windows Azure
Technologie als entscheidender Baustein für Smart Cities
Proximity based interactions
Large scale nlp using python's nltk on azure
The Rise of the Machines - A Primer to Machine Learning and Predictive Analyt...
The opportunity when technology trends converge
cloud computing – an opportunity to disrupt
ScaleConf 2013 - Scaling on Windows Azure

Recently uploaded (6)

PDF
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
PDF
Lesson 13- HEREDITY _ pedSAWEREGFVCXZDSASEWFigree.pdf
DOC
证书学历UoA毕业证,澳大利亚中汇学院毕业证国外大学毕业证
PPTX
ASMS Telecommunication company Profile
DOC
Camb毕业证学历认证,格罗斯泰斯特主教大学毕业证仿冒文凭毕业证
PDF
heheheueueyeyeyegehehehhehshMedia-Literacy.pdf
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
Lesson 13- HEREDITY _ pedSAWEREGFVCXZDSASEWFigree.pdf
证书学历UoA毕业证,澳大利亚中汇学院毕业证国外大学毕业证
ASMS Telecommunication company Profile
Camb毕业证学历认证,格罗斯泰斯特主教大学毕业证仿冒文凭毕业证
heheheueueyeyeyegehehehhehshMedia-Literacy.pdf

Scaling push notifications to millions of devices using notification hubs