Recommended Azure Service framework for many clients to many subscribers

RJBreneman 201 Reputation points
2020-08-03T18:35:03.367+00:00

I want to assign groups of mobile devices to on-premise desktop clients. There will be many thousands of individual desktop clients, each with it's own unique set of mobile devices. I need the devices to open some kind of real-time, two-way communication channel that their assigned desktop client is listening to but all other desktop clients are not listening to. I need the desktop client to make an authenticated connection to some Azure service and create the listening channel that is just for it and its group of devices if it doesn't already exist.

I am completely new to these kinds of services. I am looking at Azure Relay and Azure Service Bus with Message, Queue or Topic. It seems like Relay would be the most direct communication but I don't see anything in Microsoft.Azure.Relay Namespace that would allow a desktop client to create a hybrid connection uniquely for itself and its assigned devices. Because of the thousands of desktop clients, they absolutely must be able to programmatically create the specific service name, whether a relay hybrid connection or a service bus message topic.

If someone could give me some suggestions for the right framework for my scenario, that would be most helpful. Thanks.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
703 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,941 Reputation points Moderator
    2020-08-04T03:39:00.64+00:00

    Hi @RJBreneman

    Microsoft Azure Service Bus Messaging (Queues and Topics) is a fully managed enterprise integration message broker. Queues and Topics provide unidirectional messaging. To facilitate bi-directional communication, Azure provides a Relay messaging service. You can use azure relay on any platform and in any language. Hybrid Connections feature in Azure Relay is based on HTTP and WebSockets protocols. It allows you to send requests and receive responses over web sockets or HTTP(S). This feature is compatible with WebSocket API in common web browsers. You can choose between WCF relay or hybrid connection on your particular needs.
    15356-image.png

    You need to have your own business logic that will create unique hybrid connections and clients (assigned devices) connecting to them.
    Once you create the hybrid connection you will get the unique endpoint and any client providing the right credential and endpoint details can connect to it.
    You should have your own logic that tells the devices to which endpoint they need to connect.

    You can go through below article to get more familiar with azure relay services:
    Hybrid Realy vs WCF Relay: https://learn.microsoft.com/en-us/azure/azure-relay/relay-what-is-it#hybrid-connections-vs-wcf-relay
    Hybrid Connection web socket: https://learn.microsoft.com/en-us/azure/azure-relay/relay-hybrid-connections-dotnet-get-started
    Hybrid Connection Http Request:https://learn.microsoft.com/en-us/azure/azure-relay/relay-hybrid-connections-http-requests-dotnet-get-started
    Receiving and handling HTTP requests anywhere with the Azure Relay: https://azure.microsoft.com/en-in/blog/receiving-and-handling-http-requests-anywhere-with-the-azure-relay/
    Quota Limit : https://learn.microsoft.com/en-us/azure/azure-relay/relay-faq#quotas
    Relay Sample: https://github.com/Azure/azure-relay/tree/master/samples

    Updated:

    17004-image.png

    Service Bus: Doesn’t support bi-directional communication. You need to have your own business logic creating different entities (queue/topic) to make it two-way communication. If there are many (ex 1000) subscriptions under topics along with different rules in each subscription for communication specific to each device then there will be high utilization of backend resource as topic tries to deliver a message to each subscription and according to subscription rule it will deny/accept that message. There could be other limitations of the number of subscriptions per topic you need to look into. The service bus provides you reliability and a persistent store of messages.

    Azure Relay: It supports bi-directional communication and client/server need to be up and running for communication. There is some limitation that how many listeners that can be connected. The messages won't persist and can be lost if there is an issue with the mobile devices/offline etc.

    Signal R: It supports bi-directional communication and client/server need to be up and running for communication. The messages won't persist and can be lost if there is an issue with the mobile devices/offline etc.

    IoT Hub: It supports bi-directional communication, provides reliability and persistent store of messages.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.