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: server-mode streamed downloads #742

Merged
merged 29 commits into from Jul 28, 2023
Merged

feat: server-mode streamed downloads #742

merged 29 commits into from Jul 28, 2023

Conversation

jlahovnik
Copy link
Collaborator

@jlahovnik jlahovnik commented Jun 20, 2023

Fixes #166

Description

With the changes in this pull requests the handling of downloads via the API is changed:

  • For the HTTPDownload plugin zip files received from the provider (e.g. peps) will be directly streamed to the user without storing them. In case we receive individual asset files from the provider (e.g. earth_search_cog), they are also streamed and compressed on the fly streamed as a zip file.
  • With AwsDownload, S3RestDownload or external python APIs plugins, streaming is not implemented yet. As fallback, downloads are performed on the server and immediately deleted once transferred to the client.

Here is the update download methods call graph (implemeted for HTTPDownload):
image

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2023

Test Results

       4 files  ±0         4 suites  ±0   4m 46s ⏱️ +6s
   394 tests  - 1     392 ✔️  - 1    2 💤 ±0  0 ±0 
1 576 runs   - 4  1 516 ✔️  - 4  60 💤 ±0  0 ±0 

Results for commit 96a590d. ± Comparison against base commit ce9b54a.

This pull request removes 1 test.
tests.units.test_stac_utils.TestStacUtils ‑ test_download_stac_item_by_id

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2023

Code Coverage (Ubuntu)

File Coverage
All files 82%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against 96a590d

@github-actions
Copy link
Contributor

github-actions bot commented Jun 21, 2023

Code Coverage (Windows)

File Coverage
All files 76%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against 96a590d

@sbrunato sbrunato changed the title Handle downloads feat: server-mode streamed downloads Jun 21, 2023
@sbrunato sbrunato force-pushed the handle-downloads branch 2 times, most recently from 4509ff8 to a8f3e4f Compare June 28, 2023 09:32
@sbrunato sbrunato force-pushed the handle-downloads branch 13 times, most recently from 59b3bd9 to 58576d0 Compare July 27, 2023 17:08
@sbrunato sbrunato closed this Jul 28, 2023
@sbrunato sbrunato reopened this Jul 28, 2023
@sbrunato sbrunato force-pushed the handle-downloads branch 5 times, most recently from acc445c to 38ca15c Compare July 28, 2023 07:18
streams the zip files send by the provider directly to the user without storing them in the EODAG server container
for items where links to several asset files are given those assets can now be streamed directly without storing them or they are stored and a zip file is streamed
@sbrunato sbrunato merged commit 6cc222a into develop Jul 28, 2023
12 checks passed
@sbrunato sbrunato deleted the handle-downloads branch July 28, 2023 08:20
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.

stream stac serve-rest download
2 participants