-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Update SignalR overview content for .NET 10 with include-based version architecture #37026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c98ac29
Initial plan
Copilot d69b37f
Refresh SignalR overview article for .NET 10
Copilot 7783f5e
Fix SignalR overview xref links for scaling options
Copilot 383cc4b
Gate .NET 9+ SignalR features with moniker
Copilot 631119c
Restructure SignalR introduction with include-based version files
Copilot 8c5b6fd
Adjust SignalR intro moniker placement formatting
Copilot a1b6d6f
Apply style fixes for SignalR introduction include files
Copilot 133cdbc
Align transport guidance in legacy SignalR introduction include
Copilot f51ee62
Remove duplicate SignalR overview heading from version includes
Copilot fbe0420
Rename SignalR include file for 2-8 range
Copilot 5c3465c
Rename SignalR include file for version 9
Copilot 3f22ecd
Fixed inconsistancies and version specific issues
wadepickett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
aspnetcore/signalr/introduction/includes/introduction-2-8.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| :::moniker range=">= aspnetcore-2.1 <= aspnetcore-8.0" | ||
|
|
||
| ## What is SignalR? | ||
|
|
||
| ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly. | ||
|
|
||
| Good candidates for SignalR: | ||
|
|
||
| * Apps that require high frequency updates from the server. Examples are gaming, social networks, voting, auction, maps, and GPS apps. | ||
| * Dashboards and monitoring apps. Examples include company dashboards, instant sales updates, or travel alerts. | ||
| * Collaborative apps. Whiteboard apps and team meeting software are examples of collaborative apps. | ||
| * Apps that require notifications. Social networks, email, chat, games, travel alerts, and many other apps use notifications. | ||
|
|
||
| SignalR provides an API for creating server-to-client [remote procedure calls (RPC)](https://wikipedia.org/wiki/Remote_procedure_call). The RPCs invoke functions on clients from server-side .NET code. There are several [supported platforms](xref:signalr/supported-platforms), each with their respective client SDK. Because of this, the programming language being invoked by the RPC call varies. | ||
|
|
||
| Here are some features of SignalR for ASP.NET Core: | ||
|
|
||
| * Handles connection management automatically. | ||
| * Sends messages to all connected clients simultaneously. For example, a chat room. | ||
| * Sends messages to specific clients or groups of clients. | ||
| * Scales to handle increasing traffic. | ||
| * [SignalR Hub Protocol](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/HubProtocol.md) | ||
|
|
||
| The source is hosted in a [SignalR repository on GitHub](https://github.com/dotnet/AspNetCore/tree/main/src/SignalR). | ||
|
|
||
| ## Transports | ||
|
|
||
| SignalR supports the following techniques for handling real-time communication (in order of graceful fallback): | ||
|
|
||
| * [WebSockets](xref:fundamentals/websockets) | ||
| * Server-Sent Events | ||
| * Long Polling | ||
|
|
||
| SignalR automatically chooses the best transport method that is within the capabilities of the server and client. | ||
|
|
||
| ## Hubs | ||
|
|
||
| SignalR uses *hubs* to communicate between clients and servers. | ||
|
|
||
| A hub is a high-level pipeline that allows a client and server to call methods on each other. SignalR handles the dispatching across machine boundaries automatically, allowing clients to call methods on the server and vice versa. You can pass strongly-typed parameters to methods, which enables model binding. SignalR provides two built-in hub protocols: a text protocol based on JSON and a binary protocol based on [MessagePack](https://msgpack.org/). MessagePack generally creates smaller messages compared to JSON. Older browsers must support [XHR level 2](https://caniuse.com/#feat=xhr2) to provide MessagePack protocol support. | ||
|
|
||
| Hubs call client-side code by sending messages that contain the name and parameters of the client-side method. Objects sent as method parameters are deserialized using the configured protocol. The client tries to match the name to a method in the client-side code. When the client finds a match, it calls the method and passes to it the deserialized parameter data. | ||
|
|
||
| [!INCLUDE[](~/includes/SignalR/es6.md)] | ||
|
|
||
| ## Additional resources | ||
|
|
||
| * [Introduction to ASP.NET Core SignalR](/training/modules/aspnet-core-signalr) | ||
| * [Get started with SignalR for ASP.NET Core](xref:tutorials/signalr) | ||
| * [Supported Platforms](xref:signalr/supported-platforms) | ||
| * [Hubs](xref:signalr/hubs) | ||
| * [JavaScript client](xref:signalr/javascript-client) | ||
| * [Browsers that don't support ECMAScript 6 (ES6)](xref:signalr/supported-platforms#es6) | ||
| * <xref:blazor/fundamentals/signalr> | ||
|
|
||
| :::moniker-end |
57 changes: 57 additions & 0 deletions
57
aspnetcore/signalr/introduction/includes/introduction-9.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| :::moniker range="= aspnetcore-9.0" | ||
|
|
||
| ## What is SignalR? | ||
|
|
||
| ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly. | ||
|
|
||
| Good candidates for SignalR: | ||
|
|
||
| * Apps that require high frequency updates from the server. Examples are gaming, social networks, voting, auction, maps, and GPS apps. | ||
| * Dashboards and monitoring apps. Examples include company dashboards, instant sales updates, or travel alerts. | ||
| * Collaborative apps. Whiteboard apps and team meeting software are examples of collaborative apps. | ||
| * Apps that require notifications. Social networks, email, chat, games, travel alerts, and many other apps use notifications. | ||
|
|
||
| SignalR provides an API for creating server-to-client [remote procedure calls (RPC)](https://wikipedia.org/wiki/Remote_procedure_call). The RPCs invoke functions on clients from server-side .NET code. There are several [supported platforms](xref:signalr/supported-platforms), each with their respective client SDK. Because of this, the programming language being invoked by the RPC call varies. | ||
|
|
||
| Here are some features of SignalR for ASP.NET Core: | ||
|
|
||
| * Handles connection management automatically. | ||
| * Sends messages to all connected clients simultaneously. For example, a chat room. | ||
| * Sends messages to specific clients or groups of clients. | ||
| * Scales to handle increasing traffic with options such as the [Azure SignalR Service](xref:signalr/scale) and [Redis backplane](xref:signalr/redis-backplane). | ||
| * Supports trimming and native ahead-of-time (AOT) compilation for supported scenarios. | ||
| * Supports polymorphic type handling in hub methods. | ||
| * Supports distributed tracing with `ActivitySource` for SignalR hub server and .NET client. | ||
| * [SignalR Hub Protocol](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/HubProtocol.md) | ||
|
|
||
| The source is hosted in a [SignalR repository on GitHub](https://github.com/dotnet/AspNetCore/tree/main/src/SignalR). | ||
|
|
||
| ## Transports | ||
|
|
||
| SignalR supports the following techniques for handling real-time communication (in order of graceful fallback): | ||
|
|
||
| * [WebSockets](xref:fundamentals/websockets) | ||
| * Server-Sent Events | ||
| * Long Polling | ||
|
|
||
| SignalR automatically chooses the best transport method that is within the capabilities of the server and client. WebSockets is the preferred transport because it generally provides the best performance. | ||
|
|
||
| ## Hubs | ||
|
|
||
| SignalR uses *hubs* to communicate between clients and servers. | ||
|
|
||
| A hub is a high-level pipeline that allows a client and server to call methods on each other. SignalR handles the dispatching across machine boundaries automatically, allowing clients to call methods on the server and vice versa. You can pass strongly-typed parameters to methods, which enables model binding. SignalR supports two built-in hub protocols: a text protocol based on JSON (default) and a binary protocol based on MessagePack. MessagePack generally creates smaller messages compared to JSON. For more information, see <xref:signalr/messagepackhubprotocol>. | ||
|
|
||
| Hubs call client-side code by sending messages that contain the name and parameters of the client-side method. Objects sent as method parameters are deserialized using the configured protocol. The client tries to match the name to a method in the client-side code. When the client finds a match, it calls the method and passes to it the deserialized parameter data. | ||
|
|
||
| ## Additional resources | ||
|
|
||
| * [Get started with SignalR for ASP.NET Core](xref:tutorials/signalr) | ||
| * [Supported Platforms](xref:signalr/supported-platforms) | ||
| * [Hubs](xref:signalr/hubs) | ||
| * [Logging and diagnostics in ASP.NET Core SignalR](xref:signalr/diagnostics) | ||
| * [Hosting and scaling ASP.NET Core SignalR](xref:signalr/scale) | ||
| * [JavaScript client](xref:signalr/javascript-client) | ||
| * <xref:blazor/fundamentals/signalr> | ||
|
|
||
| :::moniker-end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.