Consider automatic incoming entity collection to simplify API (discuss)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách xem xét các API công khai HttpEntity.Strict và HttpEntity.Default, cùng hành vi được mô tả trong #460. So sánh việc chuyển đổi sang strict tự động, tài liệu và việc ẩn các chi tiết nội bộ của streaming, đặc biệt chú ý đến các giới hạn cố định, dispatch bị trì hoãn và quá trình chuyển sang streaming. Done không được định nghĩa trong issue; người đóng góp trước tiên sẽ cần đưa ra quyết định về thiết kế và thống nhất phạm vi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- Scala
- Star
- 196
- Fork
- 56
- Merge trung bình
- 1 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/pekko-http
-
dependencies
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
apache/pekko-http#1354 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
apache/pekko-http#1273 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
HTTP/2 client ALPN fallback needs a handshake-complete signal that the TLS stage does not emitĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/pekko-http#1249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/pekko-http#1248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
apache/pekko-http#1180 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/pekko-http
Issue tương tự
-
area:shuffle enhancement good first issue performance requires-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/datafusion-comet#7072 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Improve UI text on confirmation page (at registration)Có thể đã có người làm @Arghyann đã nhận hôm nay. Đang mởgood first issue improvement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
lichess-org/lila#22126 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-ready area/dev-tooling kind/docs-only layer/docs size/XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
marola-dev/marola#855 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
llm4s-ollama: bind a base-URL variable for chat sections, and align the documented variable nameĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
scylladb/scylla-migrator#413 ·