Is there any way to get all active connection using Azure SignalR service in Azure Function app? - signalr.client

I am learning azure signalR service and I am stuck on fetching all active connections which are currently connected to the application. Is there any way to get all active users?

Related

Accessing Azure SQL database for my react web application

I've deployed an Azure web application with a SQL database. For the frontend I use ReactJS. I’ve successfully connected to the SQL database with NodeJS, and I can execute queries and reach the data in the sql database. So at this point I want to use that data in the frontend. I can only see the data in my terminal, I guess I have a missing piece for the communication between the server side and the client side. So my question is how I can get the data to the frontend?
Happy for any suggestions.
You must create a endpoint that allow your frontend make a http request to your node app.
Your node app should get the data from the DB and return as response of the request.
Then your frontend will get the data you want.
frontend ---http request (ajax, fetch)-->backend node app --query-> database
Create a REST API with Node
Using Fetch
Client Tier is your React app (frontend)
Application Tier is your Node App (backend)
Database Tier the name talks for herself :D

How do you Authenticate a NestJS API to a Azure Industrial IoT Plattform?

My companys Services are a little bit complicated. Thats why my company demands that i write an NestJS API that requests the Data from the Azure Industrial IoT Services(those are APIs or hubs i dont realy know) for a particular job.
My problem now is, that i dont know how to authenticate nestjs to azure. So that i can request from those Azure Services the Data.
The structure of this project looks like this:
AZURE - Services are behind<--------->NestJS-Api + Postgres<---------->AngularApp
The nestJS-Api should have authorisation to request data 24/7(the whole time)
If you want to manage Azure services such as create/delete an Azure IOT hub service, you will need to get an access token by passport.js and call Azure management API.
But if you already have an Azure IOT hub service, you want to use this service by API, and you are facing the authentication issue, you can just refer to this official guide.

Can I used Redis as SignalR Backplane for Server Side Blazor application?

I'm planning to buid a Server Side Blazor application.
It will be containerized with Docker and deployed to Amazon AWS, so in order to handle the scale-out for the service I don't have the option to use Azure SignalR service as Microsoft recommends in their documentation (see https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/server?view=aspnetcore-3.1#signalr-configuration).
We are curently using Redis as a backplane to manage our SignalR connections for another service, and I was wondering if it is possible to also use it in the same way for the Server Side Blazor application (see https://learn.microsoft.com/en-us/aspnet/core/signalr/redis-backplane?view=aspnetcore-3.1).
What do you think?
Thanks,
Xavi

Create SignalR server to use across multiple applications

I am building a micro-service-oriented .NET Core web application and now I want to add real-time communication. It is possible to create a SignalR server and publish it on Azure? I want to use it in my microservices to send messages to users when a certain even occurs.
Yes, you can deploy your app to Azure and point your users to your hub endpoint with no problems. You have two options here:
Use SignalR and manually manage the connections and other signalR stuff if you will scale your application. For example, when you have 2 web apps and the client connects to one of them, you need to "tell" to other app that you have a new client connected using for example Redis Blackplane.
Use Azure SignalR and this kind of management is not needed, what you need to provide is only 1 app with the hub logic. So when a client connects to your hub it is automaticaly redirected to the Azure SignalR.
You can read more about this two options here:
https://learn.microsoft.com/pt-pt/azure/azure-signalr/signalr-concept-scale-aspnet-core
Why not deploy SignalR myself?´
It is still a valid approach to deploy your own Azure web app supporting ASP.NET Core SignalR as a backend component to your overall web application.
One of the key reasons to use the Azure SignalR Service is simplicity. With Azure SignalR Service, you don't need to handle problems like performance, scalability, availability. These issues are handled for you with a 99.9% service-level agreement.
Also, WebSockets are typically the preferred technique to support real-time content updates. However, load balancing a large number of persistent WebSocket connections becomes a complicated problem to solve as you scale. Common solutions leverage: DNS load balancing, hardware load balancers, and software load balancing. Azure SignalR Service handles this problem for you.
Another reason may be you have no requirements to actually host a web application at all. The logic of your web application may leverage Serverless computing. For example, maybe your code is only hosted and executed on demand with Azure Functions triggers. This scenario can be tricky because your code only runs on-demand and doesn't maintain long connections with clients. Azure SignalR Service can handle this situation since the service already manages connections for you. See the overview on how to use SignalR Service with Azure Functions for more details.
Yes you can, this is the official quick start sample.
https://learn.microsoft.com/en-us/azure/azure-signalr/signalr-quickstart-dotnet-core

Azure Data Sync Rest API

Is there a REST API that I can use instead of this application? I currently using the Data_Sync_Preview_REST_API.pdf but I think it doesn't have the capability to add your local server to Azure. I need the functionality with the arrows below for Register and Submit Agent Key via API or something that can Add an on-premises SQL Server database with API.