Read Zarr through the range reader: merged shard reads, per-read cancellation, a cache shared with COGs
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
- 32/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design, data
Hướng nghiên cứu
Start with the linked spec on the kyle/zarr-range-reader branch and review the range-reader and deck.gl-zarr integration points described in the issue: rangeReaderFetch, ZarrSource.open, createFetchStore, and the metadata/data classifier. Compare the proposed behavior with the existing COG reader and Zarr cancellation/coalescing behavior. Done means the three benchmark cases meet the request, cancellation, cache, and load-time criteria listed in the issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[!NOTE]
This issue was written by Claude (Claude Code), not by @kylebarron.
Zarr reads don't go through @developmentseed/range-reader, so they miss what COG reads gained in 0.10: merged requests, a shared byte cache, a per-origin request limit, and cancellation per read. This issue tracks the adapter that adds them. Its design is in the spec on the kyle/zarr-range-reader branch, which hasn't been reviewed yet.
Today
A sharded array reads through zarrita's sharding codec: a read for the shard index, then one getRange per inner chunk. Each is its own HTTP request unless the app wraps the store in zarrita's withRangeCoalescing, which:
- merges the reads of one microtask with a fixed 32 KiB gap and no cap on a merged request, and keeps no cache;
- combines the abort signals of every read it merges, so one tile leaving the view fails the reads of every tile merged with it (the class of bug in #690);
- shares no cache, request limit or batching window with the page's COG layers.
Because of that abort behavior, ZarrLayer keeps deck.gl's limit of six requests at a time and deck.gl's abort rule.
Plan
Two stacked PRs, as in the spec:
range-reader:rangeReaderFetch(reader, options), afetch-shaped function that turns a request into a reader read and the result back into aResponse. zarrita'sFetchStoreand icechunk'sfetchClientboth take one, so neither needs a store class of its own.HEADrequests, conditional headers and otherRangeforms pass through tofetchunchanged.deck.gl-zarr: a URL form ofZarrSource.open,createFetchStore(url, { reader, requestInit })for apps that build their own store, and a classifier that tells metadata reads from data reads. A layer whose source was opened from a URL behaves likeCOGLayer: it aborts tiles that leave the view and defaults tomaxRequests: 256anddebounceTime: 50. A source opened from an app-built store keeps today's behavior. The icechunk example passes the adapter as itsfetchClient.
Changes since the spec
- #837 put
DEFAULT_RANGE_READERin@developmentseed/deck.gl-raster, which deck.gl-zarr already depends on, so the spec'sdefaultRangeReader()in range-reader isn't needed.DEFAULT_CONCURRENCY_LIMITERis still in deck.gl-geotiff, so the limiter needs a home that deck.gl-zarr can import from. - #838 changed
ZarrSource.opento take a store and apath. The URL form becomesZarrSource.open(url, { path }). - The spec says a tile is one shard of 100 inner chunks. It's one inner chunk:
ZarrLayertiles by zarrita'sarr.chunks, which for a sharded array is the inner chunk shape. So reads merge across neighbouring tiles of a shard, not within a tile. - The spec's sharded benchmark,
dynamical-zarr-ecmwf, has inner chunks of about 2.3 MB compressed. That's more than the reader's defaultmaxRequestBytesof 1 MiB, so they won't merge. The example still measures cancellation and caching, but measuring the merging needs a sharded store with smaller inner chunks.
Done when
Measured with the COG benchmark harness, before and after:
- A sharded store with small inner chunks makes fewer requests per view, and panning back refetches nothing that fits the cache budget.
dynamical-zarr-ecmwf: a fast pan leaves no selected tile blank and raises no unhandledAbortError, and load time at least matches today's.zarr-sentinel2-tci(unsharded) andnldas-icechunk: requests and times within noise of today's.
🤖 Written by Claude Code
- Ngôn ngữ chính
- TypeScript
- Star
- 240
- Fork
- 34
- Merge trung bình
- 17 giờ 24 phút
- Pull request đã merge (30 ngày)
- 62
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 developmentseed/deck.gl-raster
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
developmentseed/deck.gl-raster#589 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
zarr
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
developmentseed/deck.gl-raster#889 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
developmentseed/deck.gl-raster#879 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Zooming in shows a checkerboard of placeholder tiles when overview tiles are smaller than full-resolution tilesCó thể đã có người làm @kylebarron đã nhận 16 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
developmentseed/deck.gl-raster#873 ·
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 48/100
developmentseed/deck.gl-raster#866 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của developmentseed/deck.gl-raster
Issue tương tự
-
area/ci bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ 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 72/100
melgarafael/DeskcommCRM#5290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add Alice&BotĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
easy enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày