Cloud as the Meta Platform

by Jani on March 30, 2010

Share the article

    I recently attempted running Sun Glassfish and JVM on Azure. I am obviously inspired by Steve Marx who posted his ideas around the same.

    But this exercise of porting non MS stuff to Azure gave me a whole new perspective of the Cloud that I want to share with you.

    At a very high level, Cloud Computing exposes two services – Compute and Storage. Even on normal servers and PCs, these are two essential resources to run any application or service. Of course, these resources are abstracted to a level that makes it more friendly and easy to run applications.

    First, let’s discuss the ‘Compute’ resource. Under the hood, it is the hardware and the microprocessor that actually processes the instructions. This hardware is abstracted by an OS like Windows, Mac or Linux which can run applications that indirectly exploits the hardware capabilities. To make it more accessible to developers, we have platforms, language runtimes and virtual machines like Common Language Runtime and Java Virtual Machine. Irrespective of the OS and the development platform, every piece of code touches the hardware at some point. There are some OS imposed restrictions to prevent malicious code from taking over the control. This is achieved by isolating the code responsible for running the privileged OS tasks and device drivers from the application software. Assuming that your code respects these rules and still executes some low level tasks, you have a pretty interesting scenario. You can literally run any application of your choice on any platform. Most of the portable applications leverage this concept. You can carry apps on a portable flash drive and run it on any PC without installing them. If you write a Java app that only has a dependency on JVM, you can potentially run it on any machine that has the Java runtime. Enter the Cloud and you can replicate these scenarios on the Cloud platform. Whether it is Infrastructure as a Service (IaaS) or Platform as a Service (PaaS), the end goal is to expose ‘Compute’ as a service. You got to realize that this service is exposed as a collective resource that might span hundreds and thousands of physical servers distributed all over the world! That’s a massive Compute resource at your disposal. It is completely up to the developer on how he wants to consume this service. If you use Amazon Web Services and sign up for EC2, it is straight forward. You choose an Amazon Machine Image that runs the OS and platform of your choice and port your code on it. You can then add virtually infinite number of servers that can multiply the power of the ‘Compute’ resource exponentially. On Microsoft Windows Azure, you got to write a wrapper within the Worker Role. The wrapper can be anything from a JVM to Python or even assembly language execution environments! This wrapper will bootstrap your required runtime and then launches your application. By increasing the no. of Worker Roles, you will start benefiting from the on-demand computing power. You can literally run any piece of code that you are able to run on your local Windows server. This is possible because of the support for Native Code Execution. The only caveat here is that the code shouldn’t have any UI or shouldn’t wait for user’s input. Processes that can run in an autonomous mode without an affinity to other resources and those with the least number of dependencies on other processes are the best candidates for this scenario. On Google App Engine, you can emulate the Worker Role by porting your Java code into a Servlet and executing it by invoking the URL. Google App Engine has many constraints and limitations which restrict you from consuming the raw Compute power from the underlying hardware. Google wants you to develop and deploy only web apps on their Cloud. I plan to write a separate article on how to consume the ‘Compute’ service on Microsoft Windows Azure Platform and Google App Engine. So, summarizing what I discussed above, Cloud is a massive computer that can expose abundant computing power to you on-demand. It’s up to the consumer to exploit it. Cloud is clearly the meta-platform which will execute any application by harnessing the almost unlimited computing power!

    + Recent posts