Dr. Dobb's Journal - February 2009 - (Page 18) d02moore_p3cp 12/11/08 1:25 PM Page 18 Strategic Vision COMPUTING IN THE CLOUDS require. After activation, you can interact with the services via an access key or X.509 certificate. You can obtain an account, access key, and certificate for no cost. Your applications interface with AWS via three primary methods: REST, Query, and SOAP. The REST interface forms a standard HTTP or HTTPS request message containing data within the request body. The Query interface also uses HTTP but relies on simple name and value pair parameters so that basic browsers can perform service operations. The SOAP interface uses XML documents as described in a WSDL. AWS supports these methods as follows: • • • • EC2 supports Query and SOAP. S3 supports REST and SOAP. SQS supports REST, Query, and SOAP. SimpleDB supports Query and SOAP. Figure 5: EC2 Running Image. In addition to these low-level interface methods, there are two other useful interfaces—the AWS toolkit and higher-level, third-party offerings. AWS persistence relies on S3. Your account lets you create persistence storage buckets. You are currently allowed 10 buckets and they must be unique throughout all of S3. You can choose to expose the bucket to an Amazon URL, if named accordingly. You can then map this URL to a URL that you control. You can also control where the bucket is physically located. To illustrate the interfaces, we demonstrate two third-party tools to examine current buckets. JetS3t (jets3t.s3.amazonaws .com/index.html) shows the lower level Figure 4: Launch EC2 Image. bucket configuration in Figure 1. You can see we’ve have declared two buckets—one that is the default and one using a URL. Go to pictures.ebmagic.com/SmokingBishopToast .jpg to see a picture linked to a private hostname but stored in S3. Thus, you can make any bucket and/or object addressable. Cockpit (www.jungledisk.com) mimics a file manager in Figure 2. This tool makes the buckets look just like a filesystem. You can also see that the object key uses mnemonics that represent the various directories. Cockpit also offers backup utilities to continuously sync up declared directories/files. Thus you can backup your files directly into the cloud for safekeeping. Storage need not use any of the other AWS resources. For example, you could simply use S3 to store all your documents and photos and make them accessible to the Web. The real heart of AWS is processor access. To get started quickly, you would launch an existing image of an operating system configuration. The Firefox ElasticFox plug-in (cloud .drawcode.com/2008/05/04/elastic-foxfirefox-extension-for-amazon-ec2) offers a nice view into what is available (Figure 3). Figure 3 finds available images that contain the string “fedora.” There are many available offerings, including those that contain MySQL and Apache. The image ami25b6534c is selected—note the visibility. You can limit access to any images that you create. Next, one is selected and launched (Figure 4). This presents several options—the instance type selects the machine size. The user has selected “small.” You can also set a minimum/maximum number of instances. This ensures that a certain number of instances are always running and your user base cannot exceed the maximum. This gives you an initial hint at how easy it is to scale an application. You can also set the security, matching key pair, and a location; and create as many different configurations as necessary. Next, hit the launch button and it’s off and running (Figure 5). Figure 6: SSH access to running EC2 Image. You now have full access to the machine. For example, you could then use an elastic IP address to attach the image to a specific IP (Figure 6), then map the IP to the domain name through whatever hosting facility you use. Note that you can change the binding between an instance and the IP address. Next, you would normally use an ssh client to connect to the instance. Port 22 is open in the default group. Figure 7 shows the ssh connection that lets you change the configuration and download additional files. And there you have it. A fully running image set to a specific hostname and ready to serve up your application from the cloud. The Amazon toolkit provides the tools to create your own image, upload it into S3, and associate an image ID. As with any object in S3, you can set permissions to allow access to the image (docs.amazonwebser vices.com/AWSEC2/2008-0201/GettingStartedGuide). To allow multiple virtual machines to cooperate with one another, your application can employ the SQS to handle messaging. SQS offers some features beyond normal messaging. Messages, although properly delivered, aren’t deleted until specified by the subscribing application. If the message remains undeleted for a specified period of time—it magically reappears. Thus, if the subscribing application read the message but then failed, the message reappears to be consumed again. The last component is SimpleDB. Instead of employing your own database within your virtual machine, your application can use the SimpleDB for basic test indexing. 18 Dr. Dobb’s Journal l www.ddj.com l February 2009 http://pictures.ebmagic.com/SmokingBishopToast.jpg http://pictures.ebmagic.com/SmokingBishopToast.jpg http://pictures.ebmagic.com/SmokingBishopToast.jpg http://www.jungledisk.com http://cloud.drawcode.com/2008/05/04/elastic-fox-firefox-extension-for-amazon-ec2 http://cloud.drawcode.com/2008/05/04/elastic-fox-firefox-extension-for-amazon-ec2 http://cloud.drawcode.com/2008/05/04/elastic-fox-firefox-extension-for-amazon-ec2 http://docs.amazonwebservices.com/AWSEC2/2008-02-01/GettingStartedGuide http://docs.amazonwebservices.com/AWSEC2/2008-02-01/GettingStartedGuide http://docs.amazonwebservices.com/AWSEC2/2008-02-01/GettingStartedGuide http://www.ddj.com
Table of Contents Feed for the Digital Edition of Dr. Dobb's Journal - February 2009 Dr. Dobb's Journal - February 2009 Contents Friday Night Fish Fry Alia Vox Developer Diaries Conversations Computing in the Clouds Software Development in the Cloud Videos and Oracle Forms 10g Parallel LINQ Decoupling C Header Files Effective Concurrency Disciplined Agility Swaine’s Flames Dr. Dobb's Journal - February 2009 Dr. Dobb's Journal - February 2009 - (Page BB1) Dr. Dobb's Journal - February 2009 - (Page BB2) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page Cover1) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page Cover2) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page 1) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page 2) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page 3) Dr. Dobb's Journal - February 2009 - Contents (Page 4) Dr. Dobb's Journal - February 2009 - Contents (Page 5) Dr. Dobb's Journal - February 2009 - Friday Night Fish Fry (Page 6) Dr. Dobb's Journal - February 2009 - Friday Night Fish Fry (Page 7) Dr. Dobb's Journal - February 2009 - Friday Night Fish Fry (Page 8) Dr. Dobb's Journal - February 2009 - Friday Night Fish Fry (Page 9) Dr. Dobb's Journal - February 2009 - Alia Vox (Page 10) Dr. Dobb's Journal - February 2009 - Alia Vox (Page 11) Dr. Dobb's Journal - February 2009 - Developer Diaries (Page 12) Dr. Dobb's Journal - February 2009 - Developer Diaries (Page 13) Dr. Dobb's Journal - February 2009 - Conversations (Page 14) Dr. Dobb's Journal - February 2009 - Conversations (Page 15) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 16) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 17) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 18) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 19) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 20) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 21) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 22) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 23) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 24) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 25) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 26) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 27) Dr. Dobb's Journal - February 2009 - Videos and Oracle Forms 10g (Page 28) Dr. Dobb's Journal - February 2009 - Videos and Oracle Forms 10g (Page 29) Dr. Dobb's Journal - February 2009 - Videos and Oracle Forms 10g (Page 30) Dr. Dobb's Journal - February 2009 - Videos and Oracle Forms 10g (Page 31) Dr. Dobb's Journal - February 2009 - Parallel LINQ (Page 32) Dr. Dobb's Journal - February 2009 - Parallel LINQ (Page 33) Dr. Dobb's Journal - February 2009 - Parallel LINQ (Page 34) Dr. Dobb's Journal - February 2009 - Parallel LINQ (Page 35) Dr. Dobb's Journal - February 2009 - Decoupling C Header Files (Page 36) Dr. Dobb's Journal - February 2009 - Decoupling C Header Files (Page 37) Dr. Dobb's Journal - February 2009 - Decoupling C Header Files (Page 38) Dr. Dobb's Journal - February 2009 - Decoupling C Header Files (Page 39) Dr. Dobb's Journal - February 2009 - Effective Concurrency (Page 40) Dr. Dobb's Journal - February 2009 - Effective Concurrency (Page 41) Dr. Dobb's Journal - February 2009 - Effective Concurrency (Page 42) Dr. Dobb's Journal - February 2009 - Effective Concurrency (Page 43) Dr. Dobb's Journal - February 2009 - Disciplined Agility (Page 44) Dr. Dobb's Journal - February 2009 - Disciplined Agility (Page 45) Dr. Dobb's Journal - February 2009 - Disciplined Agility (Page 46) Dr. Dobb's Journal - February 2009 - Disciplined Agility (Page 47) Dr. Dobb's Journal - February 2009 - Swaine’s Flames (Page 48) Dr. Dobb's Journal - February 2009 - Swaine’s Flames (Page Cover3) Dr. Dobb's Journal - February 2009 - Swaine’s Flames (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.