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

refactor download file #314

Closed
cnlangzi opened this issue Dec 3, 2021 · 10 comments · Fixed by #753
Closed

refactor download file #314

cnlangzi opened this issue Dec 3, 2021 · 10 comments · Fixed by #753
Assignees
Labels

Comments

@cnlangzi
Copy link
Contributor

cnlangzi commented Dec 3, 2021

  • download fragments by chunks in parallel requests (not Chunk on Protocols). It is https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests
  • download fragments in parallel requests from blobbers
  • resume a download of a file that has been partially transferred.
  • still need to support video-streaming . please check more detail with @moldis if there is any question. it is used on local or web video player
  • pipe stream support (output bytes to io.Writer instead of file directly)
  • support to reconstruct data on local with minimal fragments instead of download all fragments if it is possible . check here for detail
@cnlangzi
Copy link
Contributor Author

cnlangzi commented Dec 9, 2021

some bugs need to be fixed too

  • folder is not able to download. we need to get file list , and download them one by one
  • please cancel download task if it is not able to download. eg auth ticket is incorrect or expired

@cnlangzi cnlangzi assigned cnlangzi and unassigned lpoli Dec 9, 2021
@moldis
Copy link
Contributor

moldis commented Dec 11, 2021

@cnlangzi Not clear abound point #1. The ranged request has been implemented in the oldest algorithm, are you going to reimplement it?

@cnlangzi
Copy link
Contributor Author

@cnlangzi Not clear abound point #1. The ranged request has been implemented in the oldest algorithm, are you going to reimplement it?

yes, it should work in parallel requests too.

@cnlangzi cnlangzi assigned lpoli and unassigned cnlangzi Dec 14, 2021
@lpoli
Copy link
Contributor

lpoli commented Dec 15, 2021

Task taken. Will start on Sunday

@cnlangzi
Copy link
Contributor Author

@lpoli , please double check ReadMarker. it seem be not designed for parallel requests.

@lpoli
Copy link
Contributor

lpoli commented Dec 23, 2021

  1. Download fragments by chunks; So this is not supported by blobber yet? Please also explain about nature of parallel requests

  2. What support for video-streaming?

  3. Pipe stream is fine. Understood.

  4. I checked Reed Solomon docs. It is to reconstruct missing shards. So you mean we need this for repairing data, right?

@cnlangzi @moldis @guruhubb

@cnlangzi
Copy link
Contributor Author

  1. Download fragments by chunks; So this is not supported by blobber yet? Please also explain about nature of parallel requests
  2. What support for video-streaming?
  3. Pipe stream is fine. Understood.
  4. I checked Reed Solomon docs. It is to reconstruct missing shards. So you mean we need this for repairing data, right?

@cnlangzi @moldis @guruhubb

re 1: ignore parallel requests in a blobber download. Because parallel requests is not supported on ReadMarker.
re 2: https://docs.0chain.net/0chain/zbox-cli#video-streaming
re 4: for now, all fragments are downloaded. but it is unnecessary. for example, we can only download 4 fragments only, and reconstruct original file if an allocation is 4 data + 2 parity.

@lpoli
Copy link
Contributor

lpoli commented Dec 27, 2021

Readmarker doesn't support parallel requests. Are you suggesting it is due to ReadCounter?

Regarding video-streaming; I am still not sure what support is required?

@cnlangzi
Copy link
Contributor Author

cnlangzi commented Dec 27, 2021

https://docs.0chain.net/0chain/zbox-cli#video-streaming

re ReadMarker

ReadMarker is verified one by one like WriteMarker. it is great if it is supported. please double check code

re video-streaming

please check it on https://docs.0chain.net/0chain/zbox-cli#video-streaming. I don't know other documentation too. it seems is implemented by @moldis ? if yes, try to ping him for more detail

@lpoli
Copy link
Contributor

lpoli commented Dec 27, 2021

@moldis said they are using block download.

Now it seems only work is to pipe download stream to some writer/reader.

@lpoli lpoli linked a pull request Feb 6, 2023 that will close this issue
3 tasks
@dabasov dabasov assigned aniketsingh03 and unassigned lpoli Feb 11, 2023
@guruhubb guruhubb assigned lpoli and unassigned aniketsingh03 Mar 10, 2023
@din-mukhammed din-mukhammed linked a pull request Mar 31, 2023 that will close this issue
3 tasks
@din-mukhammed din-mukhammed removed a link to a pull request Apr 3, 2023
3 tasks
@din-mukhammed din-mukhammed removed their assignment Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants