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

Optimize file transfer #23

Open
chrisjsewell opened this issue Jul 3, 2023 · 0 comments
Open

Optimize file transfer #23

chrisjsewell opened this issue Jul 3, 2023 · 0 comments
Labels
enhancement New feature or request upstream Changes that need to be made to aiida-core

Comments

@chrisjsewell
Copy link
Member

The key usage of the transport in aiida-core is in:

Currently, the get and put methods are "simple" in that (via also gettree/puttree) they make isolated/synchronous calls to getfile/putfile, to download/upload each file.

For small files (< 5Mb) this is maybe not so bad, since anyway these are transferred in a single GET/POST request (although for async PUT, see e.g. https://github.com/chrisjsewell/fireflow/blob/941ab9631537bcb8103331f6fc2aaecc720ab6da/src/fireflow/process.py#L307)

Certainly, though for large files, upload/download is a multi-step process, for download (and inverse for upload):

  1. Initiate a transfer task of the target file to the "staging area" object store
  2. Poll this task until it is completed
  3. Download from the object store, via the supplied URL

For multi-file downloads, it would be ideal to initiate all transfers first, then poll all the tasks together, before starting to download from the object-store.

It is also of note that the code in execmanager does not provide all the files at once, rather in a loop (of either file or folder),
and so ideally there would be an upstream change there also

@chrisjsewell chrisjsewell added enhancement New feature or request upstream Changes that need to be made to aiida-core labels Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream Changes that need to be made to aiida-core
Projects
None yet
Development

No branches or pull requests

1 participant