Skip to content

Middleman in 2-hop IRemoteServiceBroker should re-interpret result #45

@AArnott

Description

@AArnott

When one process with a GlobalBrokeredServiceContainer is a middle-man between a brokered client and a brokered server, and that middle-man has a multiplexingstream relationship with the brokered server, it should not blindly forward replies from the server to the client, since the client doesn't share the same multiplexingstream that the middle-man and server share, and the server may have sent a multiplexingchannelid in the RemoteConnectionInfo.

The middle-man should inspect the RemoteConnectionInfo that the server returned and if it utilizes connection instructions that the client process could not support (e.g. a channel ID), the middle-man should then act as a relay by connecting to the server and offering a different set of connection instructions to the client.

I believe this logic would belong here:

Task<RemoteServiceConnectionInfo> IRemoteServiceBroker.RequestServiceChannelAsync(ServiceMoniker serviceMoniker, ServiceActivationOptions serviceActivationOptions, CancellationToken cancellationToken)
{
return this.RemoteServiceBroker.RequestServiceChannelAsync(serviceMoniker, serviceActivationOptions, cancellationToken);
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions