CompletableFuture stubs
See original GitHub issueHello,
I’d like to start a discussion about adding a CompletableFuture
-based stub implementations to gRPC. I understand that generated gRPC code must be backwards compatible with Java 6, so here are some alternative implementation strategies to consider.
- Implement
CompletableFuture
-based stubs in a stand-alone class generated by a stand-alone protoc plugin. The CF stub class would reference the publicMethodDescriptors
of the stock generated client. This option is easiest to implement, but presents a fragmented programming model. - Implement
CompletableFuture
-based stubs inline with the existing generated stubs by adding@@protoc_insertion_point
s to the stock c++ generator. A protoc plugin would be used to populate the insertion points. This option has the benefit of presenting a homogenous programming model for this, and all future plugin-based stub extensions, but requires a coordinated one time change with the protoc project. - Extend the c++ generator with optional support for
CompletableFuture
. Use a protoc flag to turn it on and off. Not a great option, but possible.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:22
- Comments:7 (5 by maintainers)
Top Results From Across the Web
CompletableFuture (Java Platform SE 8 ) - Oracle Help Center
Returns a new CompletableFuture that is completed when this CompletableFuture completes, with the result of the given function of the exception triggering this ......
Read more >Mock CompletableFuture in spock - java - Stack Overflow
i trying create stub or mock for CompletableFuture in spock. My method is called async and return CompletableFuture. In spock method always ...
Read more >CompletableFuture - Android Developers
CompletableFuture also implements Future with the following policies: ... Returns a new CompletableFuture that is completed when all of the given ...
Read more >Effective Use of Java CompletableFuture Timeouts and join ...
This video walks through a pair of examples that demonstrate how to effectively use Java CompletableFuture timeouts and join() Mechanisms.
Read more >WorkflowStub (cadence-client 2.4.0 API) - Javadoc.io
WorkflowStub is a client side stub to a single workflow instance. ... CompletableFuture<R>, getResultAsync(long timeout, java.util.concurrent.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I get the impression from #2688 that Guava upgrades are problematic. Would Guava vNext introduce the same compatibility break that Guava 20 introduced?
@ejona86 Can you help me understand the current state of CompletableFuture support in GRPC now that Java 7 looks to have been removed (congrats, btw, that’s a big deal!)?