grpc / grpc/grpc-java

ServerBuilder and listening

Abierto
#5,346 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
12.1k
Forks
4k
Merge medio
2 d 17 h
PR fusionados (30 d)
37

Descripción

Currently, the standard way to listen on a socket is to call `addPort()`, but from recent requests, this API is too limited. I would like to explore some ideas for expanding this functionality. Specifically:

1. Make a standard way to add multiple ports to a single server.
2. Make it possible to listen on things other than ports, in particular `SocketAddress`es.
3. Make it possible to add more ports / sockets after a Server has been built.
1. This would effectively allow a server to add ports after `start()`
2. Maybe allow servers to gracefully close ports they started on.
3. Support having no listening ports on the builder. This would mean adding a ServerBuilder ctor that has no ports at all.

This issue is more exploratory rather than mandatory. Right now the request is just to listen on multiple ports, but we should be careful to not add overlapping APIs (such as on both Server and ServerBuilder).

cc: @ejona86

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza leyendo ServerBuilder y el flujo existente de addPort(), y luego inspecciona cómo Server y start() gestionan la escucha. Compara los múltiples puertos solicitados, las SocketAddresses, las adiciones posteriores al inicio y el cierre ordenado para identificar decisiones de API que se solapan. Para darlo por terminado, es necesario acordar el alcance y el diseño antes de poder definir la implementación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
backend-api-design, networking
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.