No one is talking about the Web 2.0, AJAX, SaaS, or SOA these days. It doesn't mean that no one is using these technologies, it is just that these are not the buzzwords anymore. The latest buzzword is "Cloud Computing". Every one is talking about building apps in cloud or moving the apps to cloud. There are plenty of jobs on job boards looking for the people with the skills: "familiarity with cloud" or "expertise in cloud".
What is the cloud?
Every one defines the cloud in their own way, here is my take on it. Companies whose main business is not Computer related, they outsource their IT work to some computer consulting firm. It is because IT is not their main business and some times it makes sense to hand it over. Similarly, for application development companies - the focus is application development, not hosting the applications. In addition to the application developers, they need to have IT people, hardware to host the apps. For some companies it makes sense to outsource the IT and hardware. In other words, you are outsourcing your application to a different company. Application outsourcing used to be to hosting companies, but that's changing to the cloud due to its infrastructure. The cloud makes it very easy to scale an app for rapid growth compared to the hosting companies. Cloud will take away all the hardware management and IT risks from you.
Why all of sudden?
Cloud is not new. Standard apps such as your personal email(Gmail, Yahoo Mail, and Live Mail etc) has always been there on the servers in the cloud. Lots of companies are moving away from in-house Exchange/Lotus Notes servers and outsourcing their mail to mail hosting companies. Slowly, the paradigm shifted from desktops apps to intranet hosted apps to SaaS (Software as a Service). Third party apps such as time tracking, project management, office, CRM, e-commerce became subscription based services. In other words, you don't have to install and manage these apps in-house, instead the service provider will manage these for you for a subscription fee. Now the paradigm shift is, moving the custom apps into third party infrastructure for a subscription fee. The "Cloud" buzz started when Amazon introduced EC2 and picked up there after by Google's App Engine and Microsoft's Azure. Since these companies use the high end sophisticated infrastructure with the help of virtualization software to run their apps and with the promise of running your app in the same infrastructure, boosted lots of companies to move their apps to the cloud.
Infrastructure as a Service (IaaS) vs Platform as a Service (PaaS)
IaaS clouds provides resources such as servers, connections, storage, and tools necessary to build an application environment from scratch. PaaS clouds are often within IaaS Clouds and provides required software, tools to support the complete life cycle of building and deploying the applications. Amazon EC2 is the truly an IaaS provider, as it provides the infrastructure, not the platform. Google App Engine, Microsoft Azure, Force.com, and Heroku are PaaS providers, as they provide the platform backed by the infrastructure.
With Amazon EC2, you can install any thing you want in your virtual machines. EC2 gives you lots of control, but you still need to install OS, Web server, Web or Application container, Database and the whole nine yards that you do today for application deployment. It provides a virtual machine, and you are responsible for managing every thing inside the VM. This is very flexible along with the risk of managing everything. Best suited for Java in the cloud.
I believe Sun is going to be in the race because their Grid Compute Utility site Network.com is in transition with the message "Network.com is in transition as we add some exciting new options. We're not ready to show off what we're working on just yet, but we'd like to hear from you, and we'd like to keep in touch". It makes sense because they know hardware, they own Solaris OS, they have Java and they acquired MySQL recently.
With Google App Engine, you don't have any virtual machine and you are not responsible for installing/managing OS, software, database. Right now you are restricted to use Python to code the app and you need to use DataStore (persistent service) to get/put the data. You are responsible for developing and deploying the application. You also get the access to Google accounts, Gmail etc. No OS, server, database headaches with the disadvantage of being restricted to the Python and DataStore. It's not for Java apps right now, but they may support more languages in the future. Google seems to be more interested in Python than Java. Sun also embraced Python by hiring two of the main Python developers to work on Jython, which allows you to run Python on the JVM. Though these two are interrelated, hope Google will bring Java to app engine - if not at least Jython.
Microsoft Azure is purely for Microsoft related technologies. Azure is the development, hosting, and management environment with tools for Microsoft Visual Studio to enable the creation, building, debugging, running, and packaging of scalable services. It is not for Java, period.
Focre.com is for Salesforce.com CRM applications and restricted to proprietary Apex language and Visualforce(presentation layer). Note: Salesforce.com is a Softwae as a Service(SaaS) and Force.com is a PaaS for Salesforce.com CRM app. Business ByDesign from SAP is just SaaS.
Heroku is restricted to Ruby on Rails backed by Amazon EC2.
I could be missing some other providers, but given all these - only Amazon EC2 supports Java in the cloud. However, it is an IaaS, not a PaaS. But we need a PaaS provider in order to focus on just Java development without worrying about managing the OS, Web server, Web or Application containers. A new startup named Stax can solve some of these issues to some extent.
PaaS provider for Java
Stax is a new startup which launched in beta this week to let the developers to focus on the Java application development. It is a PaaS for Java backed by Amazon EC2 infrastructure. Think of it like Google app engine for Java with the MySQL database. Being said, it is restricted to Java (I love this :-)) and makes Java development, deployment, scaling much faster and you can deploy the application in Amazon infrastructure, not in Stax infrastructure. Stax provides easy deployment of test and production environments, a local development model, and strong integration with existing development tools, frameworks, and processes. It provides built-in application templates for popular Java technologies including Struts, GWT, Wicket, JRuby on Rails, Jython - but not restricted to these. You can deploy any web app that runs in web container via Stax SDK. The local Stax run time is meant to be an easy-to-setup environment for running your applications and provides some tools for packaging and deploying them. The application templates are just a way to put together some common and/or interesting configurations to get developers going fast. Developers are free to add whatever binaries and configuration files into their applications before deploying them, including libraries not installed in the default application template. Stax will remain free during the beta. The company has not finalized plans for charging yet, but plan to offer some paid version of the service when it moves out of beta sometime next year. I believe the pricing will be designed to cover their AWS costs plus their costs.
Cloud features, limitations - what Stax can do?
Moving existing apps to Cloud
Running existing apps is dependent on how "cloud friendly" the application is. Stax isn't really competing to be a replacement for general application hosting, Stax is strongly focused on the idea of elastic applications where computing resources can be quickly changed to meet the needs of an application. This means that any given application instance may come or go at any time. This introduces a few stateless design constraints on applications, the 2 biggest being:
- applications can't rely on the local file system for persistence
- applications need to avoid relying on local server memory state (except for caching in
which case apps just need to be designed to restore the cache from a persistent location like DB if the cache experiences a miss)
This means many existing applications will be incompatible with the Stax environment, but Founder and CEO Spike Washburn feels "this elastic approach to programming is going to be required for apps as the use of elastic infrastructure increases in public clouds and private virtualized data centers".
Monitoring, reporting, debugging and support for Java apps in the cloud
Since it is the application developed by you, you don't need support for debugging. Cloud needs to provide the features designed to help developers gather information about their running servers, by offering features such as reporting/analytics and monitoring/alert APIs to make it much easier for developers to debug and understand the health of their applications and respond accordingly. Of course at some level, developers will always have to understand the internals of their own applications, and logs can be an invaluable part of debugging those kinds of issues. In a conversation with Mr. Washburn, he said that they are going to release monitoring/alert APIs soon and planning to provide other features and support.
Deploying on other Application servers
Stax is designed to provide a version of the Java web container (Tomcat) that is integrated with an elastic computing cloud. Stax goal is to help developers achieve a new level of application deployment flexibility which not only includes scaling apps up and down by deploying on elastic PaaS, but also giving developers the flexibility to take their applications and deploy them into their own application containers. In addition to supporting an end-to-end application life cycle, it provides the flexibility to use the system for only subsets of the life cycle too. For instance, at this point in the cloud adoption curve, some businesses are still reluctant to run their production apps in the cloud, but will consider it for dev/test purposes, so it is important for the apps to be able to run in 2 different environments (Stax for testing and optionally their own app server environment for production).
J2EE app with Application Container
At this time, Stax do not plan to offer support for choosing between application server implementations. Only Tomcat web container.
Spring, JBoss Seam, JSF and others
You can add any library as long as it runs inside the web container. Stax's initial set of application templates was more of an exercise in building a system to expose a hand full of pre-built application configurations that get developers rolling in a single click. Based on the beta feed back they are going to integrate with the new Java Module System and/or OSGi to make it easier for developers to create recipes for new application stacks.
If your application needs something other than Tomcat or your application needs access to local file system, then Stax is not for you. In these cases your only option is Amazon EC2 or wait for some other companies(Oracle, IBM?) to roll out the 'Java in the cloud' with your favorite app servers and/or access to local file system.
Do you know of any other Java cloud providers? If yes, please drop a line in the comments.