merb presentation at orug

61
& merb flexibilty performance

Upload: matt-aimonetti

Post on 18-May-2015

4.627 views

Category:

Technology


0 download

DESCRIPTION

Is Ruby really slow? Why should I choose Merb?

TRANSCRIPT

Page 1: Merb presentation at ORUG

&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

Me

Page 3: Merb presentation at ORUG

MeMatt

Aimonetti

irc: m a t t e t t ihttp://github.com/mattetti

Page 4: Merb presentation at ORUG

Matt

Page 5: Merb presentation at ORUG

Matt

d o n ’ t w o r kfor Engine Yard

Page 6: Merb presentation at ORUG

Matt

d o n ’ t w o r kfor Engine Yard

Page 7: Merb presentation at ORUG

MeC o n s u l t a n tbased in San Diego, CA

Page 8: Merb presentation at ORUG

http://ma-agile.com

/training

Page 9: Merb presentation at ORUG

Blogs:http://merbist.com

http://railsontherun.com

Page 10: Merb presentation at ORUG
Page 11: Merb presentation at ORUG

“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

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

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

Ruby is so embarrassing.

Page 15: Merb presentation at ORUG

Rails is slow

Page 16: Merb presentation at ORUG

Ruby is slow

Page 17: Merb presentation at ORUG

“The slowest programming language in the world”

Page 18: Merb presentation at ORUG

What does the community say?

Page 19: Merb presentation at ORUG

Hardware cost

> Development cost

Page 20: Merb presentation at ORUG

¡we program faster!

Page 21: Merb presentation at ORUG

¿srly?

Page 22: Merb presentation at ORUG

benchmarks someone?

Page 23: Merb presentation at ORUG
Page 24: Merb presentation at ORUG
Page 25: Merb presentation at ORUG

raw PHP: 331 rps

Page 26: Merb presentation at ORUG

raw PHP: 331 rps

cake PHP: 3.6 rps / 8 rps (eaccelerator)

Page 27: Merb presentation at ORUG

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

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

Rails with 1 mongrel is

pretty close to the fastest PHP framework.

Page 30: Merb presentation at ORUG

what about merb?

Page 31: Merb presentation at ORUG

hello world benchmarks

baseline results

Page 32: Merb presentation at ORUG

Merb

merb requests per second

Page 33: Merb presentation at ORUG

Merb Static HTML

requests per second

Page 34: Merb presentation at ORUG

Merb Static HTML PHP

requests per second

Page 35: Merb presentation at ORUG

Merb router Merb controller Sinatra Rails CakePHP

requests per second

Page 36: Merb presentation at ORUG

We don’t need to be embarrassed

Page 37: Merb presentation at ORUG

Ruby might be slow at fibonacci benchmarks

who cares?

Page 38: Merb presentation at ORUG

Ruby is fast at real life web benchmarks

that’s what matters!

Page 39: Merb presentation at ORUG

stop saying Ruby is slowbecause that’s not true

Page 40: Merb presentation at ORUG
Page 41: Merb presentation at ORUG

what about merb?because that’s why you’re here

Page 42: Merb presentation at ORUG

merb is fast

Page 43: Merb presentation at ORUG

merb is flexible

Page 44: Merb presentation at ORUG

$ 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

$ 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

$ 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

$ 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

merb is modular

http://flickr.com/photos/ezzyponchi/283381271/ http://bonluxat.com

Page 49: Merb presentation at ORUG

merb is agnostic

http://flickr.com/photos/24567277@

N00/2374743628/

Page 50: Merb presentation at ORUG

merb can be opinionated

Page 51: Merb presentation at ORUG

merb ♥ recycling

Page 52: Merb presentation at ORUG

merb has an api

Page 53: Merb presentation at ORUG

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

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

merb 2.0

Page 56: Merb presentation at ORUG

admin interface

Page 57: Merb presentation at ORUG

rapid prototyping

e s

y

Page 58: Merb presentation at ORUG

rapid deployment

e s

y

swiftiply

Page 59: Merb presentation at ORUG

まつもとゆきひろ

Ruby 1.9 + i18n/l10n

Page 60: Merb presentation at ORUG

2.0 schedule? in less than 12 months

Page 61: Merb presentation at ORUG

questions?