grpc / grpc/grpc-java

ServerBuilder and listening

Ouverte
#5,346 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
12.1k
Forks
4k
Merge moyen
2 j 17 h
PR mergées (30 j)
37

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par lire ServerBuilder et le flux existant de addPort(), puis examinez la manière dont Server et start() gèrent l’écoute. Comparez les ports multiples demandés, les SocketAddresses, les ajouts après le démarrage et la fermeture gracieuse afin d’identifier les choix d’API qui se recouvrent. La tâche ne pourra être considérée comme terminée qu’une fois le périmètre et la conception convenus, avant de pouvoir définir l’implémentation.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
backend-api-design, networking
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.