Transcript
Page 1: Ruby, Amazon Web Services and You

Ruby, Amazon Web Services

and You

Krzysztof Szafranek, RuPy 2008

Page 2: Ruby, Amazon Web Services and You
Page 3: Ruby, Amazon Web Services and You
Page 4: Ruby, Amazon Web Services and You
Page 5: Ruby, Amazon Web Services and You
Page 6: Ruby, Amazon Web Services and You

The problem

Page 7: Ruby, Amazon Web Services and You

EC2Elastic Compute Cloud

Page 8: Ruby, Amazon Web Services and You

Processing Power on Demand

Page 9: Ruby, Amazon Web Services and You

Amazon Machine Image (AMI)

Page 10: Ruby, Amazon Web Services and You

Instance

Page 11: Ruby, Amazon Web Services and You

Elastic IP

Page 12: Ruby, Amazon Web Services and You

Zones and regions

Page 13: Ruby, Amazon Web Services and You

Volatile storage

Page 14: Ruby, Amazon Web Services and You

SOAP & REST

Page 15: Ruby, Amazon Web Services and You

RightAws::Ec2

Page 16: Ruby, Amazon Web Services and You

cap ec2onrails:server:deploy_files

Page 17: Ruby, Amazon Web Services and You

Instance type Hourly price

Small

1.7 GB of RAM,1 Unit,160 GB,32-bit

$0.10

Large

7.5 GB of RAM,4 Units,850 GB,64-bit

$0.40

Extra Large

15 GB of RAM,8 Units,

1690 GB,64-bit

$0.80

1 EC2 Compute Unit ≈ 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor

Page 18: Ruby, Amazon Web Services and You
Page 19: Ruby, Amazon Web Services and You

S3Simple Storage Service

Page 20: Ruby, Amazon Web Services and You

Unlimited storage

Page 21: Ruby, Amazon Web Services and You

Files: 5 GB

Page 22: Ruby, Amazon Web Services and You

Buckets: 100

Page 23: Ruby, Amazon Web Services and You

Metadata

Page 24: Ruby, Amazon Web Services and You

Keys

Page 25: Ruby, Amazon Web Services and You

Keys

/images/highres/duck.jpg

Page 26: Ruby, Amazon Web Services and You

ACL

Page 27: Ruby, Amazon Web Services and You

USA and Europe

Page 28: Ruby, Amazon Web Services and You

Torrents

Page 29: Ruby, Amazon Web Services and You

AWS::S3

RightAws::S3

Page 30: Ruby, Amazon Web Services and You

attachment_fu

class Photo < ActiveRecord::Base has_attachment :storage => :s3end

Page 31: Ruby, Amazon Web Services and You

Pricing

Page 32: Ruby, Amazon Web Services and You

$0.18 per GB-month

($0.15 in US)

Storage

Page 33: Ruby, Amazon Web Services and You

In Out

$0.10

$0.18 0-10 TB

$0.16 10-50 TB

$0.13 over 50 TB

Bandwith (GB price)

Transfer within AWS is free

Page 34: Ruby, Amazon Web Services and You

PUT, LIST GET and other*

$0.012 per 1,000 $0.012 per 10,000

Requests

*DELETE is free

Page 35: Ruby, Amazon Web Services and You
Page 36: Ruby, Amazon Web Services and You

SimpleDB

Page 37: Ruby, Amazon Web Services and You

Fast storage...

Page 38: Ruby, Amazon Web Services and You

...for UTF-8 strings

Page 39: Ruby, Amazon Web Services and You

2 > 10

Page 40: Ruby, Amazon Web Services and You

02 < 10

Page 41: Ruby, Amazon Web Services and You

order by

Page 42: Ruby, Amazon Web Services and You

10 GB, 100 domains

Page 43: Ruby, Amazon Web Services and You

No schema

Page 44: Ruby, Amazon Web Services and You

Automatic indexing

Page 45: Ruby, Amazon Web Services and You

Real-time lookup

Page 46: Ruby, Amazon Web Services and You

RightAws::ActiveSdb

Page 47: Ruby, Amazon Web Services and You

AWS SDB Proxy

Page 48: Ruby, Amazon Web Services and You

class Post < ActiveResource::Base self.site = "http://localhost:8888" self.prefix = "/domain/" end

Page 49: Ruby, Amazon Web Services and You

GET /domain/posts?query QUERY

GET /domain/post/ID GET ATTRS

POST /domain/post/ID PUT ATTRS

PUT /domain/post/ID PUT ATTRS (replace)

DELETE /domain/post/ID DELETE ATTRS

Page 50: Ruby, Amazon Web Services and You

SQSSimple Queue Service

Page 51: Ruby, Amazon Web Services and You

Producers Consumers

Queue

Page 52: Ruby, Amazon Web Services and You

Queues

Page 53: Ruby, Amazon Web Services and You

Messages

Page 54: Ruby, Amazon Web Services and You

RightAws::Sqs

Page 55: Ruby, Amazon Web Services and You

Mechanical Turk

Page 56: Ruby, Amazon Web Services and You

Human Intelligence Tasks

Page 57: Ruby, Amazon Web Services and You
Page 58: Ruby, Amazon Web Services and You

Requesters

Page 59: Ruby, Amazon Web Services and You

Workers

Page 60: Ruby, Amazon Web Services and You

Qualifications

Page 61: Ruby, Amazon Web Services and You

SOAP & REST

Page 62: Ruby, Amazon Web Services and You

Google App Engine

Page 63: Ruby, Amazon Web Services and You

Google App Engine

Free* hosting

Page 64: Ruby, Amazon Web Services and You

Google App Engine

Python, GQL, Google Accounts

Page 65: Ruby, Amazon Web Services and You

Google App Engine

Quota Daily limit

Emails 2,000

Bandwith 10,000MB

CPU Megacycles 200,000,000

HTTP Requests 650,000

Page 66: Ruby, Amazon Web Services and You

Google App Engine

Page 67: Ruby, Amazon Web Services and You

AWSScalability commoditized?

Page 68: Ruby, Amazon Web Services and You
Page 69: Ruby, Amazon Web Services and You
Page 70: Ruby, Amazon Web Services and You
Page 71: Ruby, Amazon Web Services and You

Marcin WicharyDiego Sevilla RuizSean DreilingerMarcello Peronginidoommeer

Thank you!

CC-licensed photos by:

[email protected]


Recommended