Everyone and his dog are talking about cloud computing. This is the future of computing, nobody will have an own server, all data will be send to a hoster, who has unlimited scalability for the given application, the only limitation is the depth of users pocket, but since the resources are shared among multiple users, processing time, bandwidth and memory are much cheaper than having an own server. No configuration, no administration is required, self-healing services allow 24/7 availability of the applications.
Well, this is what we thought, when we started to develop our applications. We are a small startup in Germany and our idea is to provide a new Local Based Service for mobile devices and a portal. When you have a startup you never have enough resources, neither time, nor personal, nor financial, nor lot of experience. Therefore the idea was to use cloud computing as back-end solution. We don't want to have own server, buy expensive upload bandwidth, configure it, administrate it, secure it, backup it. We just want to start programming of our application. We were looking at several alternatives but at the end we decided to go with Google Application Engine. GAE was very intriguing for us, because it offered a Java environment with Google database, fast searching algorithms, low costs and well, this is Google, so what can go wrong? Unfortunately quite a lot.
After installing Eclipse GAE plugin and reading some documentation I was soon able to create first example, test is on localhost and upload it on GAE server and voilá it worked. Encouraged by this success I decided to develop our whole application on GAE.
First difficulties started, when I tried to create references from one object to another and save it in the database. The web is full with happy coders who are praising Google how easy it was to create a 1:1 reference, or even 1:n, but I was not able to create references, which worked flawlessly. At least in documentation it was stated that m:n references are possible just by manual managing of the keys of the referenced objects, so we ended with manual managing of the keys of all objects, so back to the roots. What by the way was cascading?
After a while, the GAE O/R mapper refused to enhance the POJO entities. As O/R mapper GAE is using DataNucleus. Why they are not using widely accepted and proven Hibernate is beyond my imagination. DataNucleus is nowhere as praxis proven as Hibernate and for some coders this might be English humor, but for me the support answers from DataNucleus guys were pure arrogance. After wild configurations orgies finally we gave up the idea of starting the application from Eclipse and started using an ant script, which worked quite nicely as long, as the application had to be started on the localhost.
After our application became more complex and we deployed it more often on the GAE server, so that more people could take a look at the progress, we realized that the starting time of the application were horrible. It took about 15 sec, till the start page appeared in the browser. Last time a webpage took 15 sec for appearing on my browser was in the 90th, when I was surfing for overclocking tips on weird Japanese websites with my 56kbaud modem. After searching in some forums I realized, that I was not the only one affected by the issue. It seems, if the application is not in usage, it disappears from the main memory of GAE server and it takes long time, till it is reloaded (maybe even recompiled) and is ready to serve. On the forum people were discussing how often a client should send a request to the GAE server, so that own application does not disappear from the memory! Seems it is becoming cat and mouse catching between Google and GAE users, because the intervals between the pings are getting shorter and shorter.
After testing on GAE server we started to realize that the behavior of the application on server is different than in testing environment. The application crashed, at situations, where it run flawlessly on localhost. The problem was that the logfile stayed clean, so no indication what might be wrong. Also complete crashes were not uncommon, when not a single user from different locations could access the application. It took me quite a long time to find out how to restart the application after total crash ("appname".appspot.com?restartApplication).
Another problem risen up, when our webdesigner started his work. It is not possible to upload single files, it must be the complete war directory. So even if a picture has changed, the whole application must be redeployed. Why should an external web-designer have access to the whole application code?
Database administration is very basic. Neither it is possible to dump the whole database or delete it completely and start with a new one. A database viewer is available, so it was possible to see, which references again have been either not created or created wrong.
But the biggest issue hit us two weeks ago. For some reason it was not possible to deploy the application on GAE server! Without any reasonable explanation the uploading stopped at 99% and rollbacked to the old version. If such a thing happens during production mode, this is absolutely unacceptable. Two weeks later the deployment is still not possible.
This was the last drop, therefore say hello to MySQL, hello to Hibernate, hello to Tomcat, hello to BlackHats.
The idea of cloud computing is great, just upload your code, the provider cares for the rest. But praxis shows completely different picture. Cloud Computing must be taken with a very big grain of salt, currently only for testing, at least GAE has still a long way to go, till it can provide a viable alternative to an own server.