merb for the enterprise

81
& merb flexibilty performance

Upload: matt-aimonetti

Post on 18-May-2015

5.688 views

Category:

Technology


0 download

DESCRIPTION

Talk given during QCon 2008 in San Francisco

TRANSCRIPT

Page 1: Merb For The Enterprise

&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 For The Enterprise

Me

Page 3: Merb For The Enterprise

MeMatt

Aimonetti

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

Page 4: Merb For The Enterprise

core team member &

evangelistMatt

Page 5: Merb For The Enterprise

d o n ’ t w o r kat Engine Yard

Matt

http://engineyard.com

Page 6: Merb For The Enterprise

d o n ’ t w o r kat Engine Yard

Matt

http://engineyard.com

Page 7: Merb For The Enterprise

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

Page 8: Merb For The Enterprise

http://ma-agile.com

/training

Page 9: Merb For The Enterprise

Blogs:http://merbist.com

http://railsontherun.com

Page 10: Merb For The Enterprise
Page 11: Merb For The Enterprise
Page 12: Merb For The Enterprise

C o n c l u s i o n

✓Cost

✓Adaptability

✓Scalablility

merb meets the Enterprise needs

Page 13: Merb For The Enterprise
Page 14: Merb For The Enterprise

“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 For The Enterprise

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 For The Enterprise

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 For The Enterprise

Rails is slow

Page 18: Merb For The Enterprise

Ruby is slow

Page 19: Merb For The Enterprise

“The slowest programming language in the world”

Page 20: Merb For The Enterprise

benchmarks someone?

Page 21: Merb For The Enterprise
Page 22: Merb For The Enterprise

raw PHP: 331 rps

Page 23: Merb For The Enterprise

raw PHP: 331 rps

cake PHP: 3.6 rps / 8 rps (eaccelerator)

Page 24: Merb For The Enterprise

raw PHP: 331 rps

cake PHP: 3.6 rps / 8 rps (eaccelerator)

code igniter:21.5 rps / 98.2 rps (eaccelerator)

Page 25: Merb For The Enterprise

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 For The Enterprise

Railsis

pretty close to the fastest PHP framework.

Page 27: Merb For The Enterprise

what about merb?

Page 28: Merb For The Enterprise

hello world benchmarks

baseline results

Page 29: Merb For The Enterprise

apache serving static html:

hello.html

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

merb router: match("/hello world")

Page 30: Merb For The Enterprise

Merb Router Static HTML raw php

1995 req/s2898 req/s3783 req/s

http://merbist.com

Page 31: Merb For The Enterprise

$ 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 For The Enterprise

Ruby might be slow at fibonacci benchmarks

who cares?

Page 33: Merb For The Enterprise

Ruby is fast at real life web benchmarks

that’s what matters!

Page 34: Merb For The Enterprise

Ruby for the webis NOT slow

Page 35: Merb For The Enterprise
Page 36: Merb For The Enterprise

Enterprise

Page 37: Merb For The Enterprise

Enterprise

Enterprise needsenterprise software

Page 38: Merb For The Enterprise

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 For The Enterprise

Enterprise

enterprise problem !=

departmental problem

Page 40: Merb For The Enterprise

Enterprise

an enterprise problem covers problems from

many different departments

Page 41: Merb For The Enterprise

Enterprise

many different departmentsmeans

different needs/challenges

Page 42: Merb For The Enterprise

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 For The Enterprise

Enterprise

Enterprise Software Architecture

Page 44: Merb For The Enterprise

Enterprise

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

Page 45: Merb For The Enterprise

Enterprise

organization-specific software architecture

Page 46: Merb For The Enterprise

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 For The Enterprise

Enterprise

Elite

Page 48: Merb For The Enterprise

Enterprise

what about the not so large companies?

Page 49: Merb For The Enterprise

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 For The Enterprise

Enterprise

“complex development programming tools that

require specialist capabilities”.

Page 51: Merb For The Enterprise

Enterprise

Business Software Solutions Applications and Services

Page 52: Merb For The Enterprise

Enterprise

ABAP

NetWeaver

SAP system

ERPCRM

SRM

Page 53: Merb For The Enterprise

Enterprise

cost

adaptability

Concerns:

Page 54: Merb For The Enterprise

Enterprise

Does it scale?

Concerns:

Page 55: Merb For The Enterprise

Enterprise

loads of req/s

scalability

easily extendable

swap/extract parts

Page 56: Merb For The Enterprise

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

Page 57: Merb For The Enterprise

costopen source

free as in free speech

Page 58: Merb For The Enterprise

costruby

Great language - widely adopted - enjoyable momentum

Page 59: Merb For The Enterprise

Rubybet on

MacRuby

Rubinius

Page 60: Merb For The Enterprise

Rubybet on

MacRuby

Rubinius

Page 61: Merb For The Enterprise

costreusable

merb slices - mountable mini applications

Page 62: Merb For The Enterprise

costreusable merb slices

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

Page 63: Merb For The Enterprise

costsmooth transition

access your Java code directly from Merb

deploy your merb app like you deploy your java apps

Page 64: Merb For The Enterprise

cost

model the entire business enterprise

build common tools for common use

choose

Page 65: Merb For The Enterprise

adaptabilitybecause needs differ and change

Page 66: Merb For The Enterprise

adaptabilitymerb is truly modular

ORM JS libtesting

frameworktemplate engine

http://flickr.com/photos/

Page 67: Merb For The Enterprise

$ 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 For The Enterprise

$ merb-gen app app-name

merb stackMVC architecture

asset managementcaching

view helpersmailer

authenticationexceptions handler

Page 69: Merb For The Enterprise

pick and choose

adaptability

add/remove dependencies

Page 70: Merb For The Enterprise

pick and choose

adaptability

extendplugins - slices - API

Page 71: Merb For The Enterprise

pick and choose

adaptability

extend

replacebuild around merb core

Page 72: Merb For The Enterprise

scalability

see benchmarks

modularity

small memory footprint

Page 73: Merb For The Enterprise

sum up

Page 74: Merb For The Enterprise

merb is fast

Page 75: Merb For The Enterprise

merb is flexible

Page 76: Merb For The Enterprise

merb is modular

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

Page 77: Merb For The Enterprise

merb can be opinionated

Page 78: Merb For The Enterprise

merb ♥ recycling

Page 79: Merb For The Enterprise

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 For The Enterprise

C o n c l u s i o n

✓Cost

✓Adaptability

✓Scalability

merb meets the Enterprise needs

Page 81: Merb For The Enterprise

questions?