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 support for FileStorageService as a concept / declaration #2018

Open
Martinsos opened this issue May 7, 2024 Discussed in #1988 · 5 comments
Open

Add support for FileStorageService as a concept / declaration #2018

Martinsos opened this issue May 7, 2024 Discussed in #1988 · 5 comments
Labels
hm Requires more thought idea Something to consider major feature

Comments

@Martinsos
Copy link
Member

Discussed in #1988

Originally posted by shuntl April 24, 2024
It would be awesome to have wasp in development mode be able to spin up a dummy S3 bucket. Then prod env we can add the details for either a real S3, Digital Ocean space etc etc.

@Martinsos Martinsos added idea Something to consider hm Requires more thought major feature labels May 7, 2024
@Martinsos
Copy link
Member Author

My comment from discussion:

Huh that would be interesting indeed!

It is a bit specific though hm, doesn't sound like a feature to add to the core language of Wasp.

But maybe concept of FileStorage would be interesting, and then you can choose S3, Azure Blob, ... .
Ok yeah that is actually what you said, I get it now! Ok, that would be quite interesting, you are right.

I wonder what the right name would be. FileStorage? Storage?

We could have a way to say we want to have Storage, and it can be Dummy for start, and then as you said it can be S3 or sometihng else. We would need to have abstraction layer over it though. I wonder if a library for this already exists. And they would still need to be able to access it under the hood when needed (and use e.g. specific S3 options).

@Martinsos
Copy link
Member Author

I think this is a bit wild idea, I am not sure if we should do it or not, but it is interesting, and merits further investigation. It could be cool! FileStorage indeed is part of many web apps, and why wouldn't we abstract it?

@Martinsos
Copy link
Member Author

Martinsos commented May 7, 2024

Name for this is actually "Object Storage" from what I read a bit, or just Storage.

I found this library that abstracts it (among other stuff): https://github.com/pkgcloud/pkgcloud?tab=readme-ov-file#storage .

@infomiho
Copy link
Contributor

infomiho commented May 8, 2024

This sounds like an interesting idea! Since we are suggesting to our users the usage of object storage vs. using the local file system to keep the app portable, it makes sense to offer first-party support for object storage.

Using S3-compatible API could be interesting as there are many that support it:

  • S3 (AWS)
  • R2 (Cloudflare)
  • B2 (Backblaze)
  • Minio (self-hosted version, it could be our "local provider" that we run in Docker like the DB - some details in this article)

@Martinsos
Copy link
Member Author

Aha, so S3 became kind of a standard -> ok, that is also an option then! Although it would be nice to also support Azure and GCP as two big providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hm Requires more thought idea Something to consider major feature
Projects
None yet
Development

No branches or pull requests

2 participants