grpc / grpc/grpc-java

ServerBuilder and listening

オープン
#5,346 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
12.1k
フォーク
4k
平均マージ
2日 17時間
マージ済み PR(30日)
37

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず ServerBuilder と既存の addPort() のフローを読み、次に Server と start() がリスニングをどのように処理しているかを確認します。要求されている複数ポート、SocketAddresses、起動後の追加、正常なクローズを比較し、重複する API の選択肢を特定します。完了とするには、実装を定義できるようになる前に、スコープと設計について合意する必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
backend-api-design, networking
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。