utopia-php / storage

Lite & fast micro PHP storage library that is **easy to use**.
https://appwrite.io
MIT License
28 stars 63 forks source link

🚀 Feature: Support for MINIO Object Storage #37

Open christyjacob4 opened 2 years ago

christyjacob4 commented 2 years ago

🔖 Feature description

MinIO offers high-performance, S3 compatible object storage. Native to Kubernetes, MinIO is the only object storage suite available on every public cloud, every Kubernetes distribution, the private cloud and the edge. MinIO is software-defined and is 100% open source under GNU AGPL v3.

https://min.io/

🎤 Pitch

Minio is a great candidate to add to the growing library of storage adapters

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

SciBitHQ commented 1 year ago

Gents,

From the initial request https://github.com/appwrite/appwrite/issues/3989#issue-1391152771

To be honest, all the S3 drivers could have been made aliases of the parent class S3 by simply having the service URL as a parameter instead of hardcoding the URL into the code. The latter always being a bad idea to start with? The $bucket is never used again but to insert it into the hardcoded URL. It may in fact not even be required to have as parameter with some services if the bucket name is not part of the hostname or path or where a S3 service has either just one bucket or a completely different bespoke URL for each bucket? And so, if you had the URL as parameter, the bucket is superfluous in the constructor parameters?

There are thousands of S3 API compatible services online today, makes no sense to code a driver for each of them, when the only difference between them all is the initial URL. It makes complete sense to code a single driver for all of them. Making the URL a constructor parameter, would have solved @christyjacob4 's immediate problem to add MinIO support to appwrite. As it is, appwrite can also currently only consume a single bucket per appwrite instance & config restrictions. Would also have solved the SSL/problem, and would make the S3 driver class simply what the name implies, an S3 API compatible driver, instead of what it now is, that is, an Amazon service specific driver. That is, a driver coded to a standard instead of coded to a specific vendor.

A humble request to reconsider the current architecture path of the S3 driver, if at all possible.

docimin commented 7 months ago

Gents,

From the initial request appwrite/appwrite#3989 (comment)

To be honest, all the S3 drivers could have been made aliases of the parent class S3 by simply having the service URL as a parameter instead of hardcoding the URL into the code. The latter always being a bad idea to start with? The $bucket is never used again but to insert it into the hardcoded URL. It may in fact not even be required to have as parameter with some services if the bucket name is not part of the hostname or path or where a S3 service has either just one bucket or a completely different bespoke URL for each bucket? And so, if you had the URL as parameter, the bucket is superfluous in the constructor parameters?

There are thousands of S3 API compatible services online today, makes no sense to code a driver for each of them, when the only difference between them all is the initial URL. It makes complete sense to code a single driver for all of them. Making the URL a constructor parameter, would have solved @christyjacob4 's immediate problem to add MinIO support to appwrite. As it is, appwrite can also currently only consume a single bucket per appwrite instance & config restrictions. Would also have solved the SSL/problem, and would make the S3 driver class simply what the name implies, an S3 API compatible driver, instead of what it now is, that is, an Amazon service specific driver. That is, a driver coded to a standard instead of coded to a specific vendor.

A humble request to reconsider the current architecture path of the S3 driver, if at all possible.

Check out #106

jeffdrumgod commented 1 month ago

please, can be generate a new version using the main codebase? The latest merged don't generated tag version, with the resolution.

@lohanidamodar can help us ❤️ ?

docimin commented 1 month ago

please, can be generate a new version using the main codebase? The latest merged don't generated tag version, with the resolution.

@lohanidamodar can help us ❤️ ?

As said above, please check out: https://github.com/utopia-php/storage/pull/106. This PR is not needed anymore.

jeffdrumgod commented 1 month ago

Hi @docimin.

This project has a commit on main branch to use generic host for S3, but does't trigged a release version.

Latest commit: 9c89ea2759175c36f75e4688bd155022ccb1e368

latest version release commit: (version 0.18.4) 94ab8758fabcefee5c5fa723616e45719833f922

CleanShot 2024-08-05 at 16 08 20