Grails on the Amazon Cloud: a 3-day class
"Hardware," according to Jeff Pesis, is "the parts of a computer that can be kicked."
Next generation web frameworks like Grails have radically changed our expectations about software development. Amazon's cloud computing offerings are poised to do the same for our assumptions about hardware and deployment. Traditionally, hardware is a fixed cost. Amazon changes the equation to be entirely variable -- you now pay for only the actual bytes downloaded and CPU cycles used. The New York Times recently used Amazon EC2 and S3 to convert over 70 years of digitized back issues to a web-ready format in less than 36 hours. They scaled to hundreds of machines as needed, and just as quickly scaled back after the job was done.
In this class, we explore the confluence of Grails and the Amazon cloud. You'll see the Elastic Cloud Compute (EC2) and an Amazon Machine Image (AMI) in action. You'll also understand the roles of the Simple Storage Service (S3), SimpleDB, Simple Queue Service (SQS), and the Elastic Block Store (EBS) in a Grails application.
Objective
To give you a rigorous, hands-on introduction to deploying a Grails application to the Amazon Web Services "cloud".
Goals
You will build an e-commerce web storefront with Grails that leverages the various Amazon Web Services cloud offerings. You'll use the Associates Web Service to create an inventory of items to sell. You'll create a new server using Elastic Cloud Compute (EC2). You'll set up persistent storage using the Simple Storage Service (S3), SimpleDB, and the Elastic Block Store (EBS).
Course Outline
Grails 101
If you've never worked with Grails before, this section is a whirlwind tour of the various moving parts. You'll identify key components of an existing Grails application -- domain classes, controllers, Groovy Server Pages (GSPs), and services. Since this isn't a Grails development course, the existing application will be enough to get things started without getting bogged down in the details.
Amazon Associates Web Services
These RESTful web services allow you to populate your store with items from Amazon.com. They also allow you to create and manage shopping carts for your customers. You'll see how to adjust your existing Grails application to take advantage of these online services.
Elastic Compute Cloud (EC2)
EC2 is your virtual server in the cloud. Server instances come in a variety of sizes, costs, and operating systems. In this section, you'll learn how to create an Amazon Machine Image (AMI) that contains your basic applications like Tomcat and MySQL. You'll then see how to upload your AMI to an Amazon S3 repository. Finally, you'll learn how to start, stop, and monitor your EC2 instances.
Simple Storage Service (S3)
S3 is the "big bucket in the sky" for your data. It offers a RESTful interface for basic CRUD operations. In this section, you'll see how to set up and populate an S3 repository.
SimpleDB
SimpleDB offers database-like querying and indexing capabilities for S3 repositories. Your structured data is broken down into domains, items, and attribute-value pairs. In this section, you'll see how these pieces relate to each other and perform basic CRUD operations on your S3 repository using the SimpleDB RESTful interface.
Elastic Block Store (EBS)
EBS is your persistent filestore. An EBS lives beyond the lifecycle of your EC2 instances. This means that your data "survives" between "reboots" of your EC2. It is a filesystem that you can mount and attach to EC2 instances. In this section, you'll add EBS support to your growing Grails application.
Simple Queue Service (SQS)
SQS is ideal for asynchronous activities. In this section, we'll explore SQS for generating emails to customers and managing other long-running processes.
CloudFront
CloudFront offers distributed caching for large media items like images and movies. With CloudFront, you can distribute content from your S3 repository to the edge of the network, guaranteeing your customers low latency, high bandwidth delivery.