Skip to content
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

[DRAFT] Client invocation for management sdk #2119

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

TD2106
Copy link

@TD2106 TD2106 commented Jan 2, 2025

Summary of the changes (Less than 80 chars)

  • Add client invocation manager for management sdk.

@TD2106 TD2106 marked this pull request as draft January 2, 2025 05:19
@TD2106
Copy link
Author

TD2106 commented Jan 2, 2025

@microsoft-github-policy-service agree company="Microsoft"

Comment on lines 275 to 276
var message = AppendMessageTracingId(new ClientCompletionMessage(result.InvocationId, connectionId, _callerId, "", new ReadOnlyMemory<byte>()));
await WriteAsync(message);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed? In serverless case, service need to know this is a paired CompletionMessage then send back, meanwhile it should be able to cleanup local directly without information from the caller.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Comment on lines 40 to 41
// When the caller server is also the client router, Azure SignalR service won't send a ServiceMappingMessage to server.
// To handle this condition, CallerClientResultsManager itself should record this mapping information rather than waiting for a ServiceMappingMessage sent by service. Only in this condition, this method is called with instanceId != null.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modify the comment to fit serverless scenario.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this comment.

}
}

public bool TryCompleteResult(string connectionId, ClientCompletionMessage message)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Service can send back original CompletionMessage directly. Below methods are not really fit serverless and should throw NotSupportedException.

TryCompleteResult(ConnectionId, ClientCompletionMessage)
TryCompleteResult(ConnectionId, ErrorCompletionMessage)
AddServiceMapping()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed these implementation

internal sealed class WeakClientInvocationManager : IClientInvocationManager
{
public ICallerClientResultsManager Caller { get; }
public IRoutedClientResultsManager Router { get; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throw directly without assign a dummy router manager?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the dummy router manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants