In a nutshell
Communities
Social Developer
Recognitions
Cloud Solution Architect @Microsoft
GDE,MCT and former MVP from SL
Top stackoverflow contributor
@sajeetharan
@kokkisajee
@sajeetharan
@sajeetharan
👍Not a core concept of “Angular" but to quickly spin up real time apps
👍It won’t teach you everything, But it will help you learn what you need to know to get started
👍Be prepared to ask questions
Let me tell you a F5 story
Responsive
Customer Focused
User Experience / RealTime
Transports
Hubs
Full Abstraction of servers
Instant, event driven scalability
Pay-per use
Single Responsibility
Short lived
Single Responsibility
Stateless
Event Driven
& Scalable
An event-based, serverless compute experience that accelerates app development
Events
Code
Outputs
Http Request
Azure Functions/WebApp
SignalR
Service
Rest API
Negotiate
WS connection
Access code from:
Create
API
With AzFn
Triggers
Create the
Client App
Initiate
the
connection
Notify
Action
Create
SignalR
Service
PreRequisites
Hope things go smoothly..
Step 1: Create an Azure SignalR service
Step 2: Create Azure Function REST API (Serverless)
az signalr create \
--name ngHive \
--resource-group $myResourceGroupName \
--sku Standard_S1 \
--unit-count 1 \
--service-mode Serverless
func new --name ngHivePollingApp --template
"HTTP trigger" --authlevel "anonymous"
Step 3: Create a cosmosdb instance to save votes
Step 4: Create an Angular 11 App
An Azure CosmosDB resource with a
Database "Votes" and a container
"Votes" with the partition key "/eventName"
ng new ngHive
Step 5: Create the Azure Function Triggers / endPoints
CreateVote
GetVotes
AddVote
Step 6: Create the Hub Connection
Step 7: Setup Action when created or updated
const hubConnection = new signalR.HubConnectionBuilder()
.withUrl(`${this.appSettings.apiUrl}`)
.configureLogging(signalR.LogLevel.Information).build();
hubConnection.on('votesUpdated', (votes: Vote[]) => {
Where to go from here?