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

Implements the gRPC MP Client API #9026

Merged
merged 12 commits into from
Aug 13, 2024
Merged

Conversation

spericas
Copy link
Member

@spericas spericas commented Jul 23, 2024

Description

Implements the gRPC MP Client API. This API uses interfaces to create client proxies. It introduces two new annotations, @GrpcProxy for injection and @GrpcChannel to associate a channel with a proxy. Client proxies can be injected into CDI beans to access remote gRPC services.

A sample client interface is shown below:

    @Grpc.GrpcService("EchoService")
    @Grpc.GrpcChannel("echo-channel")
    public interface EchoServiceClient {

        @Grpc.Unary("Echo")
        void echo(String request, StreamObserver<String> observer);
    }

A proxy instance can be injected as follows:

    @Inject
    @Grpc.GrpcProxy
    private EchoServiceClient proxyClient;

Documentation

Will be provided in a follow-up PR.

@spericas spericas added this to the 4.1.0 milestone Jul 23, 2024
@spericas spericas self-assigned this Jul 23, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 23, 2024
@spericas spericas marked this pull request as draft July 23, 2024 14:06
@spericas spericas force-pushed the grpc-client-mp-2 branch 2 times, most recently from 5fae6e0 to b4fc614 Compare July 23, 2024 15:08
@spericas spericas marked this pull request as ready for review July 23, 2024 17:36
@spericas spericas requested a review from tomas-langer July 23, 2024 18:22
@spericas spericas force-pushed the grpc-client-mp-2 branch 3 times, most recently from 8e355d8 to 025935d Compare July 24, 2024 18:21
@spericas
Copy link
Member Author

spericas commented Aug 2, 2024

Example has been moved here helidon-io/helidon-examples#65

spericas added 11 commits August 6, 2024 16:09
… client proxies. It introduces two new annotations, GrpcProxy and GrpcChannel (also defined as part of the Grpc namespace). Client proxies can be injected into CDI beans to access remote gRPC services.
Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
…ime.

Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
…els are now defined under grpc.client.channels.

Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
…t can be used to update the server's listening port dynamically. This is very useful during testing. Removes reflective code from the client gRPC library and updates tests.
…te repo in 4.x. A new PR against the examples repo will be created.

Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericas-Geertsen <santiago.pericasgeertsen@oracle.com>
@barchetta barchetta modified the milestones: 4.1.0, 4.1.1 Aug 9, 2024
@spericas spericas merged commit fd9425d into helidon-io:main Aug 13, 2024
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x client grpc OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants