Azure notification hubs - can they send psh notifications without third parties - azure

Doing some learning around Azure Notification hubs and trying to understand one of the basic concepts but not able to find any documentation that states it explictly.
Is an azure notification hb able to send a push notification directly or does it have to have a third party set up in its settings (ie APNS, GCM.FCM, WNS, MPNS,ADM, Baidu)?

Azure Notification Hubs (ANH) must be configured with credentials for one or more of the push notification services (PNS) that you've enumerated.
Essentially, each of these providers have a reliable mechanism for delivering a specific notification to a specific device, some of them also provide mechanisms for delivering the same notification to many devices. But those solutions are usually limited to just their platform.
ANH seeks to provide a wrapper for each PNS that provides routing and scale to target many devices with a single request, so that you don't need to write that code separately for each platform. Using more advanced techniques, like templates, can even allow you to abstract away platform differences altogether.
However, ANH is not an alternative to the PNSs you've listed. I hope that helps.

Related

How to think about useful integration scenarios using Event Grid and Service Bus together?

Summary
I'm trying to reason about a few integration patterns around using Azure Service Bus and Event Grid in the context of a microservices-based architecture. I like service bus for the transaction support, load leveling, sessions and so on. Just looking for feedback on the way I'm reasoning about them being used together for internal microservice communication and also provide events to external partners via webhooks.
Option 1
Say I already use service bus for microservices communication, but I would also like to publish to event grid to support publishing via webhooks to partner services outside my trust boundary. I'm thinking to have an Azure function (or similar) to receive my custom service bus topic events and the publish them to Event Grid.
This would also allow for the webhook event to be different than the internal events.
Is there any other option (e.g., some service bus premium feature) that could provide that integration out-of-the-box (ootb)? I'm only aware of service bus system events being pushed to Event Grid ootb.
Option 2
Have your microservices publish events only to Event Grid and then have Event Grid events pushed to your service bus topic. It would allow the webhook option in certain cases without much extra, but it seems odd for all my microservices to publish to Event Grid if I need to them have that generally pushed to service bus for load leveling and so on.
I would rather use service bus for my microservice communication. There are other drawbacks as well. It would only seem to make the webhook option a little more straightforward.
Option 3
Have the event publisher that wants to send webhook-related events publish to both Event Grid and service bus. This seems like a really bad idea and generally clumsy, even if you were able to abstract it away somewhat in code. It seems like it would be a worse version of option 1.

Webhook architecture for managing millions of subscribers (who are customers)

My Azure based SaaS system publishes events and I have customers who wish to subscribe to them - webhooks seem undeniably the right architecture (And I'm currently a happy consumer of webhooks). I've found lots of great documentation and case studies on best practices (e.g. http://resthooks.org) however I've not managed to find an existing architecture, framework, project, sample or solution that implements the best practices.
I could build my own solution however I don't want to reinvent the wheel. I was expecting to find an existing framework (e.g. on Github) created by people much smarter than I but haven't had any success.
I currently use a number of Azure services (such as Service Bus, Cosmos, Table Storage) internally and consume using Azure Functions but what I don't have is an architecture for allowing my customers to subscribe to these events.
Specifically I'm looking for best practices and code samples on how to manage potentially millions of subscribers (who are external customers) and the approach to distribute the webhooks out to each of them.
I already understand how to publish and consume webhooks where I am an individual subscriber and there are already some great samples available - https://github.com/aspnet/AspLabs/tree/master/src/WebHooks
Can anyone point me in the right direction? (Preferably to a .NET / C# based solution)
Not sure if this is the 'right' direction but here are my current thoughts on a solution.
We are currently using CosmosDb and are leveraging the change feed to trigger an Azure function execution. The code within the function does a specific task for all tenants in our system. This code will be changed to simply send a new event to the Event Grid topic. A 'in-house' subscription will then be added that will handle what the function code is currently doing today.
We will then follow the subscription management guidance Zapier offers. In a nutshell it is to expose the capability to our customers to subscribe to the events that we publish via a few endpoints. In addition to standard CRUD stuff when a tenant adds/removes a subscription the code will leverage the Event Grid Management SDK to add/remove subscriptions to the appropriate topics within Event Grid (samples here). The subscriptions that get added will have filters set to ensure each tenant only receives their own events.
There are limitations to the number of subscriptions and topics with in Azure (details here). These limitations are acceptable in our case but is something you might need to look into more if you need to reach 1mm subscribers.
Here is how I visualize it:
Not 100% we'll build this but if we do I'll post back here any gotchas we uncover.
Cheers!

How to set Time To Live (device expiry) without using C# on Azure Notification Hub

I know Improved Per Message Telemetry and device expiry for Notification Hubs article describes setting TTL programmatically, but this seems a bit of a roundabout method, especially when maintaining multiple environments.
Is there any way to perform this through the Azure portal?
At the moment there's no way to set the property through the portal, unfortunately.
One alternative to using C# would be to create/update your hub through REST API by using RegistrationTtl property on Notification​Hub​Description object
You can also leave feedback about it and if enough people upvote it, the product team will prioritize the feature.

Badge management with Azure Notification Hubs

I am investigating migrating from Azure Mobile Services push notifications to Azure Notification Hubs for two primary benefits: 1) pub/sub architecture using tags, and 2) abstracting the device registration.
However, I'm struggling to understand the pattern for device badge value management.
With mobile services push notifications it's straightforward to maintain the current badge value in the db for individual device registrations. But with Notifications Hubs where Azure maintains the 'subscribed' devices registrations and manages the fan out of device notifications, what is the best approach for the client devices to update their current badge value with Azure Notification Hubs?
I have reviewed the Azure documentation, viewed several of the excellent overview videos, such as Channel 9 Cloud Cover episode 100, but documentation and examples seem to be lacking with regard to Notification Hubs and management of badge values.
Thanks for your help, friends!
Unfortunately badge management is not straightforward in a pub/sub architecture. If you use tags to indicate individual users then you can keep your counter in your backend and then add it in your notification when sending to your hub.
In you are using tags as interest group, then things are not straightforward, and they depend on what you want that count to be. For some platforms (i.e. iOS and ANdroid) you can code some client code that keeps a personalized counter. Some other times however, one has to avoid keeping personalized counters and resort to use generic badges like "!" in Windows 8.

What are service bus and access control?

I am having a hard time understanding Windows Azure service bus and access control concepts. In layman's terms, what are they? What are they used for?
The Service Bus component of Windows Azure is meant to handle the problems arising from services that are living in multiple networks. Basically, a service bus just makes it appear as if your code is running on a single machine, while in reality it could be running anywhere within the Azure datacenters.
Access Control lets you use "federated authentication for your service based on a claim-based RESTful model. (Sorry, copy&Paste from an O'Reilly book about Azure!)
Basically, when you create an Azure site, application or service, it could be running on any of the thousands of systems within the datacenter. And each of those systems has it's own IP address, it's own network, memory, processor and whatever more. To let them collaborate and to appear as a single system, these two services have been created.
If you want to learn more about Azure, this would be a good moment to buy a book! :-)
Azure is quite complex and service buses and access control are a bit more advanced topics.
Service Bus is a solution for the integration between multiple applications whether they are hosted on the same infrastructure or even spread along multiple infrastructure or/and Cloud Computing provider. If you search more in the internet you might find a lot about EAI (Enterprise application integration) here is my blog post about this topic:
http://hhaggan.wordpress.com/2013/03/07/introduction-to-enterprise-application-integration-eai/
and here another that I hope that helps you understand better what is the service bus:
http://hhaggan.wordpress.com/2013/03/09/introducing-service-bus/
in another words, it is a messaging platform that helps you communicate with multiple applications, softwares or services no matter what programming language they are written with or on which os or platform they are hosted on. you will feel its effect specially when you work on connecting multiple nodes together, I don't mean 5 or 6 nodes but 10 and above.
Certainly there are several types of service bus, whether they are based on relayed messaging service or brokered messaging service, each one of them has several uses, its purpose and way of working.
For the Access control, this is so easy, it is a way of authentication and authorization for your application using third parties, It is a claim based identity that you can do the required authentication through the third party database. you wont need to build everything from scratch in your database. this helps a lot during development and I believe that this can help a lot in social media marketing and branding because of the use of facebook, twitter during the authentication.

Resources