Building Applications in the Cloud
Concepts, Patterns, and Projects
Christopher M. Moyer
Upper Saddle River, NJ Boston Indianapolis San Francisco
New York Toronto Montreal London Munich Paris Madrid
Cape Town Sydney Tokyo Singapore Mexico City
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.
The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact:
U.S. Corporate and Government Sales
(800) 382-3419
For sales outside the United States please contact:
International Sales
Visit us on the Web: informit.com/aw
Library of Congress Cataloging-in-Publication Data:
Howard, Ken, 1962
Individuals and interactions : an agile guide / Ken Howard,
Barry Rogers.
p. cm.
Includes bibliographical references and index.
ISBN 978-0-321-71409-1 (pbk. : alk. paper) 1. Teams in the
workplace. 2. Communication. I. Rogers, Barry, 1963- II. Title.
HD66.H695 2011
658.4'022 -- dc22
2011001898
Copyright 2011 Pearson Education, Inc.
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, write to:
Pearson Education, Inc
Rights and Contracts Department
501 Boylston Street, Suite 900
Boston, MA 02116
Fax (617) 671 3447
ISBN-13: 978-0-321-72020-7
ISBN-10: 0-321-72020-2
Text printed in the United States on recycled paper at R.R. Donnelley & Sons, Crawfordsville, Indiana.
First printing April 2011
Editor-in-Chief
Mark Taub
Acquisitions Editor
Trina MacDonald
Development Editor
Michael Thurston
Managing Editor
Kristy Hart
Senior Project Editor
Lori Lyons
Copy Editor
Apostrophe Editing Services
Indexer
Ken Johnson
Proofreader
Sheri Cain
Technical Reviewers
Kevin Davis
Mocky Habeeb
Colin Percival
Publishing Coordinator
Olivia Basegio
Cover Designer
Chuti Prasertsith
Cover Illustrator
Lynn A. Moyer
www.designbylynn.com
Compositor
Nonie Ratcliff
Dedication
To my wonderful wife Lynn, without whom this book would never have been finished.
Preface
After a few months working as a developer in a small start-up company migrating existing services to the cloud, I started realizing that there was way too much work to be done just by myself. I started looking around for other developers like myself that could assist me, or replace me if I were to find a better and more exciting opportunity elsewhere. I quickly realized that there are so few people that actually fully comprehend the level of complexity it requires to develop a cloud-based application, and almost all these people were happy with their current companies.
I began to create a series of blog posts about working with cloud-based platforms, still available at http://blog.coredumped.org, but soon realized that I could quite literally spend an entire year writing up everything there is to know. This documentation would be better placed in a reference book than simply scattered throughout several blog posts, so I decided to write this book.
The Purpose of This Book
This book isnt designed as a tutorial to be read through from cover to cover. Its not just a guide for how to build an application for the cloud, but also a reference point for when you have specific questions. When your boss hands you a new project and tells you to make it scale, check the patterns discussed in this book to see what fits. When you work on a project and you find a specific problem that you dont know how to handle, pick up this book. If youre trying to start on a new project, and you have a perfect idea, but you dont know how to scale it, pick up this book. If youre trying to modify an existing project to scale in the cloud, pick up this book. If you dont know what kinds of applications you can build with cloud computing, pick up this book.
This book doesnt invent many new patterns but simply shows you the tricks and new techniques that you need to consider while running them in the cloud. Although you can use any patterns discussed in this book in any sort of clustering environment, theyre designed to take full advantage of the services provided by cloud computing.
How This Book Should Be Used
This book is divided into three parts. Everyone should read , Projects, so that you can see exactly what kinds of applications are best suited for this type of system.
Part I, Concepts
is designed to give you a general concept of how to develop in the cloud. Its designed to be read from start to finish and is broken into different key chapters important to development:
, Fundamentals of Cloud ServicesProvides a basic set of fundamental ideals when working with cloud-based solutions. This is an absolute must read for anyone interested in cloud technologies.
, Making Software a ServiceProvides a basic set of instructions for providing Software as a Service (SaaS). It includes details on why this is a good idea and some basics as to how to properly construct your SaaS.
, Cloud Service ProvidersProvides some specific examples of services offered by different cloud providers.
Part II, Patterns
functions more like a reference manual and provides you with a problem and the pattern that solves that problem:
, Designing an ImageIncludes basic patterns for use in building your basic image that is the basis for the rest of your application.
, Designing an ArchitectureIncludes the patterns used for interacting with external systems, not systems offered by your cloud provider.
, Executing Actions on DataIncludes the patterns used to execute code segments against your data.
, ClusteringIncludes the patterns used within a basic framework designed to take advantage of multiserver deployments.
Part III, Projects
includes examples of real-world applications of the patterns provided throughout this book. These chapters use the same overall hello world tutorial, but in two different ways:
, A Simple WeblogDetails how to build a simple weblog from scratch, not using any existing frameworks.
, A Weblog Using MarajoDetails how to build a weblog using the Marajo cloud-based Web framework.