This repository contains sample code demonstrating how to connect frontend to backend using SignalR and messaging.
In order to run the sample code, several infrastructure components need to be installed:
- Frontend Web apps and backend services are hosted in Azure Cloud Services and Azure SDK for .NET 2.9 is required to run them locally in an emulated environment.
- NServiceBus framework is used to connect the frontend to the backend. This sample uses RabbitMQ as transport.
- Redis is used as the backplane to scaleout SignalR.
Please refer to documentation of each individual component for download and setup instructions.
RabbitMQ connection string can be configured by setting the Value
property of the Shared.RabbitMqConnectionString
class in the Shared
project.
Redis connection parameters such as server address, port, and password can be configured by setting relevant properties of the Frontend.Config.RedisConnectionData
class in the Frontend
project.
When running Redis locally with no password required, the Password
property should be set to an empty string.
In order to run the sample code locally using Azure Compute Emulator, set the CloudService
project as the startup project and configure it to run using the full emulator. This allows multiple instances of the frontend Web app and the backend service to execute in a load balanced environment (as opposed to the express emulator which is limited to a single instance). Full emulator requires Visual Studio to run with elevated privileges.