Hello,
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.
CompletableFuture-based stubs in a stand-alone class generated by a stand-alone protoc plugin. The CF stub class would reference the public MethodDescriptors of the stock generated client. This option is easiest to implement, but presents a fragmented programming model.CompletableFuture-based stubs inline with the existing generated stubs by adding @@protoc_insertion_points 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.CompletableFuture. Use a protoc flag to turn it on and off. Not a great option, but possible.Guava might have to face this sooner than we do, so they may make their futures Completable anyways, and you could just cast. gRPC could just ride this out.
I get the impression from #2688 that Guava upgrades are problematic. Would Guava vNext introduce the same compatibility break that Guava 20 introduced?
I just saw that Guava recommends future-converter.
Most helpful comment
I get the impression from #2688 that Guava upgrades are problematic. Would Guava vNext introduce the same compatibility break that Guava 20 introduced?