Consider automatic incoming entity collection to simplify API (discuss)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
まず、HttpEntity.Strict と HttpEntity.Default の公開 API、および #460 に記載された動作を調査します。自動 strict 化、ドキュメント、ストリーミング内部の非表示について比較し、固定された制限、遅延ディスパッチ、ストリーミングへの移行に特に注意を払います。issue では Done は定義されていません。コントリビューターは、まず設計上の決定を行い、合意されたスコープを定める必要があります。
索引モデルが issue の本文から書いたものです。
説明
One of the oldest issues with akka-http/pekko-http is the distinction between HttpEntity.Strict and HttpEntity.Default that cannot be observed on the wire but leads to different API behavior for the user just based on the timing with which data is received.
Strict contains an in-memory copy of the full data, while Default contains a live stream that is still connected to the connection.
The rationale for this API is that we want to supply a streaming API whenever it makes sense to 1. provide data to the user in real time as it comes in and 2. to avoid having to load all data into memory but have all the nice properties of streams like end-to-end backpressure and limited memory usage.
The backside is that while the current solution gives you all the options to deal with a real time situation optimally, it also requires you to deal with all these cases (or use toStrict in more cases).
However, this often trips up users (like in #460) where depending on the environment the exact same request can lead to different runtime behavior. Often, when running tests locally, it is much more likely that requests end up as Strict while in production, Default becomes more likely. In situations like #460, the effect can be really subtle and hard to understand.
One potential solution could be to auto-strictify incoming entities for simplicity. In that case, we would always read incoming entities to their completion (up to a fixed limit) and delay dispatching the incoming HTTP message until the full message is there. The benefit would be that users of simple applications would get every message with a strict entity.
The downside is that I can see no gradual migration path once you need streaming behavior for certain entities. Then you would still have to enable streaming for the whole application which then might not be expecting streaming entities...
Alternatives:
- (even) better documentation to educate about the way things work
- try to remove Strict from the public API (very intrusive and subtle issues like #460 will not be solved that way)
- improve library to mitigate impact / hide internals of the streaming API further
(I have not convinced myself yet that we can or should change something right now without making other cases worse but still wanted to keep a note here)
- 主要言語
- Scala
- スター
- 196
- フォーク
- 57
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 43
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/pekko-http のほかの issue
-
dependencies
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
apache/pekko-http#1354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
apache/pekko-http#1273 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/pekko-http#1249 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/pekko-http#1248 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
apache/pekko-http#1180 ·
メンテナーはふだん 1 日以内に返信
apache/pekko-http の issue をすべて見る
似ている issue
-
難易度 2/5 1時間未満 初心者へのやさしさ 70/100
-
[Bug] HiveDialect shares its colspecs dict with SQLAlchemy's DefaultDialect (python/pyhive)対応中かも @rusackas が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
apache/kyuubi#7786 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 2 日以内に返信
-
ST_AddMeasure assigns incorrect measures on bent lines and MultiLineStrings対応中かも @vera-rubin が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
requires-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/datafusion-comet#7001 ·
メンテナーはふだん 1 日以内に返信