This document provides an agenda for a presentation on real-time communication with Azure Functions and Azure SignalR. The presentation will cover an introduction to real-time communication and SignalR, the components of SignalR, how to use Azure SignalR service, how to integrate Azure Functions with Azure SignalR, and will include two demos of HTTP trigger functions and an IOT hub integration. The presentation is aimed at helping improve user experience through real-time updates and provides next steps for attendees to learn more through documentation and code samples.
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Real time communication with Azure Functions with Azure SignalR
1. PRESENTS
https://www.meetup.com/techmeet360 March 12, 2022
Brought to you by
Azure Serverless Saturday 2022
Dinusha Kumarasiri
Senior Solution Architect at LB Finance PLC
Real-time communication with Azure
Functions with Azure SignalR
2. Brought to you by
• Senior Solution Architect at LB Finance PLC
• Former Microsoft MVP
• Microsoft Certified Trainer (MCT)
• Cloud enthusiast
• Love to Share what I know
2
About Me
3. Brought to you by
• Real-time communication
• SignalR & Azure SignalR
• Components of SignalR
• Azure Functions & Azure SignalR
• Demo
• Next steps
3
Agenda
4. Brought to you by
Server-side code pushes content to connected clients as content
generated, in real-time
4
Real-time communication
Dashboards Chat Games Business Applications
5. Brought to you by
5
Achieving for Real-time communication
Polling Long Polling Forever Frame
Server-Sent Events Web Sockets
Events
Push
Subscribe
Get message Service
Client
6. Brought to you by
SignalR is an open source web library developed by Microsoft to
achieve real-time communication
6
Realtime communication with SignalR
Persistent connectivity
between client and server
Automatically fallback to
other protocols if web-
sockets is not supported
Supported in many
platforms
8. Brought to you by
• Quickly and easily achieve real-time web functionality alongside
with other cloud workloads
8
Azure SignalR service
Automatically switch
between protocols
Native ASP.NET
Core support
Client support
(SDK)
Large scale client
connections
Decouples SignalR
logic from your
application
Allows to use
various messaging
patterns
9. Brought to you by
9
Azure SignalR to improve user experience
10. Brought to you by
10
Azure SignalR components
• Negotiate endpoint responds to
client’s negotiation requests and
redirect clients to SignalR service
• When application starts, it opens 5
WebSocket connections per Hub
• Connections will remain open
11. Brought to you by
• Azure Functions allow to execute a logic when there is a trigger
occur in the cloud
• SignalR Service binding for Azure Functions allow an Functions
to publish messages to clients connected to SignalR Service
11
Azure Functions with Azure SignalR
HTTP Timer
Event
Grid
Event
Hub
Service
Bus
Cosmos
DB
Storage
Logic App
Connectors
12. Brought to you by
Azure Functions with Azure SignalR
• Default: ASP.NET Core SignalR
application. Web server to host the
Hub
• Serverless: No Hub Server.
Communication through Webhook,
REST API, WebSocket
• Classic: Backward compatibility
13. Brought to you by
13
Demo 01 : Sample HTTP Trigger
HTTP Trigger
Parameters
Pushes
https://github.com/dinushak/SignalRSayHello
14. Brought to you by
14
Demo 02 : IOT Hub Integration
https://github.com/dinushak/SignalRIOT
15. Brought to you by
• Documentation
• https://docs.microsoft.com/en-us/azure/azure-signalr
• QuickStart samples
• https://github.com/aspnet/AzureSignalR-samples/tree/main/samples
15
Next steps