March 12, 2011

Google Apps Hassle

Google apps engine sometimes remind me of the Java 2 Micro Edition. Even if you implement it properly there are glitches which can make your day go worse. Running on your system and running on the real server are two different things.

Seems that I have solved my "mixed-up-session" problem at the cost of platform independence. Now, my service uses google memcache in order to store my session object manually. Afterwards, I synchronize my data inside the database. Cleanups and periodical tasks will be written using google task queues.

This is a critical limitation I did not anticipate. I thought the app will be able to run everywhere. It is a small program though and still fun using the apps engine. At least I can concentrate on functional implementation and have no hassle anymore with session management.

March 06, 2011

Google Apps Development

I have now invested some days implementing something for the apps engine. My goal is a JSON standalone-service for serving as a backend for a browser-based chat. Well, I am now at the point where I not only have success but also have some drawbacks:
  • When polling the server every second and with three browsers then the server seems to start to mix up sessions. This only happens on the real server and not on the local testenvironment.
  • It's hard to write tests, because the app engine not only supports JPA persistence but also JDO. The provided toolset for testcases implements JDO tests and my JPA tests do not run.
  • I encountered further datastore exceptions when I try to invoke database cleanups with spring tasks.
  • The provided CPU-time quota of 6.5 CPU-hours is too restricting. Each web request that is calculated with around 50 milliseconds is sometimes measured as cost of 150 CPU-milliseconds.
Google Apps provides all kinds of work arounds, e.g. task queues, mem-caches and other services. It is forseeable though that even with those services my service will never run cost efficiently. Also I am not interested in their services because I want my service to be platform independent.

All in all it is really nice to tweak and try out the google apps engine. In case of business applications your still cheaper renting your on server and manage it yourself.