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

Add RPC extension packages and abstractions #2985

Closed
Tracked by #9235
jviau opened this issue May 24, 2023 · 0 comments · Fixed by #2991
Closed
Tracked by #9235

Add RPC extension packages and abstractions #2985

jviau opened this issue May 24, 2023 · 0 comments · Fixed by #2991
Assignees

Comments

@jviau
Copy link
Contributor

jviau commented May 24, 2023

Azure/azure-functions-host#9235

This issue tracks the work to add the abstraction layers for enabling WebJob extensions to add their own Host <--> Worker RPC services. We will start small exposing only the ability to map gRPC services.

Due to the way WebJobs extensions are loaded into an isolated assembly load context, we cannot expose gRPC service mapping in a direct fashion. Instead, we need to split this into two assemblies:

  1. Microsoft.Azure.WebJobs.Host.Rpc
    • referenced by: webjobs extensions (transitively) and Azure Functions host.
    • purpose: this assembly contains only the necessary types to bridge AspNetCore endpoint extensibility from registered webjobs extensions to the functions host.
    • reason: we cannot perform the Grpc.AspNetCore.Server's .MapGrpcService<T>() call from within the Functions host default assembly load context. It must be performed within the webjobs extension load context, thus an extension point from an already unified assembly must be chosen. In this case, we will use EndpointDataSource from AspNetCore.
  2. Microsoft.Azure.WebJobs.Extensions.Rpc
    • reference by: webjobs extensions (and not Azure functions host).
    • purpose: expose APIs to perform the actual extension RPC service mapping.
    • reason: we do not want to expose the EndpointDataSource extensibility pattern directly. It is too much boilerplate, and we instead want something that maps onto the existing IWebJobsExtensionBuilder experience.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant