SignalR with server-side Blazor or Razor components

We have had a brief look at server-side Blazor, but one thing we need to always have in mind is the fact that server-side Blazor uses SignalR to push content from the server to the client-side instantaneously. SignalR is a library that was designed to deal with situations where we need real-time, client-side, and server interactions in web applications, using hubs.

There is a well-documented usage of SignalR for chat applications, but a simple guide as to when to use SignalR is to look at scenarios where there is a need for a lot of updates from the server. In the case of server-side Blazor, there are a lot of updates between the client and the server, all channeled through SignalR. The following diagram illustrates this:

For this book, which concerns ASP.NET Core 3, it's enough just to know the ecosystem surrounding the use of SignalR. Most SignalR implementations you will come across actually work in the background (as in the case of server-side Blazor), abstracted from you, and therefore we will not delve into how to use it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.188.201