Кирилл Гаврилюк, microsoft

22
Одновременная доставка мобильных push-уведомлений миллионам пользователей КИРИЛЛ ГАВРИЛЮК ВЕДУЩИЙ РУКОВОДИТЕЛЬ ПРОЕКТА WINDOWS AZURE MOBILE

Upload: ontico

Post on 15-Jun-2015

397 views

Category:

Documents


2 download

DESCRIPTION

HighLoad++ 2013

TRANSCRIPT

  • 1. push- WINDOWS AZURE MOBILE

2. push-? push-Windows Azure Notification Hubs Bing News Notification Hubs 3. Push-? iOS Windows 8.x ? 1000 SMS 50100%, 10x email 4. Push- 101 1. Platform Notification Service (PNS) 2. (Windows 8.x, WinPhone, iOS, Android, ) PNS, client app 3. PNS4.Platform Notification ServicePNS 5. / ..App back-end 5. push- PNS (HTTP vs. TCP, xml vs. JSON payload) ( vs. vs. )PNS ; / // , , 6. Windows Azure Notification Hubs Platform Notification Service (PNS) Notification Hub /Google appiOS appWindows 8.x appApp back-end / Notification HubNotification Hub PNSGCMNotification HubAPNsWNS 7. Windows Azure Notification Hubs iOS / Android (GCM) / Windows 8.x/ Windows Phone 7.x & 8 PNS .NET, Java, PHP, Ruby, Node.js, etc; API . Notification Hub , , , , , , , , 8. , Tag:Football: API call App back-end : + , : Notification HubTag:HockeyTag:Football 9. $(message) Alices Surface Windows Store ToastText01 Hello!Bobs iPhone Apple toast: { aps: {alert: $(message)}}{ message: Hello! } : {message: Hello!}.App back-endService Bus Notification Hub Hello!{ aps: { alert: $(message) } } 10. var hub = new NotificationHub(", ""); var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();await hub.RegisterTemplateAsync(channel.Uri, toastText01Template, ToastTemplate", FootballTag"); 11. (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *) deviceToken { SBNotificationHub* hub = [[SBNotificationHub alloc] initWithConnectionString: @"" notificationHubPath:@"mynh"]; [hub registerTemplateWithDeviceToken:deviceToken name:@AlertTemplate jsonBodyTemplate:template tags:@FootballTag completion:^(NSError* error) { if (error != nil) { NSLog(@"Error registering for notifications: %@", error); }}]; } 12. In your main activity:Notification Hub hub = new NotificationHub("", "", context); GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context); String regid = gcm.register(SENDER_ID); TemplateRegistration r = hub.register(regid, template, FootballTag); 13. var azure = require('azure'); var notificationHubService = azure.createNotificationHubService('hubname', 'connectionString');'FootballTag', { message: 'Its a goal!' } if (!error) { // message sent successfully } });function (error) { 14. Bing News Windows 8.x, Windows Phone 8 Windows 8 & 8.1 devices Notifications Hubs 15. Bing News ~100 16. Mailbox sends/tags/day, Events sends; Campaigns sends 17. Notification Hubs MessagesRegistrationsPush WorkersGatewayWNSWork Order QueuesAPNsGCM/ DBsPNS feedback processingMPNS 18. Breaking News Registrations Broadcast Messages Gateway gateway Push WorkersWork Order Queues PNS / DBsPNS feedback processing 19. Events & Campaigns Registrations Broadcast Push Workers Messages Work Order Queues ?Gateway ? Device handles/tags DBsPNS feedback processing 20. Mailbox RegistrationsMessages messages Work order queues , Async PNSs feedbackPush WorkersGatewayWork Order Queues - Device handles/tags DBsPNS feedback processing 21. Q&A MessagesRegistrationsPush WorkersGatewayWNSWork Order QueuesAPNsGCMDevice handles/tags DBsPNS feedback processingMPNS 22. http://AzureHub.ru Windows Azure Windows Azure http://facebook.com/groups/azurerus/ [email protected] Windows Azure http://windowsazure.com/ru-ru/pricing/free-trial/