Amazon SimpleDB Developer Guide Scale your application's database on the cloud using Amazon SimpleDB Prabhakar Chaganti Rich Helms professional expertise distilled BIRMINGHAM - MUMBAI Amazon SimpleDB Developer Guide Copyright © 2010 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: June 2010 Production Reference: 2240510 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847197-34-4 www.packtpub.com Cover Image by Tina Negus ([email protected]) Credits Authors Editorial Team Leader Prabhakar Chaganti Gagandeep Singh Rich Helms Project Team Leader Lata Basantani Reviewers Deepak Anupalli Project Coordinator Anders Samuelsson Joel Goveya Ashley Tate Proofreader Acquisition Editor Lynda Silwoski James Lumsden Graphics Development Editors Nilesh Mohite Dhwani Devater Production Coordinator Reshma Sundaresan Adline Swetha Jesuthas Technical Editor Cover Work Ishita Dhabalia Adline Swetha Jesuthas Indexer Monica Ajmera Mehta Foreword Most software developers who work on the Internet love change. Change presents a new challenge, a new paradigm, and new technologies to learn. To realize this, all you have to do is look at the evolution of computers. During the 70s, we worked in a world of mainframes and raised floors. Only special people got to touch the computer, while others had to be content watching from outside of the fishbowl. The 80s brought the mini-computer with dedicated CRT terminals. You could show data on the screen in any color as long as it was green, but the computer was down the hall in the back room. The 80s also introduced the personal computer. As PC power grew, the mini was replaced with the LAN-connected PC. The 90s saw the advent of the Internet, and people dialed in, and in the early 2000s, the Internet went viral. As high-speed connections became common, the Internet replaced corporate networks. Computers went from rooms to luggables to "in my briefcase" to "in my pocket." In 2010, we are seeing the growth of cloud computing. Selecting a brand and model of server computer is being replaced with renting a virtual server at a hosting service like Amazon. The purchaser of these virtual servers doesn't have to select a hardware "brand." I no more care about the brand of computer than I would care about what brand of pipe the water utility used to connect to my house. All I am buying is cycles and reliability. This move to virtual servers also changes the capital required to propose the next viral application. I don't need to buy a large database cluster, hoping for the acceptance to fill it. I am billed for usage, not capacity. SimpleDB is one of those virtual offerings and the topic of this book. Rich Helms About the Authors Prabhakar Chaganti is the founder and CTO of Ylastic, a startup that is building a single unified interface to architect, manage, and monitor a user's entire AWS Cloud computing environment: EC2, S3, RDS, AutoScaling, ELB, Cloudwatch, SQS, and SimpleDB. He is the author of Xen Virtualization and GWT Java AJAX Programming, both by Packt Publishing, and is also the winner of the community choice award for the most innovative virtual appliance in the VMware Global Virtual Appliance Challenge. He hangs out on Twitter as @pchaganti. "It's never been done" is a call to action for Rich Helms. He has built a career on breaking new ground in the computer field. He developed CARES (Computer Assisted Recovery Enhancement System) for the Metropolitan Toronto Police in Canada. CARES was the first computer system in the world for aging missing children. CARES has been internationally recognized as pioneering work in child aging. Rich has also created several generations of e-learning platforms including Learn it script and most recently Educate Press. Rich can be reached at http://webmasterinresidence.ca. Rich is a seasoned software developer with over 30 years of experience. He spent 22 years in various positions at IBM including Chief Image Technology Architect. His credentials range from deep technical work (five patents in hardware and software) to running multinational R&D. About the Reviewers Deepak Anupalli is Architect for the Server Engineering group at Pramati Technologies. He has deep insight into various Java/J2EE technologies. He represents Pramati on the EJB and JPA expert groups and has led the Java EE 5 certification effort of Pramati Server. He is currently leading the effort to build a standards-based web-scale Application server. He is a visiting faculty member with IIIT-Hyderabad for a course on middleware and also speaks at various technology conferences. He holds a graduate degree in Computer Science and Engineering from National Institute of Technology (NIT Warangal, India). Anders Samuelsson has over 25 years of experience in the computing industry. The main focus during this time has been with computer security. He currently works for Amazon.com with Amazon Web Services. I'd like to thank my wife Malena and my son Daniel and daughter Ida, for always standing by me and allowing me to spend time helping out with this book. I love you forever. Ashley Tate is the founder of Coditate Software and the creator of Simple Savant, an advanced C# interface to SimpleDB. He is currently working on GridRoom, an application for collaborative sports-video review built on several Amazon Web Services, including SimpleDB. He lives near Atlanta with his wife and four children. You can find him online at http://blog.coditate.com. I would like to dedicate this book to my brother Madhukar, who gave us all a big scare, and with typical panache came out of it stronger than ever, my sister-in-law Meghna for putting the rock of Gibraltar to shame and showing us all how to handle and deal with adversity, and my nephew Yuv, the two year old fire cracker. My two daughters Anika and Anya were understanding and patient beyond their years as I stuck to my Mac at all kinds of weird hours. Above all, this book would not have made it into the station without the constant support, love and encouragement from my lovely wife Nitika! Prabhakar Chaganti A special thanks to Dorothea, Mike, Mary, our little girl Margaret, and the gang at WCDR. Rich Helms
Description: