Moving to the Cloud This Page Intentionally Left Blank Moving to the Cloud Developing Apps in the New World of Cloud Computing

Moving to the Cloud This Page Intentionally Left Blank Moving to the Cloud Developing Apps in the New World of Cloud Computing

Moving to the Cloud This page intentionally left blank Moving to the Cloud Developing Apps in the New World of Cloud Computing Dinkar Sitaram Geetha Manjunath Technical Editor David R. Deily AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Syngress is an imprint of Elsevier Acquiring Editor: Chris Katsaropoulos Development Editor: Heather Scherer Project Manager: A. B. McGee Designer: Alisa Andreola Syngress is an imprint of Elsevier 225 Wyman Street, Waltham, MA 02451, USA © 2012 Elsevier, Inc. All rights reserved. Credits for the screenshot images throughout the book are as follows: Screenshots from Amazon.com, Cloudwatch © Amazon.com, Inc.; Screenshots of Nimsoft © CA Technologies; Screenshots of Gomez © Compuware Corp.; Screenshots from Facebook.com © Facebook, Inc.; Screenshots of Google App Engine, Google Docs © Google, Inc.; Screenshots of HP CloudSystem, Cells-as-a-Service, OpenCirrus © Hewlett-Packard Company; Screenshots of Windows Azure © Microsoft Corporation; Screenshots of Gluster © Red Hat, Inc.; Screenshots from Force.com, Salesforce.com © Salesforce.com, Inc.; Screenshots of Netcharts © Visual Mining, Inc.; Screenshots of Yahoo! Pipes, YQL © Yahoo! Inc. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about the Publisher’s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions. This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein). Notices Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods or professional practices, may become necessary. Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information or methods described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility. To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein. Library of Congress Cataloging-in-Publication Data Sitaram, Dinkar. Moving to the cloud: developing apps in the new world of cloud computing / Dinkar Sitaram and Geetha Manjunath; David R. Deily, technical editor. p. cm. Includes bibliographical references. ISBN 978-1-59749-725-1 (pbk.) 1. Cloud computing. 2. Internet programming. 3. Application programs–Development. I. Manjunath, Geetha. II. Title. QA76.585.S58 2011 004.6782–dc23 2011042034 British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. For information on all Syngress publications visit our website at www.syngress.com Typeset by: diacriTech, Chennai, India Printed in the United States of America 1112131415 10987654321 Dedication To Swarna, Tejas, and Tanvi for their encouragement and support. —Dinkar To my dear husband Manjunath, wonderful kids Abhiram and Anagha and my loving parents. —Geetha This page intentionally left blank Contents About the Authors. xiii About the Technical Editor. ..................................................xv Contributors................................................................xvii Foreword. xxi Preface. ...................................................................xxiii CHAPTER 1 Introduction. ...............................................1 Introduction. ..................................................1 Where Are We Today?........................................2 Evolution of the Web. .................................3 The Future Evolution. 6 What Is Cloud Computing?. ................................8 Cloud Deployment Models....................................9 Private vs. Public Clouds. .................................10 Business Drivers for Cloud Computing. ....................12 Introduction to Cloud Technologies...........................13 Infrastructure as a Service. 15 Platform as a Service. 16 Software as a Service. ....................................17 Technology Challenges....................................18 Summary. ..................................................19 References. .................................................20 CHAPTER 2 Infrastructure as a Service. ..............................23 Introduction. 23 Storage as a Service: Amazon Storage Services...............24 Amazon Simple Storage Service (S3). 24 Amazon Simple DB.......................................30 Amazon Relational Database Service.......................31 Compute as a Service: Amazon Elastic Compute Cloud (EC2). 32 Overview of Amazon EC2. ...............................32 Simple EC2 Example: Setting up a Web Server. 42 Using EC2 for Pustak Portal. .............................47 HP CloudSystem Matrix. ....................................53 Basic Platform Features. ..................................54 Implementing the Pustak Portal Infrastructure. 55 Cells-as-a-Service. 59 vii viii Contents Introduction to Cells-as-a-Service. .........................60 Multi-tenancy: Supporting Multiple Authors to Host Books. 64 Load Balancing the Author Web Site. 67 Summary. ..................................................68 References. .................................................70 CHAPTER 3 Platform as a Service. 73 Introduction. 73 Windows Azure. 74 A “Hello World” Example. 75 Example: Passing a Message. ..............................77 Azure Test and Deployment. ..............................82 Technical Details of the Azure Platform. .................90 Azure Programming Model. .............................97 Using Azure Cloud Storage Services. 98 Handling the Cloud Challenges. .........................101 Designing Pustak Portal in Azure. ........................105 Google App Engine. 108 Getting Started. 108 Developing a Google App Engine Application............108 Using Persistent Storage. 111 Platform as a Service: Storage Aspects. .............114 Amazon Web Services: Storage. 115 IBM SmartCloud: pureXML. 116 Apache Hadoop. 126 MapReduce. 128 Hadoop Distributed File System. ........................134 Mashups. 136 Yahoo! Pipes. 137 Yahoo! Query Language..................................141 Summary...................................................148 References. 150 CHAPTER 4 Software as a Service. 153 Introduction. ...............................................153 CRM as a Service, Salesforce.com. .......................154 A Feature Walk Through.................................154 Customizing Salesforce.com..............................157 Force.com: A Platform for CRM as a Service. ..........158 Programming on Salesforce.com and Force.com...........161 Contents ix Social Computing Services..................................171 What Constitutes “Social” Computing?....................171 Case Study: Facebook. 173 Extending Open Graph...................................180 Social Media Web Site: Picasa. ...........................181 Micro-Blogging: Twitter. ...............................185 Open Social Platform from Google. 188 Privacy Issues: OAuth. ..................188 Document Services: Google Docs. 193 Using Google Docs Portal. ..............................193 Using Google Docs APIs. 195 Summary...................................................200 References. 202 CHAPTER 5 Paradigms for Developing Cloud Applications. 205 Introduction. ...............................................205 Scalable Data Storage Techniques...........................205 Example: Pustak Portal Data..............................207 Scaling Storage: Partitioning. 208 NoSQL Systems: Key-Value Stores.......................217 NoSQL Systems: Object Databases. 222 MapReduce Revisited.......................................224 ADeeperLookattheWorkingofMapReducePrograms....225 Fundamental Concepts Underlying MapReduce Paradigm. 229 Some Algorithms Using MapReduce. ................232 Rich Internet Applications. 237 Getting Started. 237 A Simple (Hello World) Example. ......................239 Client-Server Example; RSS Feed Reader. ...............242 Advanced Platform Functionality. 244 Advanced Example: Implementing Pustak Portal. ........245 Summary...................................................249 References. 251 CHAPTER 6 Addressing the Cloud Challenges. .....................255 Introduction. ...............................................255 Scaling Computation........................................256 Scale Out versus Scale Up................................256 Amdahl’s Law...........................................257 Scaling Cloud Applications with a Reverse Proxy. ......258 Hybrid Cloud and Cloud Bursting: OpenNebula...........260 x Contents Design of a Scalable Cloud Platform: Eucalyptus. .......263 ZooKeeper: A Scalable Distributed Coordination System. 266 Scaling Storage.............................................272

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    481 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us