merb - qcon

81
& merb flexibilty performance

Upload: others

Post on 21-Oct-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: merb - QCon

&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 - QCon

Me

Page 3: merb - QCon

MeMatt

Aimonetti

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

Page 4: merb - QCon

core team member &

evangelistMatt

Page 5: merb - QCon

d o n ’ t w o r kat Engine Yard

Matt

http://engineyard.com

Page 6: merb - QCon

d o n ’ t w o r kat Engine Yard

Matt

http://engineyard.com

Page 7: merb - QCon

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

Page 8: merb - QCon

http://ma-agile.com

/training

Page 9: merb - QCon

Blogs:http://merbist.com

http://railsontherun.com

Page 10: merb - QCon
Page 11: merb - QCon
Page 12: merb - QCon

C o n c l u s i o n

✓Cost

✓Adaptability

✓Scalablility

merb meets the Enterprise needs

Page 13: merb - QCon
Page 14: merb - QCon

“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 15: merb - QCon

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 16: merb - QCon

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 17: merb - QCon

Rails is slow

Page 18: merb - QCon

Ruby is slow

Page 19: merb - QCon

“The slowest programming language in the world”

Page 20: merb - QCon

benchmarks someone?

Page 21: merb - QCon
Page 22: merb - QCon

raw PHP: 331 rps

Page 23: merb - QCon

raw PHP: 331 rps

cake PHP: 3.6 rps / 8 rps (eaccelerator)

Page 24: merb - QCon

raw PHP: 331 rps

cake PHP: 3.6 rps / 8 rps (eaccelerator)

code igniter:21.5 rps / 98.2 rps (eaccelerator)

Page 25: merb - QCon

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 26: merb - QCon

Railsis

pretty close to the fastest PHP framework.

Page 27: merb - QCon

what about merb?

Page 28: merb - QCon

hello world benchmarks

baseline results

Page 29: merb - QCon

apache serving static html:

hello.html

raw PHP: <?php echo "Hello world"; ?>

merb router: match("/hello world")

Page 30: merb - QCon

Merb Router Static HTML raw php

1995 req/s2898 req/s3783 req/s

http://merbist.com

Page 31: merb - QCon

$ ab test: ab -c 10 -n 5000 http://0.0.0.0/benchmark

Merb 1.0 Django 1.0.1 Rails 2.2.1 Code Igniter 1.6.3Symfony Cake PHP

http://merbist.com

Page 32: merb - QCon

Ruby might be slow at fibonacci benchmarks

who cares?

Page 33: merb - QCon

Ruby is fast at real life web benchmarks

that’s what matters!

Page 34: merb - QCon

Ruby for the webis NOT slow

Page 35: merb - QCon
Page 36: merb - QCon

Enterprise

Page 37: merb - QCon

Enterprise

Enterprise needsenterprise software

Page 38: merb - QCon

Enterprise

“Enterprise software is software intended to solve an enterprise problem

(rather than a departmental problem) and often written using

an Enterprise Software Architecture.”

Page 39: merb - QCon

Enterprise

enterprise problem !=

departmental problem

Page 40: merb - QCon

Enterprise

an enterprise problem covers problems from

many different departments

Page 41: merb - QCon

Enterprise

many different departmentsmeans

different needs/challenges

Page 42: merb - QCon

Enterprise

“Enterprise software is software intended to solve an enterprise problem

(rather than a departmental problem) and often written using

an Enterprise Software Architecture.”

Page 43: merb - QCon

Enterprise

Enterprise Software Architecture

Page 44: merb - QCon

Enterprise

http://en.wikipedia.org/wiki/Enterprise_architecture

Page 45: merb - QCon

Enterprise

organization-specific software architecture

Page 46: merb - QCon

Enterprise

“Due to the cost of building what is often proprietary software,

only large organizations attempt to build such software that

models the entire business enterprise [...]”

Page 47: merb - QCon

Enterprise

Elite

Page 48: merb - QCon

Enterprise

what about the not so large companies?

Page 49: merb - QCon

Enterprise

“As many business enterprises have similar departments and systems, enterprise software is often available as

a suite of programs that have attached development tools to

modify the common programs for the specific enterprise.”

Page 50: merb - QCon

Enterprise

“complex development programming tools that

require specialist capabilities”.

Page 51: merb - QCon

Enterprise

Business Software Solutions Applications and Services

Page 52: merb - QCon

Enterprise

ABAP

NetWeaver

SAP system

ERPCRM

SRM

Page 53: merb - QCon

Enterprise

cost

adaptability

Concerns:

Page 54: merb - QCon

Enterprise

Does it scale?

Concerns:

Page 55: merb - QCon

Enterprise

loads of req/s

scalability

easily extendable

swap/extract parts

Page 56: merb - QCon

what about merb?because that’s why I’m here

Page 57: merb - QCon

costopen source

free as in free speech

Page 58: merb - QCon

costruby

Great language - widely adopted - enjoyable momentum

Page 59: merb - QCon

Rubybet on

MacRuby

Rubinius

Page 60: merb - QCon

Rubybet on

MacRuby

Rubinius

Page 61: merb - QCon

costreusable

merb slices - mountable mini applications

Page 62: merb - QCon

costreusable merb slices

Merb::Router.prepare do slice(:blog, :path => "blog") slice(:wiki, :path => "wiki") slice(:public_calendar, :path => "calendar")end

Page 63: merb - QCon

costsmooth transition

access your Java code directly from Merb

deploy your merb app like you deploy your java apps

Page 64: merb - QCon

cost

model the entire business enterprise

build common tools for common use

choose

Page 65: merb - QCon

adaptabilitybecause needs differ and change

Page 66: merb - QCon

adaptabilitymerb is truly modular

ORM JS libtesting

frameworktemplate engine

http://flickr.com/photos/

Page 67: merb - QCon

$ 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 68: merb - QCon

$ merb-gen app app-name

merb stackMVC architecture

asset managementcaching

view helpersmailer

authenticationexceptions handler

Page 69: merb - QCon

pick and choose

adaptability

add/remove dependencies

Page 70: merb - QCon

pick and choose

adaptability

extendplugins - slices - API

Page 71: merb - QCon

pick and choose

adaptability

extend

replacebuild around merb core

Page 72: merb - QCon

scalability

see benchmarks

modularity

small memory footprint

Page 73: merb - QCon

sum up

Page 74: merb - QCon

merb is fast

Page 75: merb - QCon

merb is flexible

Page 76: merb - QCon

merb is modular

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

Page 77: merb - QCon

merb can be opinionated

Page 78: merb - QCon

merb ♥ recycling

Page 79: merb - QCon

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 80: merb - QCon

C o n c l u s i o n

✓Cost

✓Adaptability

✓Scalability

merb meets the Enterprise needs

Page 81: merb - QCon

questions?