Posts Tagged ‘VPS’

Java Hosting – VPS vs Google App Engine

July 14, 2009 5 comments

For quite some time I’ve started to think (again) about my very own Java hosting.
There are some ideas running in my head that I’m really eager to implement (Groovy brought me back to dynamic languages again after I left Perl behind many years ago) but first thing first – I’ve started to think where I’ll host everything.

At first, Google App Engine seemed like a very nice solution to me. It’s Google, it scales, it’s Java, it’s BigTable and .. ah, right, and it’s free for starters. Seems like a perfect deal, right ?

Unfortunately, not so fast. I’ve opened again that link yesterday and watched closely what do they offer. And then I see this: “A Java application cannot create a new java.lang.ThreadGroup nor a new java.lang.Thread. These restrictions also apply to JRE classes that make use of threads. For example, an application cannot create a new java.util.concurrent.ThreadPoolExecutor, or a java.util.Timer”.

No Threads for you! But wait, it only gets better:

  • HTTP request should return a response within ~ 30 seconds, no longer than that
  • No disk usage, except files uploaded
  • No system calls
  • Crontab calls (invoked over HTTP) have the same 30-seconds limitation
  • Partial JRE support (but that was known to me already)

I was shocked, to say the least. Forbid concurrency ? Today ? I was already planning my thread pools and queues in my head but that … How am I going to execute any long-lasting background tasks ? In the end, I have decided that App Engine is a no-go for me 😦

This very good link (Choosing a Java hosting provider) brought me back to an idea of VPS – Virtual Private Server. It’s when you have you own Linux but it’s not really you own – you’re sharing it with others but on a BIG server. Like many others, I came to conclusion that:

So I’m now on my way to Linode and my very own ThreadPoolExecutor!

Update (August, 2009): I’ve purchased GoGrid services instead. More details will follow soon.