Build a Photo Storage Service in the Cloud with PHP and IBM Bluemix

Cloud storage is increasingly popular because it’s cheap and scalable. Amazon Simple Storage Service (Amazon S3) is probably the most well-known, but almost every serious cloud vendor now has a storage offering. Cue my research into IBM Bluemix and its Object Storage service, which lets you attach cloud storage to your Bluemix application.

Bluemix’s Object Storage service is based on OpenStack Swift and follows Swift’s three-tier hierarchy for organizing data: accounts, containers and objects. To try it out, I built a photo storage application hosted on Bluemix and integrated it with the Bluemix Object Storage service. With a little help from the IBM jStart PHP client library, it was easy enough to implement single-user photo upload and storage. And because Bluemix’s Object Storage service supports multiple sub-accounts per service instance, it wasn’t too hard to extend the base application to support multiple users and multiple containers per user.

The final application uses Bootstrap for the user interface, Silex for application flow control, Twig for page templates and HybridAuth for user authentication. You can read the complete article here, get the source code from Github, or try out a live demo.