merb presentation at orug
DESCRIPTION
Is Ruby really slow? Why should I choose Merb?TRANSCRIPT
![Page 1: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/1.jpg)
&merb
f l e x i b i l t y p e r f o r m a n c e
![Page 2: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/2.jpg)
Me
![Page 3: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/3.jpg)
MeMatt
Aimonetti
irc: m a t t e t t ihttp://github.com/mattetti
![Page 4: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/4.jpg)
Matt
![Page 5: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/5.jpg)
Matt
d o n ’ t w o r kfor Engine Yard
![Page 6: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/6.jpg)
Matt
d o n ’ t w o r kfor Engine Yard
![Page 7: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/7.jpg)
MeC o n s u l t a n tbased in San Diego, CA
![Page 9: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/9.jpg)
Blogs:http://merbist.com
http://railsontherun.com
![Page 10: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/10.jpg)
![Page 11: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/11.jpg)
“It’s also worth mentioning that there shouldn’t be doubt in anybody’s mind at this point that Ruby itself is slow. It’s great that people are hard at work on faster implementations of the language, but right now, it’s tough.”
Alex Payne, Twitter
![Page 12: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/12.jpg)
I for one am scared of Ruby because ... it's known to be slow, so if you become The Next MySpace, you'll be buying 5 times as many boxes as the .NET guy down the hall.
Joel Spolsky
![Page 13: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/13.jpg)
Rails is for the vast majority of web applications Fast Enough... I just happen to care much more about free developer cycles and am willing to trade the former for the latter.
David Heinemeier Hansson
![Page 14: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/14.jpg)
Ruby is so embarrassing.
![Page 15: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/15.jpg)
Rails is slow
![Page 16: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/16.jpg)
Ruby is slow
![Page 17: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/17.jpg)
“The slowest programming language in the world”
![Page 18: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/18.jpg)
What does the community say?
![Page 19: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/19.jpg)
Hardware cost
> Development cost
![Page 20: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/20.jpg)
¡we program faster!
![Page 21: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/21.jpg)
¿srly?
![Page 22: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/22.jpg)
benchmarks someone?
![Page 23: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/23.jpg)
![Page 24: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/24.jpg)
![Page 25: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/25.jpg)
raw PHP: 331 rps
![Page 26: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/26.jpg)
raw PHP: 331 rps
cake PHP: 3.6 rps / 8 rps (eaccelerator)
![Page 27: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/27.jpg)
raw PHP: 331 rps
cake PHP: 3.6 rps / 8 rps (eaccelerator)
code igniter:21.5 rps / 98.2 rps (eaccelerator)
![Page 28: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/28.jpg)
raw PHP: 331 rps
cake PHP: 3.6 rps / 8 rps (eaccelerator)
code igniter:21.5 rps / 98.2 rps (eaccelerator)
Rails:88 rps
![Page 29: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/29.jpg)
Rails with 1 mongrel is
pretty close to the fastest PHP framework.
![Page 30: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/30.jpg)
what about merb?
![Page 31: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/31.jpg)
hello world benchmarks
baseline results
![Page 32: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/32.jpg)
Merb
merb requests per second
![Page 33: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/33.jpg)
Merb Static HTML
requests per second
![Page 34: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/34.jpg)
Merb Static HTML PHP
requests per second
![Page 35: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/35.jpg)
Merb router Merb controller Sinatra Rails CakePHP
requests per second
![Page 36: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/36.jpg)
We don’t need to be embarrassed
![Page 37: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/37.jpg)
Ruby might be slow at fibonacci benchmarks
who cares?
![Page 38: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/38.jpg)
Ruby is fast at real life web benchmarks
that’s what matters!
![Page 39: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/39.jpg)
stop saying Ruby is slowbecause that’s not true
![Page 40: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/40.jpg)
![Page 41: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/41.jpg)
what about merb?because that’s why you’re here
![Page 42: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/42.jpg)
merb is fast
![Page 43: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/43.jpg)
merb is flexible
![Page 44: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/44.jpg)
$ merb-gen app app-name
merb stack
merb-action-argsmerb-assets merb-cache
merb-helpers merb-mailer merb-slices merb-auth
merb-param-protectionmerb-exceptions
dm-core dm-aggregatesdm-migrationsdm-timestamps
dm-types dm-validations
![Page 45: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/45.jpg)
$ merb-gen very_flat app-name
1 file
Merb::Router.prepare do match('/').to(:controller => 'very-flat-app', :action =>'index')end
class VeryFlatApp < Merb::Controller def index "Hi, I am 'very flat' Merb application. I have everything in one single file and well suited for dynamic stub pages." endend
![Page 46: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/46.jpg)
$ merb-gen flat app-name
4 files
application.rb - controllers & actions
config/framework.rb - framework config
config/init.rb - app settings
views/view_name.html.erb - action view
![Page 47: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/47.jpg)
$ merb-gen core app-name
no dependenciessame as merb stack app
when you don’t want DMwhen you use JRuby
when you want an opt-in solution
![Page 48: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/48.jpg)
merb is modular
http://flickr.com/photos/ezzyponchi/283381271/ http://bonluxat.com
![Page 49: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/49.jpg)
merb is agnostic
http://flickr.com/photos/24567277@
N00/2374743628/
![Page 50: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/50.jpg)
merb can be opinionated
![Page 51: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/51.jpg)
merb ♥ recycling
![Page 52: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/52.jpg)
merb has an api
![Page 53: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/53.jpg)
matz likes merb
Merb has a bright future for the people who are not satisfied by the
fixed ways in Rails.
I think that Merb will give users more freedom in a Ruby-ish
way of programming.
![Page 54: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/54.jpg)
getting started
$ sudo gem install merb --development
$ merb-gen app my-first-app
$ merb-gen resource article title:string,author:string
![Page 55: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/55.jpg)
merb 2.0
![Page 56: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/56.jpg)
admin interface
![Page 57: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/57.jpg)
rapid prototyping
e s
y
![Page 58: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/58.jpg)
rapid deployment
e s
y
swiftiply
![Page 59: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/59.jpg)
まつもとゆきひろ
Ruby 1.9 + i18n/l10n
![Page 60: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/60.jpg)
2.0 schedule? in less than 12 months
![Page 61: Merb presentation at ORUG](https://reader033.vdocuments.net/reader033/viewer/2022060109/55593000d8b42a4f3d8b48c3/html5/thumbnails/61.jpg)
questions?