RailsConf 2011 Keynote
Upcoming SlideShare
Loading in...5
×
 

RailsConf 2011 Keynote

on

  • 3,961 views

this is my keynote for railsconf.

this is my keynote for railsconf.

Statistics

Views

Total Views
3,961
Views on SlideShare
3,725
Embed Views
236

Actions

Likes
3
Downloads
62
Comments
0

8 Embeds 236

http://en.oreilly.com 153
http://lanyrd.com 57
https://twimg0-a.akamaihd.net 11
http://mezura.com.br 7
http://twitter.com 3
https://twitter.com 3
http://us-w1.rockmelt.com 1
http://paper.li 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    RailsConf 2011 Keynote RailsConf 2011 Keynote Presentation Transcript

    • Before I Begin...Wednesday, May 18, 2011
    • @jonleightonWednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • I JoséWednesday, May 18, 2011
    • Double Dream Hands: SO INTENSEWednesday, May 18, 2011
    • ZOMG!!!Wednesday, May 18, 2011
    • HAPPYWednesday, May 18, 2011
    • RAILSWednesday, May 18, 2011
    • CONFWednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • Aaron PattersonWednesday, May 18, 2011
    • @tenderloveWednesday, May 18, 2011
    • AT&T, AT&T logo and all AT&T related marks are trademarks of AT&T Intellectual Property and/or AT&T affiliated companies.Wednesday, May 18, 2011
    • WWFMD?Wednesday, May 18, 2011
    • Richard Gabriel Guy Steele DHH Researcher Software Architect PartnerWednesday, May 18, 2011
    • Aaron Batalion Chad Dickerson Dan Melton CTO CTO CTOWednesday, May 18, 2011
    • Aaron Patterson Corey Haines Eric Ries Señor Software Corey Haines Venture Advisor EngineerWednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • LOLWUTWednesday, May 18, 2011
    • Señor Software EngineerWednesday, May 18, 2011
    • Señor Software EngineerWednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • AgendaWednesday, May 18, 2011
    • Agenda New Features Real Talk! Development Pro Tips™Wednesday, May 18, 2011
    • Implementation and thoughts on API design I will be very TECHNICALWednesday, May 18, 2011
    • Because my audience is smart I will be very CRITICAL Because I careWednesday, May 18, 2011
    • New Features!Wednesday, May 18, 2011
    • git log --since="1 year ago"Wednesday, May 18, 2011
    • API StrategyWednesday, May 18, 2011
    • rails generate VCWednesday, May 18, 2011
    • def halts?(function)Wednesday, May 18, 2011
    • Prepared StatementsWednesday, May 18, 2011
    • select * from users where id = 10Wednesday, May 18, 2011
    • select * from users where id = ?Wednesday, May 18, 2011
    • DATABASE RAILS APPWednesday, May 18, 2011
    • DATABASE Records RAILS APPWednesday, May 18, 2011
    • 4 Steps!Wednesday, May 18, 2011
    • DATABASE RAILS APPWednesday, May 18, 2011
    • DATABASE Token RAILS APPWednesday, May 18, 2011
    • DATABASE RAILS APPWednesday, May 18, 2011
    • DATABASE Records RAILS APPWednesday, May 18, 2011
    • 4 Steps!Wednesday, May 18, 2011
    • 2 Steps!Wednesday, May 18, 2011
    • ImpactWednesday, May 18, 2011
    • SQLite3Wednesday, May 18, 2011
    • SQLite3 Simple Prepared Statement 100.00 10.00 y = 8.556E-5e2.2868x y = 0.0002e2.187x 1.00 0.10 0.01 0.00 0.00 10 100 1000 10000 100000 Number of Queries Cached Trend 1 Non-Cached Trend 2Wednesday, May 18, 2011
    • 8665 q/s 12987 q/sWednesday, May 18, 2011
    • Δ 4322 q/sWednesday, May 18, 2011
    • SQLite3 Complex SQL Statement 1000 100 y = 0.0003e2.2227x y = 0.0029e2.3111x 10 1 0 0 0 10 100 1000 10000 100000 Cached Trend 1 Number of Queries Non-Cached Trend 2Wednesday, May 18, 2011
    • 339 q/s 4184 q/sWednesday, May 18, 2011
    • Δ 3845 q/sWednesday, May 18, 2011
    • PostgreSQLWednesday, May 18, 2011
    • PostgreSQL Simple Query 100.0 y = 0.0002e2.3018x y = 0.0004e2.1424x 10.0 1.0 0.1 0.0 0.0 10 100 1000 10000 100000 Cached Trend 1 Queries No Cache Trend 2Wednesday, May 18, 2011
    • 4662 q/s 5586 q/sWednesday, May 18, 2011
    • Δ 924 q/sWednesday, May 18, 2011
    • PostgreSQL Complex Query 1000 y = 0.0005e2.173x 100 y = 0.0047e2.2153x 10 1 0 0 0 10 100 1000 10000 100000 Queries Cached Trend 1 No Cache Trend 2Wednesday, May 18, 2011
    • 307 q/s 3322 q/sWednesday, May 18, 2011
    • Δ 3015 q/sWednesday, May 18, 2011
    • MySQLWednesday, May 18, 2011
    • MySQL Simple Query 100 10 1 0 0 0 10 100 1000 10000 100000 Cache No Cache QueriesWednesday, May 18, 2011
    • 6410 q/s 5154 q/sWednesday, May 18, 2011
    • Δ -1256 q/sWednesday, May 18, 2011
    • MySQL Complex SQL Query 1000 100 10 1 0 0 0 10 100 1000 10000 100000 Cached Category Title No CacheWednesday, May 18, 2011
    • 626 q/s 1198 q/sWednesday, May 18, 2011
    • Δ 572 q/sWednesday, May 18, 2011
    • No Query PlanningWednesday, May 18, 2011
    • Two Network RoundtripsWednesday, May 18, 2011
    • Problem?Wednesday, May 18, 2011
    • Problem?Wednesday, May 18, 2011
    • select updated_at from pirates [[#<Mysql::Time:2011-05-13 22:03:55>]] [["2011-05-13 22:03:55"]]Wednesday, May 18, 2011
    • select updated_at from pirates Prepared Statement [[#<Mysql::Time:2011-05-13 22:03:55>]] [["2011-05-13 22:03:55"]]Wednesday, May 18, 2011
    • select updated_at from pirates [[#<Mysql::Time:2011-05-13 22:03:55>]] Regular Statement [["2011-05-13 22:03:55"]]Wednesday, May 18, 2011
    • API ChangesWednesday, May 18, 2011
    • User.find 1Wednesday, May 18, 2011
    • User.find 1Wednesday, May 18, 2011
    • Serialized AttributesWednesday, May 18, 2011
    • class User < ActiveRecord::Base serialize :preferences endWednesday, May 18, 2011
    • Saves as YAML user = User.find 1 user.preferences = { :hello => world! } user.save!Wednesday, May 18, 2011
    • Why YAML?Wednesday, May 18, 2011
    • class User < ActiveRecord::Base serialize :preferences, Base64Encoder.new endWednesday, May 18, 2011
    • Base 64 Storage class Base64Encoder def load(value) return unless value value.unpack(m).last end def dump(text) [text].pack(m) end endWednesday, May 18, 2011
    • JSON Storage class JSONEncoder def load(value) return unless value JSON.load value end def dump(text) JSON.dump(text) end endWednesday, May 18, 2011
    • Marshal Storage class MarshalEncoder def load(value) return unless value Marshal.load value end def dump(text) Marshal.dump(text) end endWednesday, May 18, 2011
    • XML Storage class XMLEncoder def load(value) return unless value Nokogiri.XML value end def dump(doc) doc.to_xml end endWednesday, May 18, 2011
    • Official NoSQL SupportWednesday, May 18, 2011
    • ITS OFFI CIAL Official NoSQL ! SupportWednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • 2 CaveatsWednesday, May 18, 2011
    • PostgreSQL OnlyWednesday, May 18, 2011
    • You might hurt yourselfWednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • DO NOT DO THIS class User < ActiveRecord::Base class HStore def load value return unless value eval "{#{value}}" end def dump value return unless value value.map { |xs| xs.join => }.join , end end serialize :preferences, HStore.new endWednesday, May 18, 2011
    • BCrypt Coder class BCryptCoder def load(value) return unless value BCrypt::Password.new value end def dump(value) BCrypt::Password.create(value).to_s end endWednesday, May 18, 2011
    • BCrypt Serialization class User < ActiveRecord::Base serialize :crazy_column, BCryptCoder.new endWednesday, May 18, 2011
    • stdlib serialization API Dumping Loading YAML dump load JSON dump load Marshal dump loadWednesday, May 18, 2011
    • Storage type YOU choose Column nameWednesday, May 18, 2011
    • Good Abstractions yield Good FeaturesWednesday, May 18, 2011
    • CONSISTENCY is FREEDOM and FLEXIBILITYWednesday, May 18, 2011
    • has_secure_passwordWednesday, May 18, 2011
    • SECURITY! class User < ActiveRecord::Base has_secure_password endWednesday, May 18, 2011
    • SECURITY! user = User.find 1 user.password = lolwut user.save!Wednesday, May 18, 2011
    • Advantages Introduces a new method Saves password in `password_digest` Uses BCryptWednesday, May 18, 2011
    • Disadvantages API is not flexible Introduces a new method Saves password in `password_digest` Not Uses BCrypt reusableWednesday, May 18, 2011
    • GO GREEN!Wednesday, May 18, 2011
    • Write Something REUSABLE!Wednesday, May 18, 2011
    • response streaming Streaming chunked encoding ResponsesWednesday, May 18, 2011
    • Rack API class MyApp def call(env) [200, { X-ZOMG => hi }, [web page!]] end endWednesday, May 18, 2011
    • Rails 3.0.x class PoniesController def call(env) body << render(:content) body << render(:layout) [200, {}, body] end endWednesday, May 18, 2011
    • Delayed EvaluationWednesday, May 18, 2011
    • Body#eachWednesday, May 18, 2011
    • Rails 3.1.x class DelayedBody def each yield render(:layout) yield render(:content) end end class PoniesController def call(env) [200, {}, DelayedBody.new] end endWednesday, May 18, 2011
    • MiddlewareWednesday, May 18, 2011
    • Middleware ☹Wednesday, May 18, 2011
    • Middleware Chain Just consider connection Request Timer manager and application Connection Manager ApplicationWednesday, May 18, 2011
    • Middleware Chain Connection Manager ApplicationWednesday, May 18, 2011
    • Middleware Chain call(env) Connection Manager call(env) ApplicationWednesday, May 18, 2011
    • Middleware Chain [200, {}, body] Connection Manager [200, {}, body] ApplicationWednesday, May 18, 2011
    • Connection Manager When ERb is evaluated, db connection does not existWednesday, May 18, 2011
    • Connection Manager Open DB Connection When ERb is evaluated, db connection does not existWednesday, May 18, 2011
    • Connection Manager Open DB Connection When ERb is evaluated, db connection does not exist DelegateWednesday, May 18, 2011
    • Connection Manager Open DB Connection When ERb is evaluated, db connection does not exist Delegate Close DB ConnectionWednesday, May 18, 2011
    • Connection Manager Open DB Connection When ERb is evaluated, db connection does not exist Delegate Close DB Connection Return Delegate ValuesWednesday, May 18, 2011
    • Problem?Wednesday, May 18, 2011
    • Problem?Wednesday, May 18, 2011
    • Body#closeWednesday, May 18, 2011
    • Body Proxy class ConnectionBodyProxy def initialize(delegate) @delegate = delegate end def each(&blk) @delegate.each(&blk) end def close # CLOSE CONNECTION end endWednesday, May 18, 2011
    • Connection Manager class ConnectionManager def initialize(app); @app = app; end def call(env) # OPEN CONNECTION response = @app.call(env) response[2] = ConnectionBodyProxy.new(response[2]) response end endWednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • ~25 middlewareWednesday, May 18, 2011
    • Embrace DiversityWednesday, May 18, 2011
    • Types of Middleware Generators (our application) Filters (gzip, etc) Lifecycle Handlers (connection management)Wednesday, May 18, 2011
    • Real Talk!Wednesday, May 18, 2011
    • Rails is getting slowerWednesday, May 18, 2011
    • Time for N Requests Rails 2.3 Rails 3.0 100 10 1 0.1 0.01 10 100 1000 10000 RequestsWednesday, May 18, 2011
    • Avg Requests / time Rails 2.3 Rails 3.0 500 387.5 275 162.5 50 10 100 1000 10000 RequestsWednesday, May 18, 2011
    • Middleware IncreasedWednesday, May 18, 2011
    • /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby Total samples: 740 Rack garbage_collector Object#require Object#map ActiveRecord ConnectionAdapters Focusing on: 740 Runtime#call 0 (0.0%) 27 (3.6%) 165 0 (0.0%) SQLiteAdapter#execute 146 (19.7%) of 57 (7.7%) 1 (0.1%) of 463 (62.6%) Dropped nodes with <= 3 abs(samples) of 128 (17.3%) of 56 (7.6%) Dropped edges with <= 0 samples 463 118 74 62 Rails Rack Kernel#require Rails30 Application.method_missing Logger#call 0 (0.0%) 28 (3.8%) 60 0 (0.0%) of 62 (8.4%) of 463 (62.6%) of 63 (8.5%) 381 80 62 ActionDispatch Rails ShowExceptions#call Application#initialize! 0 (0.0%) 0 (0.0%) of 381 (51.5%) of 62 (8.4%) Rails Rack 381 Logger#after_dispatch 0 (0.0%) 62 17 of 80 (10.8%) ActionDispatch Object#run_initializers RemoteIp#call 0 (0.0%) 80 0 (0.0%) of 62 (8.4%) 60 of 382 (51.6%) ActiveSupport LogSubscriber.flush_all! 382 0 (0.0%) 60 of 80 (10.8%) Rails Rack Initializable Sendfile#call Initializer#run 0 (0.0%) 0 (0.0%) of 383 (51.8%) of 60 (8.1%) 383 60 ActionDispatch Object#instance_exec Callbacks#call 2 (0.3%) 2 (0.3%) of 60 (8.1%) of 383 (51.8%) 381 381 381 ActiveRecord ActionDispatch ConnectionAdapters Callbacks#_run_call_callbacks ConnectionManagement#call 0 (0.0%) 0 (0.0%) of 381 (51.5%) of 381 (51.5%) 375 ActiveRecord QueryCache#call 2 (0.3%) of 377 (50.9%) 372 375Wednesday, May 18, 2011 ActionDispatch
    • 230 230 230 219 219 ActionController Benchmark.ms ActionController Metal#cleanup_view_runtime Metal#render_to_string 0 (0.0%) 230 10 (1.4%) 0 (0.0%) of 230 (31.1%) of 230 (31.1%) of 219 (29.6%) 219 220 213 ActionController Benchmark.realtime Metal#render_to_body 0 (0.0%) of 220 (29.7%) 2 (0.3%) 424 of 213 (28.8%) 210 ActionController Metal#_render_template 0 (0.0%) of 210 (28.4%) 190 ActiveSupport Object#render Notifications.instrument 0 (0.0%) 0 (0.0%) of 190 (25.7%) of 322 (43.5%) 487 507 175 185 189 ActiveSupport Notifications Object#_render_template 167 Instrumenter#instrument 0 (0.0%) 2 (0.3%) 167 of 322 (43.5%) of 189 (25.5%) 18 ActionView Template#render 2 (0.3%) of 167 (22.6%) 148 155 Object#_app_views_layouts_application_html_erb___604422253_2164033400_0 0 (0.0%) of 148 (20.0%) 149 85 58 1 Object#stylesheet_link_tag Object#javascript_include_tag Object#_render_layout 0 (0.0%) 3 (0.4%) 6 (0.8%) of 85 (11.5%) of 58 (7.8%) of 155 (20.9%) 83 Object#expand_stylesheet_sources 0 (0.0%) of 83 (11.2%) 81 Object#collect_asset_files 81 (10.9%)Wednesday, May 18, 2011
    • work/Versions/1.8/usr/bin/ruby Rack Runtime#call 0 (0.0%) garbage_collector Object#require 27 (3.6%) 165 Object#map 0 (0.0%) ActiveRecord ConnectionAdapters SQLiteAdapter#execute 146 (19.7%) of 57 (7.7%) 1 (0.1%) of 463 (62.6%) of 128 (17.3%) of 56 (7.6%) 463 118 74 62 Rails Rack Kernel#require Rails30 Application.method_missing Logger#call 0 (0.0%) 28 (3.8%) 60 0 (0.0%) of 62 (8.4%) of 463 (62.6%) of 63 (8.5%) 381 80 62 ActionDispatch Rails ShowExceptions#call Application#initialize! 0 (0.0%) 0 (0.0%) of 381 (51.5%) of 62 (8.4%) Rails Rack 381 Logger#after_dispatch 0 (0.0%) 62 17 of 80 (10.8%) ActionDispatch Object#run_initializers RemoteIp#callWednesday, May 18, 2011 0 (0.0%) 80 0 (0.0%) 60
    • GC PressureWednesday, May 18, 2011
    • Stack Depth Rails 2.3 Rails 3.0 Rails 3.1 70 52.5 35 17.5 0 Stack DepthWednesday, May 18, 2011
    • Rails 2.3 StackWednesday, May 18, 2011
    • 51 deepWednesday, May 18, 2011
    • Rails 3.0 StackWednesday, May 18, 2011
    • 60 deepWednesday, May 18, 2011
    • Rails 3.1 StackWednesday, May 18, 2011
    • 67 deepWednesday, May 18, 2011
    • /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/implicit_render.rb:5:in `send_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/implicit_render.rb:5:in `send_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:150:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/rendering.rb:11:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:18:in `process_action /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:436:in `_run__84203013__process_action__199225275__callbacks /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:410:in `send /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:94:in `send /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:94:in `run_callbacks /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:17:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:30:in `process_action /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in `instrument /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/notifications/instrumenter.rb:21:in `instrument /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in `instrument /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:29:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/rescue.rb:17:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:119:in `process /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/rendering.rb:41:in `process /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal.rb:138:in `dispatch /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal.rb:178:in `action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in `dispatch /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:27:in `call /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148:in `call /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93:in `recognize /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:68:in `optimized_each /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92:in `recognize /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:493:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/head.rb:14:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/methodoverride.rb:24:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/params_parser.rb:21:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/flash.rb:182:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/cookies.rb:302:in `call /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:32:in `call /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:12:in `cache /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:31:in `call /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:46:in `call /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:416:in `_run_call_callbacks /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:44:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/sendfile.rb:107:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/remote_ip.rb:48:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/rack/logger.rb:13:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/runtime.rb:17:in `call /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/cache/strategy/local_cache.rb:72:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `synchronize /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/static.rb:30:in `call /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:168:in `call fuuu.rb:44 fuuu.rb:43:in `times fuuu.rb:43Wednesday, May 18, 2011
    • /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/implicit_render.rb:5:in `send_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/implicit_render.rb:5:in `send_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:150:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/rendering.rb:11:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:18:in `process_action /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:436:in `_run__84203013__process_action__199225275__callbacks /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:410:in `send /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:94:in `send /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:94:in `run_callbacks /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:17:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:30:in `process_action /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in `instrument TL;DR /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/notifications/instrumenter.rb:21:in `instrument /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in `instrument /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:29:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/rescue.rb:17:in `process_action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:119:in `process /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/abstract_controller/rendering.rb:41:in `process /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal.rb:138:in `dispatch /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_controller/metal.rb:178:in `action /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in `dispatch /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:27:in `call /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148:in `call /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93:in `recognize /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:68:in `optimized_each /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92:in `recognize /Library/Ruby/Gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:493:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/head.rb:14:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/methodoverride.rb:24:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/params_parser.rb:21:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/flash.rb:182:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/cookies.rb:302:in `call /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:32:in `call /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:12:in `cache /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:31:in `call /Library/Ruby/Gems/1.8/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:46:in `call /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:416:in `_run_call_callbacks /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:44:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/sendfile.rb:107:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/remote_ip.rb:48:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/rack/logger.rb:13:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/runtime.rb:17:in `call /Library/Ruby/Gems/1.8/gems/activesupport-3.0.7/lib/active_support/cache/strategy/local_cache.rb:72:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `call /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `synchronize /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/lock.rb:11:in `call /Library/Ruby/Gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/middleware/static.rb:30:in `call /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:168:in `call fuuu.rb:44 fuuu.rb:43:in `times fuuu.rb:43Wednesday, May 18, 2011
    • Embrace DiversityWednesday, May 18, 2011
    • We need a changeWednesday, May 18, 2011
    • Generators class Application def call(request, response) response.write(request, "hello", 200, {}) 10.times do |body| response.write(request, body) end response.close end endWednesday, May 18, 2011
    • Filters class Filter def initialize(filter) @filter = filter end def write(request, body, status = nil, headers = nil) @filter.write(request, body, status, headers) end def close @filter.close end endWednesday, May 18, 2011
    • Lifecycle Hooks class Handler def before(request) # Connect to database end def after(request) # Disconnect end endWednesday, May 18, 2011
    • Stack Depth Rails 2.3 Rails 3.0 Rails 3.1 Rails 3.2? 70 52.5 35 17.5 0 Stack DepthWednesday, May 18, 2011
    • Time for N Requests Rails 2.3 Rails 3.0 Rails 3.2? 100 10 1 0.1 0.01 10 100 1000 10000 RequestsWednesday, May 18, 2011
    • Avg Requests / time Rails 2.3 Rails 3.0 Rails 3.2? 650 500 350 200 50 10 100 1000 10000 RequestsWednesday, May 18, 2011
    • git log --until="1 year from now"Wednesday, May 18, 2011
    • Important things to me We Must ChangeWednesday, May 18, 2011
    • SpeedWednesday, May 18, 2011
    • MemoryWednesday, May 18, 2011
    • Stack DepthWednesday, May 18, 2011
    • Backwards CompatWednesday, May 18, 2011
    • Development Pro Tip™Wednesday, May 18, 2011
    • Wednesday, May 18, 2011
    • Final WordsWednesday, May 18, 2011
    • We will not Rails will be here forever outlive us A Message for Encourage refactoring Stop "yes Rails-Core men"Wednesday, May 18, 2011
    • Not all features are TangibleWednesday, May 18, 2011
    • Good Abstraction yield Reusable CodeWednesday, May 18, 2011
    • Reusable Code yield New FeaturesWednesday, May 18, 2011
    • Your Homework:Wednesday, May 18, 2011
    • GO GREEN!Wednesday, May 18, 2011
    • Refactor Rails!Wednesday, May 18, 2011
    • GO FORTH AND CODE!Wednesday, May 18, 2011
    • THANKS!Wednesday, May 18, 2011
    • QUESTIONS?Wednesday, May 18, 2011