Future Of Ruby And Rails

Preview:

DESCRIPTION

Presentation given to RailsSummit 2009 in Brazil. The presentation covers the plan for Rails3 and the different Ruby implementations.

Citation preview

Rails3uby

Matt Aim

onetti

Future

MIMme

Matt Aimonetti

“morally loose, cheese eating surrender monkey”Ted Han

+

=

FUTUREtime period commonly understood

to contain all events that have yet to occur.

RAILS 3the future of web development

E V O L U T I O N

A U D I E N C E

Rails

Merb

app developersentrepreneursdesigners

app developersenterpriseplugin authors

Rails 3

app developersentrepreneursenterpriseplugin authorsdesigners

A U D I E N C E

P R I N C I P L E S

Rails

Merb

programmer happinessstrong conventionsfluent design

app developersflexibilitymodularityspeed

P R I N C I P L E S

Rails 3

programmer happinessstrong conventionsfluent designflexibilitymodularityspeed

A T OM I C S T R U C T U R E

A T OM I C N U C L E U S

protonneutron

Rails 2

A T OM I C C L U S T E R

Rails 3

ActiveModel+ ORM

ActionPack

ActionWorker

ActiveSupport

Generators

ActiveResource

ActionMailer

Rack middlewares

Rails stack

NEW

R O U T E Rmatch ‘awesome/:action’

rack love

constraints/filters

constraints(:ip => /192\.168\.1\.\d\d\d/) do get 'admin', :to => "dashboard#index"end

Rack Apps intregration

Rack app intregration

namespace :facebook do use MyMiddleware match "/game", :to => SinatraApp end

mountable apps

rack entry point

class MyForum < Rails::Application

A C T I V EWO R K E R

push_queueThumbnailer.new(path, user, :action => :process)

background process

U N O B T R U S I V EJ A V A S C R I P T

html 5

html ❺ ‘data-*’ attributes

one js APIinterface for all libs

O RM AGN O S T I C I T Y

Active_Recordstill the default

ActiveRelation

common API

Datamapper

Legacy repository

multiple repository

queryoptimization

various datastores

Sequel

PreparedStatements Sharding

Highly customizable

SQLPerf

Couchrest/mongomapper/

your_ORMetc..

I N T E R N A LC L E A N U P

P E R F O RMANCE

hello world

render

partial

10 partials

collection of 10

103% 207% 310%

Rails 3/Ruby 1.9 benchmarked against Rails 2.3.x/Ruby 1.8.7

RAILS 3SPEED BOOST

3.02x

2.59x

2.88x

2.16x

2.44x

not final

hello world

render

partial

10 partials

collection

200% 400% 600% 800%

8x

4x

4.9x

3.38x

3.39x

6.27x

1.63x

1.18x

2.49x

2.78x

スピードアップ 1.9

Ruby 1.8 Ruby 1.9

jeremy

kemper

Ruby world 2009

RUBYfuture

Ruby

1.8.7

1.9.xIronRuby

JRubyMacRubyRubinius

2.0

Ruby 1.9.x

1.9.xbetter perf

better threadingfibers

official Rubyrecommended

RAILS 3BENCHMARKS

Ruby 1.8.6 REE 1.87 Ruby 1.9.1

hello world

render

partial

10 partials

collection of 10

-12% 7% 25% 43% 62% 80%

35%

77%

24%

55%

50%

6%

-2%

3%

-10%

17%

-6%

-12%

-10%

-3%

-4%

% faster than Ruby 1.8.7

not final

http://github.com/mattetti/rails-simple-benches

Ruby 2.0

not started

scalabilityperformancemaintenabiltymultiple VMs

selector namespacemethod combination

etc..

¿future?

IronRuby

0.9.1

.NET integrationVisualStudio 201?

SilverlightIIS web server

Microsoft

IronRubyVisualStudio 201?

better toolseven better integration

performance

¿future?

JRuby

1.4.0 RC1

java integrationnative threads

deploymentJVM

JRuby• java profiling/debugging tools•better integration (hibernate..)• .java file compilation•better integration (server,

mobile etc..)•performance

¿future?

MacRuby

0.5 RC1

Cocoa integrationAOT compilation

performanceGCD

Apple support & toolsOSX platform

MacRuby•iPhone•instrumentation•better dev tools•performance•standardized•linux•any C libs•C extensions

¿future?

biased

Rubinius

0.12ruby almost all the way

full introspectionC extensions

Rubinius

•AOT compiler•very powerful debugger•real time profiler•performance

¿future?

VOCÊyou