Improve unary server stub
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
The Java unary stub is taking the form of an async service, where a single result is expected to return from a StreamObserver.
This can be error prone:
- You can't tell from the stub whether it's unary or streaming multiple results
- The code can easily call onNext one too many times, or not call onComplete
Unary gRPC stubs for several other stubs expects a single return value from the method. Java should follow the same convention:
https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py
https://github.com/grpc/grpc/blob/master/examples/ruby/greeter_server.rb
https://github.com/grpc/grpc-go/blob/master/examples/helloworld/greeter_server/main.go
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia confrontando gli esempi collegati examples/helloworld/greeter_server.py, greeter_server.rb e greeter_server/main.go con l'API degli stub del server unary di Java. Traccia il modo in cui Java rappresenta attualmente i metodi unary e determina le implicazioni di compatibilità. Il lavoro è completato quando i metodi unary espongono un singolo risultato restituito invece di uno StreamObserver, mentre i metodi di streaming mantengono il comportamento esistente, con test che coprano questa convenzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- grpc, java
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 32/100