![Page 1: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/1.jpg)
![Page 2: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/2.jpg)
Scaling Ruby from the Inside Out
Ezra Zygmuntowicz
![Page 3: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/3.jpg)
Does Rails Scale?
![Page 4: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/4.jpg)
Does Rails Scale?
Of course it does...
![Page 5: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/5.jpg)
Does Ruby Scale?
![Page 6: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/6.jpg)
Does Ruby Scale?
Of course it does...
![Page 7: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/7.jpg)
Should you use Rails or Merb?
![Page 8: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/8.jpg)
Should you use Rails or Merb?
YES!
![Page 9: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/9.jpg)
Are you sick and tired of endlessly debating
this crap?
![Page 10: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/10.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/11.jpg)
Me too, let’s talk about something more
interesting...
![Page 12: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/12.jpg)
Scaling Ruby from the Inside Out
![Page 13: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/13.jpg)
What should we talk about then?
![Page 14: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/14.jpg)
What should we talk about then?
The weather maybe?
![Page 15: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/15.jpg)
Forecast calls for 100% chance of clouds...
![Page 16: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/16.jpg)
Cloud Computing
![Page 17: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/17.jpg)
Cloud Computing Platforms
Abstract/Virtual ResourcesCPU
MemoryStorage
API Access
![Page 18: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/18.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/19.jpg)
There will be *many* cloud computing
platforms in the near future
![Page 20: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/20.jpg)
Many virtual machines to manage
![Page 21: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/21.jpg)
SSH doesn’t scale...
![Page 22: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/22.jpg)
SSH doesn’t scale...
Takes time to setup/teardown connections
![Page 23: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/23.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/24.jpg)
Capistrano is an awesome tool
![Page 25: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/25.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/26.jpg)
How will we manage the complexity?
![Page 27: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/27.jpg)
How will we manage the complexity?
It’s all about the distribution...
![Page 28: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/28.jpg)
We’ve got to think big now! New York, Chicago, LA
![Page 29: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/29.jpg)
Introducing Vertebra
Next Generation Cloud Computing/Automation
Framework
![Page 30: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/30.jpg)
Enter XMPPExtensible Messaging and Presence Protocol
![Page 31: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/31.jpg)
Enter XMPPExtensible Messaging and Presence Protocol
ExtensibleI like that
![Page 32: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/32.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/33.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/34.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/35.jpg)
quick demo
![Page 36: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/36.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/37.jpg)
Ruby based agents run on every slice/instance/node
in the cloud
![Page 38: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/38.jpg)
Presence let's us know when agents come online or go
offline
![Page 39: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/39.jpg)
Security/Discovery/Introduction Framework
Keeps Agents in Touch with Each Other.
![Page 40: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/40.jpg)
Distributed Hierarchal Key-Value Storage System Queried via XMPP
![Page 41: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/41.jpg)
State Machine/Workflow Engine Coordinates Multiple
Agents/Humans
![Page 42: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/42.jpg)
Vertebra
![Page 43: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/43.jpg)
CREST
![Page 44: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/44.jpg)
CRESTCloud-REST
![Page 45: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/45.jpg)
CRESTCloud-REST
Operations on Resourcesin the cloud
![Page 46: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/46.jpg)
operation:list/cluster/ey05
/node/42/xen
![Page 47: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/47.jpg)
Resource Discovery
![Page 48: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/48.jpg)
Resource Discovery
Who provides this set of resources?
![Page 49: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/49.jpg)
Resource Discovery
Who provides this set of resources?
![Page 50: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/50.jpg)
Map/Reduce Scatter/Gather Dispatch
![Page 51: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/51.jpg)
Map/Reduce Scatter/Gather Dispatch
Discover
![Page 52: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/52.jpg)
Map/Reduce Scatter/Gather Dispatch
Discover Scatter
![Page 53: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/53.jpg)
Map/Reduce Scatter/Gather Dispatch
Discover Scatter Gather
![Page 54: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/54.jpg)
quick demo
![Page 55: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/55.jpg)
Not only server automation
![Page 56: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/56.jpg)
Ejabberd + Comet + Jsjac==
Realtime Web Platform
![Page 57: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/57.jpg)
Many Ideas to Experiment With
![Page 58: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/58.jpg)
XMPP > HTTP
![Page 59: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/59.jpg)
Watch this space...
![Page 60: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/60.jpg)
One more thing...
![Page 61: Scaling Ruby from the Inside Out - O'Reilly Media - Technology](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/61.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/62.jpg)
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](https://reader031.vdocument.in/reader031/viewer/2022020705/61fb86e22e268c58cd5f3930/html5/thumbnails/63.jpg)
Questions?