Platform as a service review

I thought it could be interesting to do a small review of the PaaS solutions I've come into contact with and my experience. To preface this post I want to say that I mainly use PaaS solutions for prototyping and small scale development. None of the solutions I've built so far is running in production mode but I want a solution that can scale. So I'll focus on the free tears in this review.

Appfog

First I tried Appfog and back then I hadn't used PaaS solutions before. Appfog had what I wanted when it came to languages and was generous with resources and services. After I used the service for about 6 months they changed their free tear to be really restrictive and stop my application randomly. This prompted me to find a new solution.

An important feature of a PaaS solution is monitoring and logging. This was one of the things I never got to work in a reasonable way. They have no good way to read files on disk so I tried logging via services.
First I tried to use the logentries service but reading the log though that service was never satisfying for development. Logs wasn't immediate, error messages was hidden and debugging was really taxing.
So I tried to install an log4j appender to route my messages to mongodb but I wasn't able to read that externally in a good way. (Logging in, setting up a tunnel and reading the log through a plugin in eclipse that was buggy wasn't a good solution)

Appfog handle their resources by giving you a set amount of CPU and memory and you have sliders to determine how much resources the current installation should use. How much disk space is allocated isn't clear.

Deployment is done via building your WAR and then uploading using the Appfog console application.

Resources: 512MB memory
Languages: Java, PHP, Ruby, Python, Javascript (nodejs)
Databases: Mongo, Mysql, PostgreSQL

Openshift

This is the service I currently use. Their resource management is different. Openshift use gears that have a specified amount of CPU, memory and disk depending on the size of the gear. And when you install an application you decide how many gears you want to use. In the free tear you get 3 small gears and that was reasonable amount of resources for my project.

When it comes to logging the Openshift you write your logs to disk and then you have tools in the rhc to read files with common GNU commands directly. This is an immediate read and pretty straight forward. And if that wasn't enough you could login to the application space via ssh and have full access to your home directory with your application, setting environment variables both in a none persistent and persistent way.

One downside to Openshift is that the extra services is installed on the same gear as the application and share resources if you use the standard setup. This didn't work for me because I required some data to be saved to disk and some to mongo db. And this mongo db installation took half of the gear resources so I ran out of disk almost instantly.

My solution was to setup a do-it-yourself gear and added the database there. Using environment variables and ssh tunneling I then setup a connection from my application to the database gear. But the database gear was stopped when not "used". So I had to add a keep alive thread to my application calling the web front of the database gear to keep it up during operation.

Of course one could fix this by buying gear power but when you develop a prototype you don't want a pay per month deal.

Lastly we have to talk about deployment. You setup a project to a git repository at Openshift and the deployment of your application is done by pushing data to the repository. The Openshift tooling also helps you to deploy new applications and services directly from Eclipse.

Resources: 3 * (1GB disk, 512MB memory)
Languages: Java, PHP, Ruby, Python, Javascript (nodejs), Perl, Go
Databases: Mongo, Mysql, PostgreSQL

Bluemix

I've also looked into Bluemix, this is a new service from IBM that I feel is a bit in beta stage at the moment. The interface is sluggish and the business case is not directed to prototype development.

So to the functionallity. Adding a new application, in my case a liberty profile, was quite easy. And after the installation the interface informed me that I could use cloud foundry console tools like Appfog uses, Bluemix tools inside Eclipse or Git repository for my deployment.

I got the git repository to work for me without much hassle. Installing extra services like Mysql wasn't hard either but I realized that Mongo db wasn't labeled as a data management module. It was labeled as a web application service so I missed it at first. And I couldn't find any service for actual management of the data inside my databases.

The connection information uses the same standard as Appfog with the VCAP_SERVICES environment variable. So if you use Appfog for your application today the migration should be quite seamless when it comes to database connections.

Another way to deploy your application is to use the Bluemix tools for Eclipse. If you have tried the Liberty profile server inside Eclipse the Bluemix setup is similar. You install the tools via link or marketplace. Then you just add a new server to your servers tab.
Then you can use the server as any other server in the list. Build your application and then choose run on server.
Using this approach is a bit slower than the git option and works only for liberty profile. A plus is that you can utilize a local installation to test your application and then deploy it to Bluemix in the same way.

The default logging the scenario is much like at Appfog. You could use the cloud foundary tools to read some log files and browse for your application log files.
If you use Liberty Profile on the other hand you have another option. The Bluemix tools for Eclipse will show your system console, apache activity and server output in your server console when you choose to run your application on Bluemix server. Some server exceptions will also be fetched and displayed in a separate popup window.

Many things in Bluemix they are still in beta like https://www.ng.bluemix.net/docs/#manageapps/index-gentopic5.html#missing (2015-04-08).

Resources: Bluemix has no free tear, you pay per GB used every hour
(Cost of App = (App's GB-hours - 375 Free GB-hours) x $0.07)
Languages: Java, PHP, Ruby, Python, Javascript (nodejs)
Databases: Cloudant, DB2, Mysql, PostgreSQL, Mongo

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.