Running Java in the Cloud, are you? Using Tomcat because it’s lightweight? Let’s take a closer look.
Your code is running on Tomcat, which is running on a Java Virtual Machine (JVM), which is running on a Linux operating system (OS) in your virtual machine (VM) instance. But that VM is running on a hypervisor, which is probably running directly on the hardware – if you’re lucky.
So, JVM – OS – hypervisor. Each provides protection and abstraction. And of course, layers of detritus that slow everything down. Wouldn’t everything run a lot faster if we combined these three layers, stripping out all the stuff we don’t need?
That’s the idea behind the emerging concept of the Cloud Operating System. Integrate the JVM into the OS kernel. Strip out everything in the OS that the hypervisor is taking care of (like network access) or that the JVM doesn’t need. What you end up with is an lean mean runtime-specific machine that runs much faster than a normal VM, and is more secure as well, simply because there is much less of it to hack.
Cloud Operating Systems have recently gained traction with the September release of OSv, put together by hardcore members of the Linux community. There’s much more work to be done, of course, but they have enough in place to prove the concept.
Whether Cloud Service Providers like Amazon will adopt Cloud Operating Systems is anybody’s guess, but I think it’s more a matter of when than if – and even when we see them populating available VM instance types, they will be alongside more traditional configurations for the foreseeable future.