This post will show how to use the Play framework with IBM BlueMix to develop and run a very simple REST style web application. The application supports APIs to create, retrieve, update and delete objects represented by JSON in HTTP requests. On the backend, the application connects to a BlueMix managed PostgreSQL database to persist and query data parsed out by the application from the HTTP requests.
Having covered how to deploy a trivial Node.js application to IBM Bluemix, this post goes deeper into features available for creating reusable manifest.yml files and covers Cloud Foundry buildpacks used during deployment. By the end of the post you will have deployed a trivial Hello World application written in PHP to a Zend Server's PHP container running on IBM Bluemix.
My favorite thing about the BlueMix platform is how quick and easy it is to stand up services and start using them. Let me show you what I mean by outlining a java web application which inserts some data into a DB2 database service. If you’re familiar with creating a servlet, you can do this with me in less than 10 minutes.
While most of your applications should work just fine in the cloud, remember: Don't write to disk. The file system is a resource that isn't persisted. As you application instance gets restarted, updated, scaled or recreated, the file system it sits on changes. Using the disk for temporary or cache purposes is OK, if you need persistent storage, create a database.
BlueMix includes a general purpose caching service powered by WebSphere eXreme Scale to really accelerate your applications in the cloud. You can use this cache to store user profiles, store frequently accessed data, or as a general purpose state store for your application. There are two primary APIs to the Cache: Java and HTTP REST. You can learn more about these APIs in the WebSphere eXtreme Scale InfoCenter.
The Cloud Foundry command line client has just been updated to version 6, and is ready for use with BlueMix. This version is much simpler to install (no need to install Ruby) and is dramatically faster to use. Go ahead and give it a try in place of the older 'cf' version.
Your opinion counts! We are building the Bluemix platform for you... our customer. Please spend some time to make a suggestion regarding how we can improve your experience.