azure-signalr
azure-signalr copied to clipboard
Running Azure SignalR Emulator in docker
Is your feature request related to a problem? Please describe.
We have an application working in docker but it relies on an instance of an Azure SignalR Service hosted on cloud. Due to some business reasons, we want each instance of the docker image to use a segregated version of signalR service. Therefore, we want to embed the SignalR Emulator in it.
Describe the solution you'd like
I'd like to see an example of setting up this emulator in docker.
May I ask the reason for not using self-host SignalR?
@vicancy The reason is that the self-hosted signalR broadcasts disconnection event and all subscribers catch and process that in the development environment. This issue causes mishaps while testing the code by multiple developers.
the self-hosted signalR broadcasts disconnection event
Could you illustrate this more? I think the disconnection event is triggered by one Hub server only.
the self-hosted signalR broadcasts disconnection event
Could you illustrate this more? I think the disconnection event is triggered by one Hub server only.
The disconnection event will be caught and handled by all instances of the signalR client applications. We share docker images among developers which contains all tiers of our application (e.g. Azure Functions, ASP.NET app, etc.). Putting a SignalR emulator instance in our docker image rather than creating multiple services on Azure helps us have a more abstract environment.
The disconnection event will be caught and handled by all instances of the signalR client applications
Do you mean "disconnection" event for a SignalR client? one SignalR client disconnect triggers one "disconnection" event for this particular client. Sorry but I still failed to get your real problem here.
The emulator is designed for easy local debugging for the transient serverless scenario, I am a little concerned about the design limitation and code quality of the Emulator to meet the PROD usage bar. Anyway, you can always install the Emulator using dotnet tool install -g Microsoft.Azure.SignalR.Emulator --version 1.0.0-preview1-10809
as the same way you install any other dotnet tools in docker if you like.
Do you mean "disconnection" event for a SignalR client?
Yes
Why "disconnection" event for one SignalR client will be handled by all instances?
Please feel free to reopen the issue if there are any updates.
It would be nice to have the emulator work with docker for the purpose of docker compose (e.g., cosmos db, azurite) and for use with Azure Functions which may not be dotnet.