Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use big file downloader #180

Merged
merged 7 commits into from
Sep 25, 2024
Merged

feat: use big file downloader #180

merged 7 commits into from
Sep 25, 2024

Conversation

alanshaw
Copy link
Member

@alanshaw alanshaw commented Sep 19, 2024

This PR uses @storacha/unixfs-dl to make ranged requests to big unixfs files in order to not exhaust the upstream worker of CPU time.

Also switches to using the Link type for CIDs instead of string. This allows us to detect if the CID is using the "raw" IPLD codec.

@alanshaw alanshaw marked this pull request as ready for review September 23, 2024 15:53
Copy link
Member

@fforbeck fforbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. I just added a minor comment about one of the comparisons with null.

packages/ipfs-gateway-race/lib/request.js Outdated Show resolved Hide resolved
@@ -0,0 +1,4 @@
exports.bigData = {
cid: 'bafybeihctj26zx2smrvl6ev7k2h4krjey3rd2irjsqtduhlowwe75fdzo4',
bytes: new TextEncoder().encode('Hello w3s.link!!!!!!'.repeat(10_000_000))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@alanshaw alanshaw merged commit 57832cc into main Sep 25, 2024
15 checks passed
@alanshaw alanshaw deleted the feat/big-file-downloader branch September 25, 2024 08:12
alanshaw pushed a commit that referenced this pull request Sep 25, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.6.0](ipfs-gateway-race-v1.5.0...ipfs-gateway-race-v1.6.0)
(2024-09-25)


### Features

* use big file downloader
([#180](#180))
([57832cc](57832cc))


### Fixes

* maybe do not use path
([070abcf](070abcf))
* use bootstrap sha
([05182c6](05182c6))


### Other Changes

* trigger release
([c05de73](c05de73))
* trigger release
([3661323](3661323))
* update repo ([#179](#179))
([1d99326](1d99326))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
alanshaw pushed a commit that referenced this pull request Sep 25, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.13.0](edge-gateway-v1.12.1...edge-gateway-v1.13.0)
(2024-09-25)


### Features

* use big file downloader
([#180](#180))
([57832cc](57832cc))


### Fixes

* maybe do not use path
([070abcf](070abcf))
* org slug
([65b8494](65b8494))
* remove unused env var
([177ac95](177ac95))
* stricter requirements for cache
([#178](#178))
([3dc5c15](3dc5c15))
* use bootstrap sha
([05182c6](05182c6))


### Other Changes

* trigger release
([c05de73](c05de73))
* trigger release
([3661323](3661323))
* update repo ([#179](#179))
([1d99326](1d99326))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants