Skip to content

Commit

Permalink
Release v1.21.7 (#1833)
Browse files Browse the repository at this point in the history
* Add echo in ServiceProtocol. (#1829)

* Partial support client results in sharding mode. (#1828)

* Partial support client results in sharding mode.

* limit single to avoid timeout waiting.

* Better information.

* update doc

* fix count.

* better exception information.

* Update version.props (#1830)

---------

Co-authored-by: Zhenghui Yan <vwxyzh@gmail.com>
  • Loading branch information
JialinXin and vwxyzh committed Sep 14, 2023
1 parent d5dff37 commit f5cf33f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
4 changes: 3 additions & 1 deletion specs/ClientInvocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ Basically the process is similar and the major different is that service underst

### Transient Mode(TODO)

## Limitations

> NOTES
>
> * Service cached pending invocations for at most __10 minutes__ for memory concerns and will notify server when timeout.
> * Serverless is __NOT__ supporeted in the first stage.
> * ASPNET SignalR is __NOT__ supported.
> * Sharding is __NOT__ supported. Please use [Geo-Replication](https://learn.microsoft.com/azure/azure-signalr/howto-enable-geo-replication) for combined client invocation and large scale scenarios.
> * Sharding is __NOT__ fully supported yet. Please use [Geo-Replication](https://learn.microsoft.com/azure/azure-signalr/howto-enable-geo-replication) for combined client invocation and large scale scenarios. Also see [this](https://github.com/Azure/azure-signalr/pull/1828) for planning.
1 change: 1 addition & 0 deletions specs/ServiceProtocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ EMPTY | EMPTY | Both | Keep server connection alive ping
`offline` | `finack` | Service -> Server | Response of received `offline` request
`servers` | EMPTY | Server -> Service | Request to get all server ids connect to the service
`servers` | `<timestamp>:<server1>;<server2>` | Service -> Server | Response of `servers` ping of all server ids
`echo` | `<identify>` | Service <-> Server | Identify the latency of server connection, available from SDK 1.21.6.

## Message Encodings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ internal IEnumerable<ServiceEndpoint> GetRoutedEndpoints(ServiceMessage message)
case CloseConnectionMessage closeConnectionMessage:
return _router.GetEndpointsForConnection(closeConnectionMessage.ConnectionId, endpoints);

case ClientInvocationMessage clientInvocationMessage:
return SingleOrNotSupported(_router.GetEndpointsForConnection(clientInvocationMessage.ConnectionId, endpoints), clientInvocationMessage);

case ServiceMappingMessage serviceMappingMessage:
return SingleOrNotSupported(_router.GetEndpointsForConnection(serviceMappingMessage.ConnectionId, endpoints), serviceMappingMessage);

case ServiceCompletionMessage serviceCompletionMessage:
return SingleOrNotSupported(_router.GetEndpointsForConnection(serviceCompletionMessage.ConnectionId, endpoints), serviceCompletionMessage);

default:
throw new NotSupportedException(message.GetType().Name);
}
Expand Down Expand Up @@ -416,6 +425,20 @@ private async Task WaitForClientsDisconnect(HubServiceEndpoint endpoint)
Log.TimeoutWaitingClientsDisconnect(_logger, endpoint.ToString(), (int)_scaleTimeout.TotalSeconds);
}

private IEnumerable<ServiceEndpoint> SingleOrNotSupported(IEnumerable<ServiceEndpoint> endpoints, ServiceMessage message)
{
var endpointCnt = endpoints.ToList().Count;
if (endpointCnt == 1)
{
return endpoints;
}
if (endpointCnt == 0)
{
throw new ArgumentException("Client invocation is not sent because no endpoint is returned from the endpoint router.");
}
throw new NotSupportedException("Client invocation to wait for multiple endpoints' results is not supported yet.");
}

internal static class Log
{
private static readonly Action<ILogger, string, Exception> _startingConnection =
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<!-- major.minor.patch[.build] -->
<VersionPrefix>1.21.6</VersionPrefix>
<VersionPrefix>1.21.7</VersionPrefix>
<VersionPrefix Condition="'$(MSBuildProjectName)' == 'Microsoft.Azure.SignalR.Emulator'">1.1.0</VersionPrefix>
<VersionPrefix Condition="'$(MSBuildProjectName)' == 'Microsoft.Azure.SignalR.Serverless.Protocols'">1.9.0</VersionPrefix>
<!-- Alphanumberic(+hyphen) string for PackageVersion and InformationalVersion-->
Expand Down

0 comments on commit f5cf33f

Please sign in to comment.