Java in the cloud: Google, Aptana, and Stax

Google App Engine, Aptana Cloud, and Stax for EC2 make it easy to spin up and scale a simple Java Servlet Container, but are still a far cry from the full Java EE

1 2 3 4 5 6 7 8 Page 6
Page 6 of 8

The Stax software doesn't offer up as much low-level access as Aptana, but it offers a greater variety of computational resources. On one hand, you can't just push a button to get root access to your server. There's no Secure FTP or other configurations available. On the other hand, you can move your application to a cluster with up to five servers with just a click of the button.

The simplicity of the Stax software made it easier to get moving. I was able to start up a simple Wicket application and move it to a cluster of two machines in just a few minutes. As I pounded on it, I could watch the graphs show how the CPU and memory spiked as the HTTP requests piled up. It was pretty simple to push the servers to the edge.


Stax offers the full JVM, but there are some minor hiccups. You can pretty much do anything you would normally do with Tomcat, such as start up your own threads, but you've got to be aware that some of the resources, like the file system, might be a bit hidden. The applications can write directly to a sandboxed corner of the file system, but this data is not synchronized between machines. If you're only going to use one server, you'll be fine. The simplest way to handle the synchronized data is to write to Amazon's S3 because it's in the same datacenter. I suppose you might also handle the synchronization yourself by setting up JMS because when it comes down to it, Stax is just Tomcat under the hood.

The Stax cloud is still officially in a free beta. The JVMs all run in 256MB of memory, but this will be another dial that you can choose in the future. The prices haven't been set, but it only makes sense that it will be a bit more expensive than Amazon's cloud unless Stax Networks is able to swing some bulk pricing.

Openness or scalability

Which solution should you choose? Much depends upon the nature of your application. If your data falls neatly into columns, and not much computation needs to take place when you save or recall it, Google's App Engine is a nice choice. Google offers a free tier of service that makes it great for prototyping solutions that can turn into full-fledged applications without any deployment hassles.

Google's solution changes the failure modes of running an operation. If your application finds wild success on the Internet, you don't need to frantically try to purchase new servers that won't arrive until the fad is a distant memory. But you'll need to bump up the daily quota on your account because Google will only keep your code running as long as you authorize the spending.

There are hefty tradeoffs to choosing Google's easy chair. If you want to use all of the standard APIs, write to disk, log into a shell account, or just enjoy the freedom to move your application to another provider without rewriting it, you'll need to look elsewhere. Taking advantage of Google's scaling prowess means writing to its tightly restricted APIs.

1 2 3 4 5 6 7 8 Page 6
Page 6 of 8
How to choose a low-code development platform