Connecting to the cloud, Part 1: Leverage the cloud in applications

Take advantage of the hybrid model

Explore cloud computing and the offerings from the major cloud platform vendors: Amazon, Google, Microsoft®, and In this first of a three-part series, take an example of a typical corporate application that uses a JMS queue, and examine what would be involved to hybridize part of this JMS infrastructure in the cloud.


Mark O'Neill, CTO, Vordel

Mark O'Neill is CTO at Vordel, an XML Networking company. He is also author of the book "Web Services Security" and contributing author to "Hardening Network Security", both published by McGraw-Hill/Osborne Media. Mark is responsible for overseeing Vordel's product development roadmap and also advises Global 2000 firms and governments worldwide on their tactical and strategic adoption of XML, Web Services and SOA technologies. He holds degrees in mathematics and psychology from Trinity College Dublin and graduate qualifications in neural network programming from Oxford University. Mark lives in Boston, Massachusetts.

27 April 2009 (First published 31 March 2009)

Also available in Chinese Japanese Vietnamese Spanish


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.

Frequently used acronyms

  • Ajax: Asynchronous JavaScript + XML
  • API: application programming interface
  • HTML: Hypertext Markup Language
  • HTTP: Hypertext Transfer Protocol
  • JMS: Java™ Message Service
  • REST: Representational State Transfer
  • XML: Extensible Markup Language

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.

Clouds forming

IBM and Amazon Web Services

IBM and AWS are teaming up to provide access to IBM middleware in a virtual computing environment. The Amazon EC2 experience lets you evaluate and use software without having to install it on your own system. You can adjust capacity almost instantly, building enterprise-ready applications in a reliable, high-performance environment where you pay only for the time and capacity you use. Our middleware offerings on EC2 include:

  • DB2 Express-C 9.5
  • Informix Dynamic Server Developer Edition 11.5
  • WebSphere® Portal Server and Lotus Web Content Management Standard Edition
  • WebSphere sMash

This is product-level code, with all features and options enabled. Get more information and download the Amazon Machine Images for these products on the developerWorks Amazon EC2 cloud computing page.

For more cloud computing resources, see the Cloud computing space on developerWorks.

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.

Microsoft Azure

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. provides a model whereby developers use its Apex development language to access 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 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 Web interfaces. This is useful for companies that like, but want to add capabilities to it. Rather than ask to build this functionality, customers can build it themselves by creating VisualForce pages and wiring them into the 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 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 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.



Get products and technologies



developerWorks: Sign in

Required fields are indicated with an asterisk (*).

Need an IBM ID?
Forgot your IBM ID?

Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.


All information submitted is secure.

Dig deeper into XML on developerWorks

Zone=XML, SOA and web services
ArticleTitle=Connecting to the cloud, Part 1: Leverage the cloud in applications