CompletableFuture stubs
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
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.
1. Implement `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.
1. 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.
1. 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by reviewing the three proposed strategies for CompletableFuture-based stubs, especially the generated gRPC client, public MethodDescriptors, the protoc plugin, and the C++ generator insertion points. A contribution would need a decided implementation approach and an agreed scope for integrating CompletableFuture support while preserving Java 6 compatibility.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100