This article talks about the the different Java cloud providers and our first hand experience working with them. Our last project involves deploying an Open-Tides (Spring, Spring MVC, JQuery, Hibernate) application to the cloud and as such, we explored and played around with the different cloud providers.
Here’s a rundown of what we learned:
Google App Engine
GAE is a true cloud hosting because it charges by CPU cycle instead typical by CPU instance. This also implies that your application is running on a scalable and elastic platform. The performance of your application automatically adjusts to the load. However, as a trade-off, your application needs to be designed and built based on GAE from the start. Existing Java applications may not be compatible with GAE due to limited library support for Java.
In our case, we had trouble getting our existing Hibernate/JPA to run in GAE because some of our functionalities are tightly-coupled with Hibernate API. So, we quickly dropped GAE as an option.
Amazon Elastic Beanstalk
Amazon Web Services offers a wide variety of cloud hosting services which makes it the leading cloud provider. However, this also makes AWS very difficult to understand. After logging in, I was bombarded by the navigation tabs as shown below (there’s actually more that couldn’t fit this screen).
Understanding each of the service and picking the right service requires considerable amount of learning time. Setting up security for interconnectivity between my console to the virtual machines to the database is also not very straightforward.
In our case, it took me about 2 days to deploy our application. This is primarily because I have to learn and understand the different configuration settings and choose the appropriate one. The good news though is that we are able to successfully deploy our enterprise application in the Amazon Cloud and has been very stable so far.
Cloud Foundry is backed by VMWare, Inc. and could be a true competitor of Amazon in the cloud hosting business. They offer hosting for different platforms as well including Grails, Node.js, Ruby and others. Deployment is relatively straightforward. We were able to get our application working but had problems on the database because we are unable to change lower_case_table_name settings in my.ini. Unfortunately, we can’t rename all tables because we have production data already.
Jelastic is a new player in the cloud and they offer hosting that is specific to Java. This gives a great deal of advantage for Java developers to easily move their application into a cloud based service. During the time of our evaluation, Jelastic was in BETA and is not ready for production use. Nevertheless, I see a very good fit of our Java application into Jelastic because they support Tomcat and Mysql.
Unfortunately, we had trouble uploading our database into Jelastic because they only allow uploading of limited file size during the BETA period and our database was about 200MB. It may be worthwhile to try Jelastic again since they are now in production.
We ended up choosing Amazon ElasticBeanstalk as our hosting provider because they offered the most flexible hosting option. With Amazon AMIs, we were able to setup our application according to our needs. If given another chance to build a new cloud application, I would be happy to explore Google App Engine.