Last post May 25, 2018 01:46 PM by trustlife
May 22, 2018 09:17 AM|markus dresch|LINK
What's the recommended pipeline to forward messages from IoT Hub to SignalR Service on Azure? Also, is there any documentation on the REST API provided by SignalR Service?
May 23, 2018 09:24 AM|Fei Han - MSFT|LINK
Hi markus dresch,
As far as I know, Azure SignalR service does not provide option that we can configure to integrate Azure SignalR service with your Azure IoT Hub directly.
Azure SignalR Service is an Azure service based on ASP.NET Core SignalR that simplifies the process of adding real-time web functionality to applications over HTTP. If you’d like to programmatically access your Azure IoT Hub and implement real-time web
functionality via SignalR, you can build your own web app project using SignalR for ASP.NET or ASP.NET Core SignalR.
May 23, 2018 11:01 AM|markus dresch|LINK
Hi Fei Han,
thanks for the information. The SignalR Service was announced with a REST API that i haven't seen documented anywhere yet. I was thinking along the lines of calling that REST API from an IoT Hub event to broadcast a message on SignalR.
Since GlobalHost is not available on SignalR Service / Core, i would have to implement an additional service that listens for IoT Hub events and connects to SignalR as a client to broadcast a message. Is this the correct way to implement this? Or does the
REST API provide a way to publish messages?
May 23, 2018 11:28 AM|mgebhard|LINK
As far as I understand and the bit that I played with, IoT is itself a service framework for working with embedded devices. There's built in security and such... I don't see the use case for adding SignalR which is a browser feature. Can you explain
the problem you are trying to solve?
Anyway, Web API is just a web application. As long as IoT can send an HTTP request to Web API then Web API simple process the request and updates the clients.
May 23, 2018 11:52 AM|markus dresch|LINK
thanks for your input, mgebhard. i'd like to implement a pattern similar to the one SignalR Service advertises:
May 23, 2018 01:01 PM|mgebhard|LINK
The diagram shows essentially what I explained above. The IoT framework sends a request to the SignalR service and the SignalR service sends the data to the connected clients.
May 23, 2018 01:42 PM|markus dresch|LINK
my issue is with how the iot framework sends a request to the SignalR Service. is there an API available on SingalR Service to be called by an IoT event (that's what i expected from the announced but undocumented REST API) or do i have to implement
some kind of mediator that listens for IoT events and talks to SignalR?
because i can't send messages from Web API to clients outside of a SignalR Hub if i'm not mistaken. this was possible with GlobalHost, which is not available in SignalR Core.
May 24, 2018 09:47 AM|markus dresch|LINK
alright, got it working with the answer to this:
still wondering if this is provided with SingalR Service REST API though.
May 25, 2018 01:46 PM|trustlife|LINK
I found this:
See this example AzureSignalR.cs