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

Add large file support #10

Closed
Xuanwo opened this issue Aug 6, 2021 · 7 comments
Closed

Add large file support #10

Xuanwo opened this issue Aug 6, 2021 · 7 comments

Comments

@Xuanwo
Copy link
Contributor

Xuanwo commented Aug 6, 2021

We read all content into memory for now, it's not acceptable for real users.

The logic looks the same as https://github.com/beyondstorage/beyond-fs/blob/master/vfs/cache.go, maybe we can extract it as a new library.

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Aug 6, 2021

I'm working the lib: https://github.com/beyondstorage/go-converge

GitHub
A lib that converge input from upperlying storage to underlying storage. - beyondstorage/go-converge

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Aug 23, 2021

Hi @xiongjiwei, the 0.1.0 version for go-stream has been released: https://github.com/beyondstorage/go-stream/releases/tag/v0.1.0

Could you give it a try?

GitHub
v0.1.0 - 2021-08-23 Added

feat: Implement basic stream logic (#1)
feat: Implement stream logic via Multipart (#4)
feat: Add check for multipart (#7)
test: Implement integration tests (#8)
feat: Ad...

@xiongjiwei
Copy link
Contributor

that's great

@xiongjiwei
Copy link
Contributor

Hi @Xuanwo, seems it only supports storager which implements Multiparter, maybe I should wait for the PersistMethodWrite PersistMethod to be supported?

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Aug 25, 2021

Hi @Xuanwo, seems it only supports storager which implements Multiparter, maybe I should wait for the PersistMethodWrite PersistMethod to be supported?

I think it's OK to add support for Multipart first.

@xiongjiwei
Copy link
Contributor

Got a question about the stream lib, does it support append data to the under storager? How can I control the behavior to append or overwrite? I find the PersistMethodAppend which seems will be implemented in the future. if I should use this field to control the stream behavior, seems I should create 2 streams, one is used for overwriting and another one is used for append.

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Aug 29, 2021

The go-storage design limited that:

  • We can't append an object unless the object is created by CreateAppend, aka, has Append object mode.
  • We can't do multipart on an object unless the object is created by CreateMultipart, aka, has Multipart object mode.

The limitation is introduced by most storage services (except local fs) can't support append to object.

So, we always need to choose a persist mode before we start to create the file. And it's could be PersistMethodMutlipart or PersistMethodAppend, of course, multipart only for now.

It's OK for BeyondFTP to return errors if the underlying storage doesn't have append supports.

@Xuanwo Xuanwo closed this as completed Sep 15, 2022
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

2 participants