Closed
Description
Support server to clients acks so that reliable messaging can be implemented more easily. This would only be when using Clients.Client()
. I think we should go back to the SendAsync (fire and forget) InvokeAsync (wait for ack) naming pattern. That's the one sticking point.
EDIT by @anurse: For clarity, this issue is tracking all work related to allowing values to be returned from client invocations. It also covers allowing the server to wait for a void
-returning (or Task
-returning) client side method to complete.
Work left for .NET 7
- [API] Add client result support to Java client #41777
- What does an async
.On
method look like? ProbablySingle<T>
- What does an async
- w/return results blocks client receive pipeline #41996
This was already an issue with Task returning.On
methods, but client results likely makes it more likely to block on the client side
[ ] Hub methods can soft-lock the connection #41997- Today we detect if you allow parallel hub invocations and throw if you don't when trying to use the feature. This doesn't work if you use
IHubContext
in the Hub, or if you have multiple waiting results for the same connections Hubs. - This is also especially bad in
OnConnectedAsync
because that's a special method that runs before the receive loop starts, we need to throw/unblock/warn etc. for this
[ ] Analyzer to warn about strongly-typed hubs and usingInvokeAsync
with.All
,.Group
, etc.
[ ]InvokeAsync
void result? Scenario, acks without needing a value
[ ] [Scaleout] ServerA requests client result from connection on ServerB, ServerB goes down after receiving request, ServerA needs to know somehow so it can error the client result
- Today we detect if you allow parallel hub invocations and throw if you don't when trying to use the feature. This doesn't work if you use
- [Scaleout] Consider alternative unique invocation ID generation instead of prepending the connectionID ([SignalR] Add client return results #40811 (comment))
[ ] Look at performance
The biggest performance issue I can think of right now is thatRawResult
allocates and copy the bytes which can be expensive
[ ] Flow cancellation from server to client
- InjectCancellationToken
into.On
methods and sendCancelInvocation
hub messages to clients
Metadata
Metadata
Assignees
Labels
This issue tracks updating documentationGroups multiple user stories. Can be grouped under a theme.This issue requires design work before implementating.Work that we can't release withoutThis issue impacts approximately half of our customersAPI was approved in API review, it can be implementedIncludes: SignalR clients and serversThis issue represents an ask for new feature or an enhancement to an existing oneThis label is used by an internal tool