• No results found

Demystifying the Cloud: A Case Study Using Amazon’s

6.1 Why Amazon?

They’re all up in the clouds—a multiplicity of cloud vendors. Amazon, Google, HP, IBM, CA and Oracle (Sun) are in. Intel, Microsoft and Yahoo are all muscling their way in too.

So while the air itself is thinner up in the clouds, airspace in the Inter- net cloud is definitely getting more congested. As cloud computing races towards becoming mainstream (if it’s not already), more and more folks want to become the Levi’s of cloud computing.

Levi Strauss & Co. profited from the California Gold Rush when Levi Strauss moved to San Francisco in 1853 to make his fortune, not by pan- ning for gold, but by selling supplies to the throngs of miners who arrived daily in the big city to outfit themselves before heading off to the gold fields. Following his model, a host of vendors are supplying cloud comput- ing infrastructure to all the would-be enterprises and entrepreneurial pros- pectors staking claims for their piece of this new land grab. The big guys are all buying in heavily at the high-stakes poker tables. For example, in Janu- ary 2010, Microsoft and HP announced that they were teaming up in a $250 million project to develop hardware and software products that are designed to work together smoothly in their customers’ data centers and in cloud computing facilities. Microsoft’s CEO, Steve Ballmer, told a group that he is betting the farm on cloud computing. “The real thing to do today is to capture, what are the dimensions of the thing [cloud computing] that literally, I will tell you, we’re betting our company on, and I think pretty Figure 6.1 Levi Strauss.

Demystifying the Cloud: A Case Study Using Amazon’s Cloud Services (AWS) 117

much everybody in the technology industry is betting their companies on,” Ballmer said during an appearance at the University of Washington.

This is not a product-specific or offering-specific book, and not a cook- book either. Products are updated very rapidly, and even more so in cloud computing, where the software sits on vendor-managed servers and can be (and is) updated all the time without any effort on your part.

However, concepts must be grounded in reality. Amazon today, accord- ing to “State of the Cloud,” hosts over half of the top 500,000 sites hosted in the public clouds. Amazon and Rackspace together control ninety-four percent, and all the rest of the providers retain but a sliver of control.2 Based on these statistics, and to illustrate the ease of moving to the cloud, I’ve cho- sen to demonstrate using Amazon web services and some related offerings from other vendors that make Amazon’s offerings easier to use.

6.1.1 Amazon is Just an Illustrative Example

Jeff Bezos (Figure 6.2) and his company Amazon were the first to realize the potential for offering rent-a-cloud service on the massive cloud that Amazon maintains. Its Amazon Simple Storage Service3 (Amazon S3) is for simply renting storage space in the cloud. Its Amazon Elastic Compute Cloud4 (Amazon EC2) provides a complete environment, a processor, memory, numerous flavors, or preconfigured software. It offers scalability within minutes on a pay-as-you-go basis. Recently, in a series of announcements, not all of which are part of AWS, but may be used in conjunction with AWS, Amazon5 released a set of hosted e-commerce payment services as well as an update to its Mechanical Turk service. The payment service, Checkout by Amazon, will allow online retailers to use Amazon’s patented 1-Click6 checkout system, calculate shipping costs and tax, as well as enable their customers to track shipments.

Amazon S3 is simply storage for the Internet (hence its name, Simple Storage Service). It is designed to make Web-scale computing easier for developers. It provides a simple Web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the Internet. It gives any developer access to the same highly scalable, reliable, fast, inexpensive data storage infrastructure that Amazon uses to run its own

2. State of the Cloud, May 2010. See http://www.jackofallclouds.com/2010/05/state-of-the- cloud-may-2010/.

3. http://aws.amazon.com/s3/. 4. http://aws.amazon.com/ec2/. 5. http://www.amazon.com/.

118 Implementing and Developing Cloud Computing Applications

global network of Web sites. The service aims to maximize benefits of scale and to pass those benefits on to developers.

6.1.2 Let’s Do It Now

To sign up for Amazon S3, go to http://aws.amazon.com/s3/ and click “Sign Up for Amazon S3” 7 You can use your existing Ama- zon account, or create a new one (as shown in Figure 6.3).

That’s it. You’re in.

6.1.3 Amazon S3 Functionality

Amazon S3 is intentionally built with a minimal feature set. Figure 6.2 Jeff Bezos (courtesy, Amazon Inc.).

Demystifying the Cloud: A Case Study Using Amazon’s Cloud Services (AWS) 119

You can write, read, and delete objects containing from 1 byte to 5 gigabytes of data each. The number of objects you can store is unlimited.

Each object is stored in a “bucket,” which is the basic S3 container; it is retrieved via a unique, developer-assigned key.

A bucket can be stored in one of several geographical Regions. You can choose a Region to optimize for latency, minimize costs, or address regulatory requirements. Amazon S3 is currently available in the US Standard, EU (Ireland), Asia (Singapore), and US-West (Northern California) Regions. The US Standard Region automat- ically routes requests to facilities in Northern Virginia or the Pacific Northwest using network maps.

Objects stored in a Region never leave the Region unless you trans- fer them out. For example, objects stored in the EU (Ireland) Region never leave the EU.

Authentication mechanisms are provided to ensure that data is kept secure from unauthorized access. Objects can be made private or public, and rights can be granted to specific users.

Amazon S3 uses standards-based REST (Representational State Transfer) and SOAP (Simple Object Access Protocol) interfaces designed to work with any Internet-development toolkit. (see

http://ajaxonomy.com/2008/xml/web-services-part-1-soap-vs-rest

for a discussion of REST and SOAP). Figure 6.3 Amazon S3 sign in.

120 Implementing and Developing Cloud Computing Applications

Built to be flexible so that protocol or functional layers can easily be added. Default download protocol is HTTP. A BitTorrent™ protocol interface (a peer-to-peer file sharing protocol used for dis- tributing large amounts of data ) is provided to lower costs for high-scale distribution. Amazon states that additional interfaces will be added in the future.

Reliability is backed with the Amazon S3 Service Level Agreement.8 As with most cloud services, you pay for what you use (see Figure 6.4).

A bill calculator for charges is provided by Amazon at http://calcula- tor.s3.amazonaws.com/calc5.html and shown in Figure 6.5.

8. http://aws.amazon.com/s3-sla/ (accessed June 25, 2010).

Demystifying the Cloud: A Case Study Using Amazon’s Cloud Services (AWS) 121

6.2 Using Amazon S3