For years, the convention has been for network diagrams to use a cloud (a cumulus cloud, specifically) to represent the Internet. The cloud image indicated something amorphous, intangible, but still necessary to include in the diagram. Lines on the network did nothing but travel through the cloud, indicating data passing over the Internet. On security-focused diagrams, the line through the Cloud might include a padlock beside it, to indicate that the connection is secured.
The cloud has now been promoted to a first-class actor in the network diagram itself. Applications can make use of the cloud in order to call out for added value, such as storage, queuing, and hosted applications. The applications themselves can also be hosted on the cloud. Rather than simply passing through the cloud, lines now connect to the cloud and use it as part of an application. This makes the cloud more tangible.
In this three-part series, you examine how cloud computing manifests itself. The number of cloud computing providers is relatively small, each coming at the area from a different direction and providing different services. Programming language options vary from Python, to C#, to Java or other proprietary languages. Interfaces into the cloud vary also, though a lightweight REST interface is preferred, even if it is not currently offered by every cloud computing provider.
The hybrid model
Here in Part 1 of the series, you look a hybrid example, that is, a private application that is augmented with cloud computing services and infrastructure. While examining the hybrid application, discover what cloud computing offers you. To do this, you examine its antecedents, and what the major players in cloud computing currently offer. Part 2 of this series will cover the development of the hybrid application designed in Part 1. Part 3 will focus on the security and governance issues of the solution.
What is cloud computing anyway?
Cloud computing is defined by IBM as an emerging computing paradigm where data and services reside in massively scalable data centers and can be ubiquitously accessed from any connected devices over the Internet. It provides massively scalable power to applications, as well as (in the case of Amazon Elastic Computing Cloud—commonly called Amazon EC2) providing hosting of the applications themselves.
Cloud computing is not for everyone, but it is particularly attractive for an organization whose computing needs are uneven over time. If an organization's business requires processing and storage capacity on an uneven basis, for example every Saturday night at midnight for batch processing, then it makes sense to use a cloud provider for this, rather than having a data center lying idle most of the time.
Cloud computing is also particularly attractive to startup businesses. Many founders of startups will be familiar with the Venture Capitalist question "how will your technology scale?" Cloud computing provides a compelling answer to this question. However, as you will see in later parts of this series, cloud computing also raises questions of ownership, security, and cost.
Before cloud computing was widely known, there existed grid computing and utility computing. A key difference between grid computing and cloud computing is that while grid computing environments tend to be composed of varied machines, cloud computing environments tend to be more controlled, with the back-end machines generally all the same. Utility computing refers to the business model of paying for data traffic or application usage. However, the concept of the service growing "elastically" is not as prevalent, whereas the ability to add (or remove) capacity as usage changes is an important part of cloud computing.
In the early to mid 2000's, both Google and Amazon independently developed their own cloud computing architectures on which to run their businesses. Having developed this infrastructure, they realized that their own infrastructure became a service itself, which could be sold on a per-usage basis to developers. Amazon, in particular, identified key value in its platform, to the extent that it is entirely conceivable that Amazon might one day be as much known for its computing platform as for its online retail website. Amazon realized that it can sell its Platform as a Service (often abbreviated to PaaS— in a similar manner to Software as a Service or SaaS). Thus, Amazon is often seen as a front-runner in the commercializing of cloud computing, in particular with coming up with billing and usage models.
Expertise on the design of a cloud-based computing environment has tended to be clustered within a small number of highly-successful vendors, which include Amazon and Google. Recognizing this, in 2007 Google, IBM, and a number of universities formed a research cloud to provide a cloud computing environment for student researchers to develop new cloud computing techniques and applications. Although not comparable in size to Amazon and Google's infrastructure, this research cloud provides an environment in which students can research cloud services. Research from this research cloud will allow for the further development of cloud computing, including the development of private clouds by organizations who have the means to create them.
Driving the hybrid model
Rather than throw out local applications and use the cloud exclusively, or, conversely, rely on local applications only and ignore the cloud, the prevailing wisdom is to use a combination of local applications and the cloud. This is called the hybrid model. This allows a company to keep control of its key applications while leveraging cloud computing in places where it makes sense. For example, many companies have found it economical to use Amazon's Simple Storage Service (S3) to store things like images, videos, and documents. The hybrid model also lends itself to an incremental approach.
Even if you think it makes sense to move most or all of your applications to the cloud, it might seem too risky to move everything all it once. With a hybrid model, you pick the low hanging fruit (like file storage) to move to the cloud first. Then after you become more comfortable with that deployment model, you can move more significant parts of your application to the cloud. This is also the approach that I will take in this series. Take a look at the application that you will hybridize by moving part of its infrastructure.
Designing a hybrid application
The sample hybrid application will be an asynchronous e-mail notification system. This might be a subsystem in a workflow system. When a new activity is submitted and requires approvals, e-mails are sent to the appropriate principals who can then approve or reject the activities. This kind of system can also be used for a fulfillment system. When an order is shipped, an e-mail is sent to let somebody know that the order is on its way. You can imagine many types of applications that might use such a system. E-mail is asynchronous in nature anyway, so an asynchronous mechanism that generates e-mails is an efficient way to satisfy this kind of use case.
It is not hard to imagine an existing application somewhere that already has such a system in place. You can implement such a system in many ways, but one fairly elegant mechanism is to use a JMS. The JMS specification is an important part of the J2EE™ technology stack. There are many proprietary and open source implementations of the standard. One can easily imagine a system that sends the notifications to a JMS queue, and another system that reads from the queue periodically and generates e-mail notifications for each message in the JMS queue.
For a hybrid model, you can start by moving the JMS queue to the cloud. In other words, you will replace it with a service that runs in the cloud. What kind of service will this be? How will your applications have to change to interface with this service? That depends on what cloud platform you use. Next, look at the various platforms and how they can be used to implement, or in this case, re-implement the functionality of a JMS queue.
Amazon Web Services
As a pioneer of the monetization of cloud computing, Amazon provides a number of mature offerings which are of interest to developers. Perhaps the most well-known cloud service from Amazon is the EC2 (Elastic Computing Cloud) service. This allows for the creation of virtual machine instances (called AMI's— Amazon Machine Images) that run on Amazon's own infrastructure. It can be argued that this is more closely related to the services of a hosting provider, except that the machines that are used are not real machines, and payment is based on traffic usage, rather than on rental of the machines themselves.
Amazon's S3 service is an online storage service which is particularly attractive to startup companies who need to scale their storage capability. It can be used as an adjunct to other Amazon Cloud services, such as the EC2. This means that an AMI, perhaps a Linux™ machine running PHP, can use Amazon S3 as its data store. As the data traffic grows, the S3 service expands elastically. Amazon's SimpleDB is a fast and simple cloud-based database which provides indexing, storage, and access. It is significantly simpler than a fully-fledged relational database since it requires no schema, it indexes data automatically, and it provides APIs for storage and access.
Amazon's SQS (Simple Queue Service) provides a queue service, similar to JMS but with a RESTful interface. You also can use SQS in conjunction with Amazon's other cloud services, or as part of any other application which can connect to it using a simple HTTP GET or POST. For the hybrid application, it is a suitable replacement for a JMS queue. It can be accessed through its RESTful, XML interface, allowing for easy integration with an existing application. SQS is probably the most obvious choice for this particular hybrid application.
Many software providers have partnered with Amazon to help their customers leverage EC2. For example, IBM and Amazon have partnered to offer many of IBM's most popular enterprise software, such as DB2®, Informix®, and WebSphere® on EC2.
Google is rightly famous for its fast and accurate searches, which, to many users, are the embodiment of Arthur C Clarke's pronouncement that "any sufficiently advanced technology is indistinguishable from magic." Because of the technology that makes the magic possible, Google is an ideal candidate to provide a cloud computing platform. It is understandable that a developer might be excited by the prospect of running an application on Google's platform.
Google provides a cloud computing platform called App Engine, which is based on Google's long-established underlying platform. This includes GFS (Google's File System) and Bigtable, a database system built on GFS. Programming in the Google App Engine is done using Python. Programmers write their applications using Python and then they run on the App Engine framework. Languages other than Python will be supported in the future. A local emulator of the App Engine environment can be downloaded, for development purposes. App Engine is free and includes up to 500 MB of storage and enough CPU bandwidth to provide five million page views per day.
The Google App Engine provides some useful infrastructure, including both its GFS derived data store and a memcache implementation. However, it does not provide an out-of-the-box queue mechanism. You do have a full Python programming environment, so you can simply create your own JMS replacement on top of the App Engine. The data store is well-suited for your hybrid application, and it takes very little Python to whip up a RESTful interface to your queue.
As you might expect, Windows® and .NET feature prominently in Windows Azure. Microsoft has provided an environment in which applications written using Visual Studio® can be hosted and run on the Windows Azure environment. The Azure platform provides numerous services such as services for infrastructure like file storage and data access, as well as more specialized services like search and contact management. It also includes the .NET Service Bus. This is Microsoft's implementation of the classic Enterprise Service Bus (ESB) design pattern. One of the simplest use cases for an ESB is a message queue, so it could definitely serve as a replacement to your JSM queue. The .NET Service Bus is also developer friendly. It supports both a lightweight, RESTful interface that uses XML, and a stronger SOAP-based interface that includes a full implementation of the WS-* standards. Both of these interfaces allow for easy interoperability between your existing application and the .NET Service Bus.
SalesForce.com provides a model whereby developers use its Apex development language to access SalesForce.com services. SalesForce calls Apex "the world's first on-demand programming language". The on-demand aspect relates to the fact that Apex code is hosted on SalesForce's Force.com Cloud Service, and runs in that context. Syntactically, Apex is similar to the Java or C# languages.
The Apex code is used in the generation of Web pages that are served at the VisualForce layer, which is the actual user interface. This makes use of the Model-View-Controller (MVC) model. This is similar to the model whereby compiled C# can be used behind an ASPX page in .NET. These VisualForce pages can include HTML, Ajax (XMLHttpRequest object), and Adobe Flex.
VisualForce allows developers to create variations on SalesForce.com Web interfaces. This is useful for companies that like SalesForce.com, but want to add capabilities to it. Rather than ask SalesForce.com to build this functionality, Salesforce.com customers can build it themselves by creating VisualForce pages and wiring them into the SalesForce.com back-end using Apex code.
Salesforce also provides Controllers, which are used to connect the page presentation with the underlying data from the SalesForce database, including such standard routines as Edit and Save. The Force.com cloud has been a huge success. It offers developers a way to not only build application on the cloud, but to build applications that they can charge users money for through a direct distribution model. However, it is a very specialized cloud. It does not lend itself well to the incremental approach. You typically build for the Force.com cloud.
The hybrid model
In this article, you saw the breadth of capabilities provided by the various cloud services providers and how you can use them to replace a JMS queue and turn an existing application into a hybrid, cloud application. In the following two articles, you will see how the hybrid model, binding a local application with cloud services, is achieved. You will also examine the significant security and governance issues that affect cloud computing.
- Connecting to the cloud, Part 2: Realize the hybrid cloud model: Pull JMS queue data to an Amazon SQS queue (Mark O'Neill, developerWorks, April 2009): Link a corporate Java app to Cloud Computing platforms and examine how the app can leverage the Cloud through XML, SOAP, and REST APIs.
- The Cloud computing space on developerWorks: Discover why cloud computing is important, how to get started, and where to learn more about it.
- IBM's cloud computing initiative: Gain access to your applications from anywhere, at any time.
- Amazon Web Services: Read about Amazon Web Services and cloud computing. Learn how IBM and Amazon Web Services help you build and run a range of IBM platform technologies.
- Cloud Computing with Amazon Web Services (Prabhakar Chaganti, developerWorks, July 2008): Read a step-by-step guide to using Amazon Web Services.
- Microsoft Windows Azure: Visit the Web site for the cloud services operating system that serves as the development, service hosting and service management environment for the Azure Services Platform.
- The Google App Engine Blog: Tap into a great place to follow its development.
- developerWorks Cloud Computing Resource Center: Develop applications in a virtual environment with IBM products now available for the Amazon EC2 platform. Let cloud computing address computing capacity, bandwidth, storage, security and reliability.
- Connecting Apple's iPhone to Google's cloud computing offerings (Noah Gift and Jonathan Saggau, developerWorks, January 2009): Learn to make the cloud accessible on mobile devices.
- Data integration with Salesforce CRM using IBM InfoSphere Information Server (Jon Deng and Jeff J. Li, developerWorks, July 2008): Find out about how Salesforce makes it data accessible to your applications.
- Navigate the cloud computing labyrinth (Brett McLaughlin, developerWorks, March 2009): Make an educated decision about the best cloud computing platform for your particular application requirements.
- Realities of open source cloud computing, Part 1: Not all clouds are equal: Picking from a profusion of platforms (Michael Galpin, developerWorks, April 2009): Learn about a broad range of cloud computing platforms, and about how they are alike and different as you plan your cloud computing strategy.
- IBM XML certification: Find out how you can become an IBM-Certified Developer in XML and related technologies.
- XML technical library: See the developerWorks XML Zone for a wide range of technical articles and tips, tutorials, standards, and IBM Redbooks.
- Web development zone: Visit the developerWorks Web development zone for a wide range of technical articles and tips, tutorials, and standards.
- developerWorks technical events and webcasts: Stay current with technology in these sessions.
- developerWorks podcasts: Listen to interesting interviews and discussions for software developers.
Get products and technologies
- Aptana Studio: Download and try Aptana Studio for a complete Web development environment..
- Download IBM product evaluation versions or explore the online trials in the IBM SOA Sandbox and get your hands on application development tools and middleware products from DB2, Lotus®, Rational®, Tivoli®, and WebSphere.
- XML zone discussion forums: Participate in any of several XML-related discussions.
- developerWorks blogs: Check out these blogs and get involved in the developerWorks community.