BoxLang 🚀 A New JVM Dynamic Language Learn More...

PresideCMS Extension: External Storage for DB Columns

v0.1.1+0000007 Preside Extensions

External Storage for DB Columns

About

This experimental extension allows you to use a Preside storage provider as private storage for a database column (on a Preside object). This could be useful in situations where you have a table with a lot of rows and one large column that is read infrequently. Putting the storage of this column in an S3 bucket, for example, could have a cost benefit, keeping database storage lower and utilising more cheap storage in its place.

Howto

With this extension installed (box install preside-ext-external-dbcolumn-storage), you annotate your preside object property with a externalStorageProvider attribute whose value is a configured storage provider in wirebox:

// a preside object
component {
	property name="content" externalStorageProvider="myStorageProvider";
}
// WireBox.cfc

// N.B. for illustrative purposes only - settings.mystorageprovider is fictional and would be up to you to configure
// here we are using the s3 storage provider, but could be another storage provider altogether
binder.map( "myStorageProvider" ).asSingleton().to( "app.extensions.preside-ext-s3-storage-provider.services.S3StorageProvider" ).noAutoWire().initWith(
	  s3bucket    = settings.mystorageprovider.bucket
	, s3accessKey = settings.mystorageprovider.accessKey
	, s3secretKey = settings.mystorageprovider.secretKey
	, s3region    = settings.mystorageprovider.region
	, s3subPath   = "/mystorageprovier"
);

Known limitations

This extension is in an ALPHA state. it currently does not:

  • Delete objects from the storage provider once their parent record is deleted
  • Delete objects from the storage provider when the value of the column changes

License

This project is licensed under the GPLv2 License - see the LICENSE.txt file for details.

Authors

The project is maintained by The Pixl8 Group.

Code of conduct

We are a small, friendly and professional community. For the eradication of doubt, we publish a simple code of conduct and expect all contributors, users and passers-by to observe it.

Changelog

v0.1.1

  • Build fix

v0.1.0

  • Initial alpha version. Ability to annotate an object property to use a configured storage provider for its storage.

$ box install preside-ext-external-dbcolumn-storage

No collaborators yet.
  • {{ getFullDate("2024-05-14T12:51:22Z") }}
  • {{ getFullDate("2024-05-14T12:51:22Z") }}
  • 218
  • 279