scaling ruby from the inside out - o'reilly media - technology

63

Upload: others

Post on 03-Feb-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scaling Ruby from the Inside Out - O'Reilly Media - Technology
Page 2: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Scaling Ruby from the Inside Out

Ezra Zygmuntowicz

Page 3: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Does Rails Scale?

Page 4: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Does Rails Scale?

Of course it does...

Page 5: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Does Ruby Scale?

Page 6: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Does Ruby Scale?

Of course it does...

Page 7: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Should you use Rails or Merb?

Page 8: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Should you use Rails or Merb?

YES!

Page 9: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Are you sick and tired of endlessly debating

this crap?

Page 10: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Are you sick and tired of endlessly debating

this crap?

Of course you are...

Page 11: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Me too, let’s talk about something more

interesting...

Page 12: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Scaling Ruby from the Inside Out

Page 13: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

What should we talk about then?

Page 14: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

What should we talk about then?

The weather maybe?

Page 15: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Forecast calls for 100% chance of clouds...

Page 16: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Cloud Computing

Page 17: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Cloud Computing Platforms

Abstract/Virtual ResourcesCPU

MemoryStorage

API Access

Page 18: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Cloudy Weather

• Amazon EC2

• Engine Yard

• Joyent

• Mosso

This is only the beginning...

• 3terra

• Google App Engine

• Project Caroline

• GoGrid

Page 19: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

There will be *many* cloud computing

platforms in the near future

Page 20: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Many virtual machines to manage

Page 21: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

SSH doesn’t scale...

Page 22: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

SSH doesn’t scale...

Takes time to setup/teardown connections

Page 23: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

SSH doesn’t scale...

Takes time to setup/teardown connections

Inherently push only technology

Page 24: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Capistrano is an awesome tool

Page 25: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Capistrano is an awesome tool

but running commands on thousands of machines in

parallel is pushing it further then it wants to go

Page 26: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

How will we manage the complexity?

Page 27: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

How will we manage the complexity?

It’s all about the distribution...

Page 28: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

We’ve got to think big now! New York, Chicago, LA

Page 29: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Introducing Vertebra

Next Generation Cloud Computing/Automation

Framework

Page 30: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Enter XMPPExtensible Messaging and Presence Protocol

Page 31: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Enter XMPPExtensible Messaging and Presence Protocol

ExtensibleI like that

Page 32: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Enter XMPPExtensible Messaging and Presence Protocol

MessagingWe want to send messages to our thousands of machines

Page 33: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Enter XMPPExtensible Messaging and Presence Protocol

PresenceWe want to know when our machines are online or not

and act accordingly

Page 34: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

XMPP is a realtime messaging protocol built for

IM/chat, great for communication betweenthousands of people, why

not machines?

Page 35: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

quick demo

Page 36: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Ejabberd

Horizontally scalable/federated erlang XMPP/Jabber server

High performance even with tens of thousands of connections

Forms the backbone of the system

Page 37: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Ruby based agents run on every slice/instance/node

in the cloud

Page 38: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Presence let's us know when agents come online or go

offline

Page 39: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Security/Discovery/Introduction Framework

Keeps Agents in Touch with Each Other.

Page 40: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Distributed Hierarchal Key-Value Storage System Queried via XMPP

Page 41: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

State Machine/Workflow Engine Coordinates Multiple

Agents/Humans

Page 42: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Vertebra

Page 43: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

CREST

Page 44: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

CRESTCloud-REST

Page 45: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

CRESTCloud-REST

Operations on Resourcesin the cloud

Page 46: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

operation:list/cluster/ey05

/node/42/xen

Page 47: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Resource Discovery

Page 48: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Resource Discovery

Who provides this set of resources?

Page 49: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Resource Discovery

Who provides this set of resources?

Page 50: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Map/Reduce Scatter/Gather Dispatch

Page 51: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Map/Reduce Scatter/Gather Dispatch

Discover

Page 52: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Map/Reduce Scatter/Gather Dispatch

Discover Scatter

Page 53: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Map/Reduce Scatter/Gather Dispatch

Discover Scatter Gather

Page 54: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

quick demo

Page 55: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Not only server automation

Page 56: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Ejabberd + Comet + Jsjac==

Realtime Web Platform

Page 57: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Many Ideas to Experiment With

Page 58: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

XMPP > HTTP

Page 59: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Watch this space...

Page 60: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

One more thing...

Page 61: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

One more thing...

Introducing: Engine Yard Express

http://express.engineyard.com/system/ey_express_v0.1.tar.bz2

Page 62: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Engine Yard Express

http://express.engineyard.com/system/ey_express_v0.1.tar.bz2

Page 63: Scaling Ruby from the Inside Out - O'Reilly Media - Technology

Questions?