Building. Applications. in the Cloud. Concepts, Patterns, and Projects. AAddison-Wesley. Christopher M. Mo^ar. Cape Town Sydney.



Similar documents
The Data Access Handbook

MIKE COHN. Software Development Using Scrum. VAddison-Wesley. Upper Saddle River, NJ Boston Indianapolis San Francisco

Winning the Hardware-Software Game

Delivery. Enterprise Software. Bringing Agility and Efficiency. Global Software Supply Chain. AAddison-Wesley. Alan W. Brown.

Delivery. Continuous. Jez Humble and David Farley. AAddison-Wesley. Upper Saddle River, NJ Boston Indianapolis San Francisco

Web Development with TIBCO General Interface

EEDC. Scalability Study of web apps in AWS. Execution Environments for Distributed Computing

RFID Field Guide. Deploying Radio Frequency Identification Systems. Manish Bhuptani Shahram Moradpour. Sun Microsystems Press A Prentice Hall Title

Razvoj Java aplikacija u Amazon AWS Cloud: Praktična demonstracija

Cloud Computing. Theory and Practice. Dan C. Marinescu. Morgan Kaufmann is an imprint of Elsevier HEIDELBERG LONDON AMSTERDAM BOSTON

Developer's Cookbook. Building Applications with. The Android. the Android SDK. A Addison-Wesley. James Steele Nelson To

CHAINED EXPLOITS Advanced Hacking Attacks from Start to Finish

ur skills.com

Social Media Marketing

Scalable Application. Mikalai Alimenkou

Enterprise. ESXi in the. VMware ESX and. Planning Deployment of. Virtualization Servers. Edward L. Haletky

BIRT: A Field Guide to Reporting

Public Relations in Schools

BUSINESS INTELLIGENCE

SOA Governance. Stephen G. Bennett, Clive Gee, Robert Laird, Co-authored and edited by Thomas Erl. Governing

Software Security. Building Security In. Gary McGraw. A Addison-Wesley

Learning HTML5 Game Programming

Preparing Your IT for the Holidays. A quick start guide to take your e-commerce to the Cloud

Patterns of Enterprise Application Architecture

THE PSYCHOLOGY OF INVESTING

Agile Methods. Introduction to. AAddison-Wesley. Sondra Ashmore, Ph.D. Kristin Runyan. Capetown Sydney Tokyo Singapore Mexico City

Public Cloud Offerings and Private Cloud Options. Week 2 Lecture 4. M. Ali Babar

Financial Statement Analysis

ENTERPRISE SYSTEMS FOR MANAGEMENT

Tuning Tips & Techniques

Network Security Essentials:

Amazon Elastic Beanstalk

TECHNOLOGY WHITE PAPER Jun 2012

Service Organization Controls 3 Report

Cloud Compu)ng. [Stephan Bergemann, Björn Bi2ns] IP 2011, Virrat

The Crossroads of Accounting & IT

BUSINESS AND PROFESSIONAL COMMUNICATION

Building and Managing

SERVICES MARKETING PEOPLE, TECHNOLOGY, STRATEGY. Global Edition. Christopher Lovelock. Yale University Jochen Wirtz National University of Singapore

Cloud computing - Architecting in the cloud

Scaling in the Cloud with AWS. By: Eli White (CTO & mojolive) eliw.com - mojolive.com

WebLogic Server 11g Administration Handbook

Relationship marketing

Amazon Web Services Yu Xiao

DEC Networks and Architectures

Scalable Architecture on Amazon AWS Cloud

SOA with Java. Realizing Service-Orientation with Java Technologies UPPER SADDLE RIVER, NJ BOSTON INDIANAPOLIS SAN FRANCISCO

TECHNOLOGY WHITE PAPER Jan 2016

Amazon Web Services. Elastic Compute Cloud (EC2) and more...

Management. Oracle Fusion Middleware. 11 g Architecture and. Oracle Press ORACLE. Stephen Lee Gangadhar Konduri. Mc Grauu Hill.

An Introduction to Cloud Computing Concepts

Introduction to Cloud computing. Viet Tran

Implementation & Administration

Managing the Unmanageable

Logentries Insights: The State of Log Management & Analytics for AWS

CONTEMPORARY DIRECT & INTERACTIVE MARKETING

!"#$%&'()*'+),-./)0' 9##+':,%-.;),0'

Cloud Computing For Bioinformatics

Primex Wireless OneVue Architecture Statement

Performance Management

How To Write A Web Framework In Java

A programming model in Cloud: MapReduce

Designing Interactive Systems

Amazon AWS in.net. Presented by: Scott Reed

Computer Organization

LONDON. 2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

The Scenario: Priority Matrix for Cloud Computing

QUANTITATIVE METHODS. for Decision Makers. Mik Wisniewski. Fifth Edition. FT Prentice Hall

Practical Intrusion Analysis

CAREER DEVELOPMENT INTERVENTIONS IN THE 21 ST CENTURY

Cloud Computing Benefits for Educational Institutions

AGILE GAME DEVELOPMENT WITH SCRUM

Service Organization Controls 3 Report

Building Applications in the Cloud

Cloud Computing with Amazon Web Services and the DevOps Methodology.

Introduction to AWS in Higher Ed

Cloud and the future of Unemployment Sean Rhody, CTO Capgemini Government Solutions

Managing Data in Motion

Cloud Computing In Reality: Experience sharing in cloud solution developments and evaluations

Storage Options in the AWS Cloud: Use Cases

Real Time Big Data Processing

Maximum vsphere. Tips, How-Tos,and Best Practices for. Working with VMware vsphere 4. Eric Siebert. Simon Seagrave. Tokyo.

PCI on Amazon Web Services (AWS) What You Need To Know Understanding the regulatory roadmap for PCI on AWS

MARKETING. Elnora W.!b II Ufluu 1 UNIVERSITY OF SOUTH CAROLINA UPSTATE. Michael R. SAINT JOSEPH'S UNIVERSITY. Greg W.

Using ArcGIS for Server in the Amazon Cloud

Transcription:

Building Applications in the Cloud Concepts, Patterns, and Projects Christopher M. Mo^ar Upper Saddle River, NJ Boston AAddison-Wesley New York 'Toronto Montreal London Munich Indianapolis San Francisco Paris Madrid Cape Town Sydney Tokyo Singapore Mexico City

Table of Contents Preface xv About the Author xx Introduction 1 What Is Cloud Computing? 1 The Evolution of Cloud Computing 2 The Main Frame 3 The PC Revolution 4 The Fast Internet 5 The Cloud 6 HTML5 and Local Storage 7 The Dawn of Mobile Devices 9 Threading, Parallel Processing, and Parallel Computing 10 How Does Cloud-Based Development Differ from Other Application Development? 11 What to Avoid 13 Getting Started in the Cloud 14 Selecting a Cloud Pattern 16 Implementing a Cloud Pattern 17 I: Concepts 1 Fundamentals of Cloud Services 21 Origins of Cloud Computing 21 What Is a Cloud Service? 23 Compute 24 Storage 24 Connectivity 24

viii Contents The Legacy Pattern 25 Just Because It's in the Cloud Doesn't Mean It Scales 26 Failure as a Feature 27 Consistency, Availability, and Partition Tolerance 28 Consistency 29 Availability 30 Partition Tolerance 30 Eventual Consistency 31 Summary 32 2 Making Software a Service 33 Tools Used in This Book 34 Signing Up for Amazon Web Services 34 Installing boto 35 Setting Up the Environment 36 Testing It All 38 What Does Your Application Need? 39 Data Layer 40 Introducing the AWS Databases 41 Application Layer 47 Using Elastic Load Balancing 47 Adding Servers to the Load Balancer 49 Automatically Registering an Instance with a Load Balancer 51 HTTP and REST 53 The Header 53 The Body 57 Methods 58 Authorization Layer 62 Client Layer 64 Browser-Based Clients 65 Native Applications 66 Summary 67

Contents ix 3 Cloud Service Providers 69 Amazon Web Services 69 Simple Storage Service (S3) 71 CloudFront 77 Simple Queue Service (SQS) 80 Elastic Compute Cloud (EC2) 83 Elastic Block Storage (EBS) 88 Elastic Load Balancing (ELB) 91 SimpleDB 93 Relational Database Service (RDS) 95 Simple Notification Service <SNS) 102 Virtual Private Cloud (VPC) 106 Google Cloud 108 AppEngine 108 Google Storage 111 Rackspace Cloud 112 CloudFiles 112 CloudServers 113 CloudSites 113 Summary 114 II: Patterns 4 Designing an Image 117 Prepackaged Images 119 Overview 119 Reasons for Usage 119 Description 120 Implementation 120 Example 122 Summary 125 Singleton Instances 127 Overview 127 Reasons for Usage 127 Description 128 Implementation 128

x Contents Example 128 Summary 130 Prototype Images 131 Overview 131 Reasons for Usage 131 Description 132 Implementation 132 Example 133 Summary 135 5 Designing an Architecture 137 Adapters 139 Overview 139 Reasons for Usage 140 Description 140 Implementation 140 Example 141 Summary 146 Facades 147 Overview 147 Reasons for Usage 148 Description 148 Implementation 148 Example 149 Summary 152 Proxies and Balancers 153 Overview 153 Reasons for Usage 153 Description 154 Implementation 154 Example 155 Summary 158 6 Executing Actions on Data 159 Queuing 161 Overview 161 Reasons for Usage 162

Description 162 Implementation 163 Example 163 Summary 170 Command 173 Overview 173 Reasons for Usage 173 Description 174 Implementation 174 Example 175 Summary 179 Iterator 181 Overview 181 Reasons for Usage 181 Description 182 Implementation 182 Example 183 Summary 185 Observer 187 Overview 187 Reasons for Usage 188 Description 188 Implementation 188 Example 189 Summary 191 Clustering 193 The n-tier Web Pattern 195 Overview 195 Reasons for Usage 196 Description 196 Implementation 197 Example 198 Summary 210 Semaphores and Locking 211 Overview 211 Reasons for Usage 211

xii Contents Description 212 Implementation 212 Example 213 Summary 218 Map/Reduce 219 Overview 219 Reasons for Usage 220 Description 220 Implementation 220 Example 222 Summary 226 III: Projects 8 A Simple Weblog 229 Storage 229 Creating a Domain 231 The User Object 232 The Post Object 234 The Comment Object 237 Application 240 A Brief Introduction to WSGI 241 The DB Handler 243 The User, Post, and Comment Handlers 248 Spam Classification 249 Presentation 253 Setting Up the HTTP Proxy 254 Posts 255 Comments 266 Deploying 272 Starting the Base Instance 272 Installing the Software 273 Installing the Application 275 Installing Apache 276 Bundling the Image 277 Creating the Proxy 279 Summary 279

Contents xiii 9 A Weblog Using Marajo 281 Initializing the Environment 282 handlers 283 resources 283 static 283 templates 283 Creating the Resources 284 Creating the Handlers 286 Configuring the Application 287 Creating the Templates 288 Running the Application 289 Creating Custom Templates 289 The List Template 289 The Edit Template 292 Summary 296 Glossary 297 Index 307