Introduction:
In this article, I walk you through "Azure SignalR Service" using Buyer-Supplier sample application. Azure SignalR service provides a real time communIcation between your applicatrion/pages.
We will cover couple of more Azure Services like Azure Functions, Azure Service Bus & Azure SQL Database. We will have one Buyer application in Asp.net core Razor Forms and ONE Supplier application in Asp.net core MVC.
Prerequisites: Azure Account for setting up Azure Services (SignalR, Functions, Service Bus etc) Visual Studio 2019 (For buyer and supplier application)
Application Flow:
Buyer Application - Buyer will create an order for an item with quantity.
Supplier Application - Supplier will get notified (A prompt message on his screen) that a buyer has added a new order.
Supplier Application - Supplier will approve or reject the buyer orders.
Buyer Application - Buyer will get notified on his screen that supplier has approved/rejected his order.
The notification(Buyer/Supplier) will get triggered by Azure SignalR Service. It means we will be registerting our application/pages to the SignalR service
Project Structure:
1. Entities - Contains a class "ActiveOrder" which is used for storing the active orders data from UI and Database
2. Common - Here we have AppSettings.cs class, it used for storing the appSettings values from app.config files in #5 UI projects
3. DB - DB Schema and Stored Procedures used in application
4. OrderPRocessingFunctionApp - Azure Function application
5. UI - Buyer and Supplier - Client applications, one is for buyer and one is for supplier
Design/Flow:
Buyer:
Supplier: