Provide non blocking getFlightInfo
- Linguagem predominante
- Java
- Estrelas
- 94
- Forks
- 152
- Merge médio
- 3d 16h
- PRs com merge (30d)
- 11
Descrição
### Describe the enhancement requested
We have a use case in our production environment where getFlightInfo can take longer than a second and having a blocking getFlightInfo is a problem. Since many other methods in FlightProducer is non blocking we should also have a non blocking getFlightInfo
The code would look something like this with minimum impact to all the implementations
```
/**
* Get information about a particular data stream.
*
* @param context Per-call context.
* @param descriptor The descriptor identifying the data stream.
* @return Metadata about the stream.
*/
FlightInfo getFlightInfo(CallContext context, FlightDescriptor descriptor);
/**
* Get information about a particular data stream.
*
* @param context Per-call context.
* @param descriptor The descriptor identifying the data stream.
* @param listener An interface for sending data back to the client.
*/
default void getFlightInfo(CallContext context, FlightDescriptor descriptor, StreamListener listener ){
FlightInfo flightInfo = getFlightInfo(context, descriptor);
listener.onNext(flightInfo);
listener.onCompleted();
}
/**
*
* @return true if blocking (default) version of getFlightInfo needs to be used by FlightService.
*/
default boolean isBlockingFlightInfo() {
return true;
}
```
Guia de contribuição
Direção de pesquisa
Comece lendo a interface FlightProducer e como o FlightService trata getFlightInfo; em seguida, compare como os outros métodos não bloqueantes de FlightProducer são implementados. Confirme como a sobrecarga de listener proposta e a flag isBlockingFlightInfo podem preservar as implementações existentes; o trabalho estará concluído quando o FlightService puder usar o caminho não bloqueante sem quebrar os producers bloqueantes.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- java
- Domínio
- api
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 42/100