Cloud Computing Development. Shallow Introduction.

42
Cloud Computing Development

Transcript of Cloud Computing Development. Shallow Introduction.

Page 1: Cloud Computing Development. Shallow Introduction.

Cloud Computing Development

Page 2: Cloud Computing Development. Shallow Introduction.

Cloud Computing Development

Shallow Introduction

Page 3: Cloud Computing Development. Shallow Introduction.

Introduction

Page 4: Cloud Computing Development. Shallow Introduction.

What is the cloud computing

Is it computing while in flight?

Image Courtesy SevensHeaven.nl

Page 5: Cloud Computing Development. Shallow Introduction.

What is the cloud computing

Is it computing while in flight?

NOImage Courtesy SevensHeaven.nl

Page 6: Cloud Computing Development. Shallow Introduction.

What is the cloud computing

What is it about then?

Page 7: Cloud Computing Development. Shallow Introduction.

What is the cloud computing

What is it about then?

Cloud computing is consumption of

computing resources without worrying about

specifics.

Page 8: Cloud Computing Development. Shallow Introduction.

What is the cloud computing

What is it about then?

As well as ability to add or remove resources

according to the demand.

Page 9: Cloud Computing Development. Shallow Introduction.

What is the cloud computing

What is it about then?

Similar to the power grid and

telephone network.

Page 10: Cloud Computing Development. Shallow Introduction.

What is the cloud computing

What is it about then?

Similar to the power grid and

telephone network.

Page 11: Cloud Computing Development. Shallow Introduction.

How does it work?‣ Consumer signs up for the service. (Same as if you get a mobile phone plan)

‣ Consumer uses services according to their needs

‣ Provider sends the bill at the end of the cycle

‣ Consumer pays

Page 12: Cloud Computing Development. Shallow Introduction.

Provider ModelsSoftware As A Service

SAAS

EmailCRM

Office Apps

Page 13: Cloud Computing Development. Shallow Introduction.

Provider ModelsSoftware As A Service

SAAS

EmailCRM

Office Apps

Platform As A Service

PAAS

Application ServersDatabasesMiddleware

Page 14: Cloud Computing Development. Shallow Introduction.

Provider ModelsSoftware As A Service

SAAS

EmailCRM

Office Apps

Platform As A Service

PAAS

Application ServersDatabasesMiddleware

Infrastructure As A Service

IAAS

Bare Hardware (Sort of )

Page 15: Cloud Computing Development. Shallow Introduction.

ProvidersSoftware As A Service

SAAS

Google (GMail)Salesforce

Microsoft (Office Live)

Page 16: Cloud Computing Development. Shallow Introduction.

ProvidersSoftware As A Service

SAAS

Google (GMail)Salesforce

Microsoft (Office Live)

Platform As A Service

PAAS

Google App EngineHeroku / Engine Yard (Rails)

Windows Azure (.NET)

Page 17: Cloud Computing Development. Shallow Introduction.

ProvidersSoftware As A Service

SAAS

Google (GMail)Salesforce

Microsoft (Office Live)

Platform As A Service

PAAS

Google App EngineHeroku / Engine Yard

(Rails)Windows Azure (.NET)

Infrastructure As A Service

IAAS

Amazon AWSRackspace

GoGrid

Page 18: Cloud Computing Development. Shallow Introduction.

Provider: Windows Azure

‣ Platform as a service

‣ Windows based

‣ Storage provided through blob storage, drives, SQL Azure

‣ State is stored and propagated with Queues and Tables

‣ Integrated with Visual Studio

‣ Eclipse plug-in for PHP

Page 19: Cloud Computing Development. Shallow Introduction.

Slide courtesy Vlad Vinogradsky from Microsoft

Page 20: Cloud Computing Development. Shallow Introduction.

Provider: Google App Engine

• Platform as a service

• Python or Java based

• Storage provided through BigTable

• Automatically scales web nodes

Page 21: Cloud Computing Development. Shallow Introduction.

Provider: Rackspace• Infrastructure as a service

• Very Basic just a few Linux or Windows images

• Provides storage with CloudFiles

• Very Cheap

• Open source API

• Relatively New

Page 22: Cloud Computing Development. Shallow Introduction.

Provider: Amazon AWS• Oldest on the market

• Many services / Images / Third party providers

• Provides computation through EC2 / EMR

• Provides state / storage through S3, SQS, RDS, SimpleDB

• Multiple APIs

Page 23: Cloud Computing Development. Shallow Introduction.

Sample Prices

Amazon

Compute $0.10+ VM/Hr Storage $0.15+ GB/Month $0.15+ GB/XFer

Rackspace

Compute $0.02+ VM/Hr Storage $0.15+ GB/Month $0.22+ GB/XFer

MicrosoftCompute $0.12 VM/HrStorage $0.15 GB/moBandwidh $0.15 GB/XFer

Page 24: Cloud Computing Development. Shallow Introduction.

Development

Page 25: Cloud Computing Development. Shallow Introduction.

Practical Considerations

•Cloud Development is slightly different from traditional in house model.

Page 26: Cloud Computing Development. Shallow Introduction.

Practical Considerations•Cloud Development is slightly

different from traditional in house model.

•Everything is virtualized (most of the time)

•Everything is distributed

•Per instance reliability is much lower

•Overall reliability is much higher

Page 27: Cloud Computing Development. Shallow Introduction.

Cloud Programming Model

Page 28: Cloud Computing Development. Shallow Introduction.

Cloud Programming Model‣Compute and

Interface nodes are not reliable, they can crash and disappear at any time.

‣Storage and State are reliable and heavily distributed.

‣At any time we can start more compute or interface nodes and shut them down when demand subsides.

Page 29: Cloud Computing Development. Shallow Introduction.

Cloud Programming Model on Azure

‣ Compute : Worker Nodes

‣ State: Tables / Queues / SQL

‣ Storage: SQL / Tables / Blobs / Drives

‣ Client Inteface: Web Nodes

Page 30: Cloud Computing Development. Shallow Introduction.

Cloud Programming Model on AWS

‣Compute : EC2 Instances

‣State: S3 / Queues / SimpleDB / RDS

‣Storage: S3 / SimpleDB / RDS

‣Client Inteface: S3 / EC2 / CloudFront

Page 31: Cloud Computing Development. Shallow Introduction.

AWS Details: S3

‣S3 = Simple Storage Service

‣Guaranteed to be reliable

‣Simple {Key, Value} storage

‣Keys are stored within buckets

‣Values could be as large as 5GB

‣Default Storage Mechanism for AWS

Page 32: Cloud Computing Development. Shallow Introduction.

AWS Details: Simple DB

‣Schema less database

‣Main storage unit is domain ( similar to table )

‣Each record can have many attributes, new attributes could be added at any time

‣Similar to LISP / Scheme attributes

‣Can query domain for records containing particular attribute

‣No Joins / Unions with other domains

‣Eventual Consistency

Page 33: Cloud Computing Development. Shallow Introduction.

AWS Details: RDS

‣ RDS = Relational Data Storage

‣ MySQL in a cluster mode

‣ Preferred to simply running DB server within instance (ask me why for details)

Page 34: Cloud Computing Development. Shallow Introduction.

AWS Details: SQS

‣SQS = Simple Queue System

‣Massively scalable

‣Allows to put message in the queue and retrieve later on

‣Retrieving the message hides it from the other users

‣When message is processed it is deleted from the queue

‣If message is not deleted before the timeout it is returned back

Page 35: Cloud Computing Development. Shallow Introduction.

AWS Details: EC2‣EC2 = Elastic Compute Cloud

‣Allows to run arbitrary virtual machinesProvided they are compatible with Amazon’s modified Xen

‣Kernels and Startup Disks are stored in S3

‣Also have large local storage

‣Machines are not exactly like physical machines

‣Local storage is not persistentWhen machine is shut down all local data disappears.

‣Hardware TCP [No packet layer / No Broadcast ]

‣Can launch many copies of the machine at the same time

‣Lot’s of preconfigured machines

Page 36: Cloud Computing Development. Shallow Introduction.

AWS Details: Other Services

‣EMR = Elastic Map ReduceLet’s run Hadoop jobs on EC2

‣CloudFront Content Delivery Network

‣ELB = Elastic Load Balancer

‣EBS = Elastic Block StorageS3 backed persistent storage

‣Public Data Sets - Lots of publicly available data

Census ( 1980 , 1990, 2000 ), Wikipedia logs, Freebase dumps, Genetic and Chemistry data

Page 37: Cloud Computing Development. Shallow Introduction.

Starting Up

•Amazon Account

•Credentials KeyID : SecretKey

•X509 Ceriticate

Page 38: Cloud Computing Development. Shallow Introduction.

Helpful Tools

•S3 Fox - Firefox extension for browsing S3

•Elastic Fox - Firefox extension for operating EC2

•Transmit - Mac utility for S3 ($)

•Right Scale - Web based platform for managing everything ( Free / $ )

Page 39: Cloud Computing Development. Shallow Introduction.

Libraries

•Official Amazon Libraries (Java)

•Unofficial Libraries - .Net / Ruby / Perl

•AWS4C - C/C++/Objective C

•Boto - Very popular Python library (official Hadoop/EC2 library)

Page 40: Cloud Computing Development. Shallow Introduction.

Demo

Page 41: Cloud Computing Development. Shallow Introduction.

Demo

Running Hadoop on EC2

Page 42: Cloud Computing Development. Shallow Introduction.

Questions

????