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

Use Cases for Upload #24

Open
aajtodd opened this issue Jul 18, 2024 · 0 comments
Open

Use Cases for Upload #24

aajtodd opened this issue Jul 18, 2024 · 0 comments

Comments

@aajtodd
Copy link
Contributor

aajtodd commented Jul 18, 2024

  • Have simple APIs for these common use cases:
    • Given filepath, upload file
    • Given bytes in memory, upload them
  • Also support complex use cases, where the user is copying data themselves:
    • User is able to copy data synchronously (e.g. data comes from memory)
    • User must copy data async (e.g. data comes via HTTP calls to some other API)
    • User has no control over when (if ever) data arrives (e.g. you are a user space filesystem and have no idea when the next fwrite() will happen)

Uploader must always be mindful of flow-control and memory limits:

  • It must accept multiple chunks to work on concurrently, for performance.
  • But it must be able to limit that number, so that memory doesn't fill with buffers faster than they can be uploaded
  • And we might want users to be grabbing buffers from a pool

aws-c-s3 had to evolve its API several times to account for some of these use-cases, but Rust's async APIs might already take a lot of these design challenges into account, so it might not be such a big deal

Other thoughts:

  • Should Uploader encourage/force users to submit chunks along part boundaries?
  • Allow users to provider per-part checksums as they upload?
@graebm graebm changed the title Use Cases Use Cases for Upload Jul 19, 2024
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

No branches or pull requests

1 participant