• Save
Rack Middleware
Upcoming SlideShare
Loading in...5
×
 

Rack Middleware

on

  • 8,906 views

These slides are taken from my talk titled "In a World of Middleware, Who Needs Monolithic Applications?" presented at MountainWest Ruby Conf 2009, held March 13-14 in Salt Lake City, UT.

These slides are taken from my talk titled "In a World of Middleware, Who Needs Monolithic Applications?" presented at MountainWest Ruby Conf 2009, held March 13-14 in Salt Lake City, UT.

Statistics

Views

Total Views
8,906
Views on SlideShare
5,499
Embed Views
3,407

Actions

Likes
22
Downloads
17
Comments
3

12 Embeds 3,407

http://blog.joncrosby.me 3344
http://feeds.feedburner.com 22
http://www.slideshare.net 17
http://www.techgig.com 10
http://pttpqpi.blogspot.com.es 3
http://static.slideshare.net 3
http://webcache.googleusercontent.com 2
http://dashboard.bloglines.com 2
http://static.slidesharecdn.com 1
http://vnue.vnuwebsitegenerator.nl.test.evident.nl 1
http://oracle.sociview.com 1
http://www.tumblr.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

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…
  • Should be downloadable.

    :-(
    Are you sure you want to
    Your message goes here
    Processing…
  • rack
    Are you sure you want to
    Your message goes here
    Processing…
  • Disabled download? Lame.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Rack Middleware Rack Middleware Presentation Transcript

  • Rack Middleware Tuesday, March 17, 2009
  • m/ Tuesday, March 17, 2009
  • NEED Tuesday, March 17, 2009
  • CHOICE Tuesday, March 17, 2009
  • Jon Crosby http://joncrosby.me Tuesday, March 17, 2009
  • CloudKit http://getcloudkit.com Tuesday, March 17, 2009
  • rack-contrib http://github.com/rack/rack-contrib Tuesday, March 17, 2009
  • Tuesday, March 17, 2009
  • Engine Yard Solo “The platform for on-demand management of your Ruby on Rails application in the cloud.” Tuesday, March 17, 2009
  • Free during HackFest Tuesday, March 17, 2009
  • Discount for Sign Up Tuesday, March 17, 2009
  • CGI Tuesday, March 17, 2009
  • app.cgi Tuesday, March 17, 2009
  • WARNING Tuesday, March 17, 2009
  • Contains Perl Tuesday, March 17, 2009
  • old skool perl cgi Tuesday, March 17, 2009
  • if ($cgi->param(‘action’) eq ‘all’) { my $sql = “select * from customer”; my $rows = $dbh->selectall_arrayref($sql); if (@$rows) { print “<table border=1>” . “<th>name</th>” . ... Tuesday, March 17, 2009
  • if ($cgi->param(‘action’) eq ‘all’) { my $sql = “select * from customer”; my $rows = $dbh->selectall_arrayref($sql); if (@$rows) { print “<table border=1>” . “<th>name</th>” . ... Tuesday, March 17, 2009
  • if ($cgi->param(‘action’) eq ‘all’) { my $sql = “select * from customer”; my $rows = $dbh->selectall_arrayref($sql); if (@$rows) { print “<table border=1>” . “<th>name</th>” . ... Tuesday, March 17, 2009
  • if ($cgi->param(‘action’) eq ‘all’) { my $sql = “select * from customer”; my $rows = $dbh->selectall_arrayref($sql); if (@$rows) { print “<table border=1>” . “<th>name</th>” . ... Tuesday, March 17, 2009
  • if ($cgi->param(‘action’) eq ‘all’) { my $sql = “select * from customer”; my $rows = $dbh->selectall_arrayref($sql); if (@$rows) { print “<table border=1>” . “<th>name</th>” . ... Tuesday, March 17, 2009
  • if ($cgi->param(‘action’) eq ‘all’) { my $sql = “select * from customer”; my $rows = $dbh->selectall_arrayref($sql); if (@$rows) { print “<table border=1>” . “<th>name</th>” . ... Tuesday, March 17, 2009
  • Monolith Tuesday, March 17, 2009
  • :-( Tuesday, March 17, 2009
  • Rails Tuesday, March 17, 2009
  • Merb Sinatra Mack Ramaze Waves Tuesday, March 17, 2009
  • Authentication Tuesday, March 17, 2009
  • Single Sign-On Tuesday, March 17, 2009
  • Caching Tuesday, March 17, 2009
  • Authentication Example: OpenID + OAuth Tuesday, March 17, 2009
  • Install Auth Plugin(s) Tuesday, March 17, 2009
  • Install Auth Plugin(s) Generate Controllers Tuesday, March 17, 2009
  • Install Auth Plugin(s) Generate Controllers Generate Models Tuesday, March 17, 2009
  • Install Auth Plugin(s) Generate Controllers Generate Models Generate Migrations Tuesday, March 17, 2009
  • Install Auth Plugin(s) Generate Controllers Generate Models Generate Migrations Modify Existing Controllers Tuesday, March 17, 2009
  • Install Auth Plugin(s) Generate Controllers Generate Models Generate Migrations Modify Existing Controllers Monkey Patch Rails Tuesday, March 17, 2009
  • :-( Tuesday, March 17, 2009
  • The Web Tuesday, March 17, 2009
  • Tuesday, March 17, 2009
  • HTTP Tuesday, March 17, 2009
  • Intermediaries HTTP Tuesday, March 17, 2009
  • Intermediaries App HTTP Tuesday, March 17, 2009
  • Intermediaries App HTTP Tuesday, March 17, 2009
  • Rack Tuesday, March 17, 2009
  • Tuesday, March 17, 2009
  • HTTP Tuesday, March 17, 2009
  • Intermediaries HTTP Tuesday, March 17, 2009
  • Middleware HTTP Tuesday, March 17, 2009
  • Middleware App HTTP Tuesday, March 17, 2009
  • Rack is the Web Tuesday, March 17, 2009
  • The Web is Rack Tuesday, March 17, 2009
  • WSGI Tuesday, March 17, 2009
  • SPEC Tuesday, March 17, 2009
  • lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • run lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • config.ru Tuesday, March 17, 2009
  • $ rackup config.ru Tuesday, March 17, 2009
  • $ curl http://localhost:9292 Tuesday, March 17, 2009
  • Hello Tuesday, March 17, 2009
  • class App def call(env) [200, {...}, [...]] end end Tuesday, March 17, 2009
  • SPEC Tuesday, March 17, 2009
  • $ rake SPEC Tuesday, March 17, 2009
  • Rack::Lint Tuesday, March 17, 2009
  • lambda { |env| [ 200, { ‘Content-Type’ => ‘text/plain’, ‘Content-Length’ => ‘5’ }, [‘Hello’] ] } Tuesday, March 17, 2009
  • env Tuesday, March 17, 2009
  • REQUEST_METHOD Tuesday, March 17, 2009
  • env[‘REQUEST_METHOD’] Tuesday, March 17, 2009
  • GET PUT POST DELETE HEAD OPTIONS TRACE Tuesday, March 17, 2009
  • PATH_INFO Tuesday, March 17, 2009
  • /items/123 Tuesday, March 17, 2009
  • HTTP_* Tuesday, March 17, 2009
  • HTTP_ACCEPT Tuesday, March 17, 2009
  • application/json Tuesday, March 17, 2009
  • rack.* Tuesday, March 17, 2009
  • rack.input (the input stream) Tuesday, March 17, 2009
  • #gets #each #read #rewind Tuesday, March 17, 2009
  • yournamespace.* Tuesday, March 17, 2009
  • request = Rack::Request.new(env) Tuesday, March 17, 2009
  • request.post? Tuesday, March 17, 2009
  • request.params[‘id’] Tuesday, March 17, 2009
  • request[‘HTTP_IF_MATCH’] Tuesday, March 17, 2009
  • m/ Tuesday, March 17, 2009
  • Middleware App HTTP Tuesday, March 17, 2009
  • use MiddlewareA use MiddlewareB use MiddlewareC run app Tuesday, March 17, 2009
  • class GoSlower def initialize(app) @app = app end def call(env) sleep(1) @app.call(env) end end Tuesday, March 17, 2009
  • class GoSlower def initialize(app) @app = app end def call(env) sleep(1) @app.call(env) end end Tuesday, March 17, 2009
  • class GoSlower def initialize(app) @app = app end def call(env) sleep(1) @app.call(env) end end Tuesday, March 17, 2009
  • class GoSlower def initialize(app) @app = app end def call(env) sleep(1) @app.call(env) end end Tuesday, March 17, 2009
  • class GoSlower def initialize(app) @app = app end def call(env) sleep(1) @app.call(env) end end Tuesday, March 17, 2009
  • rack-contrib http://github.com/rack/rack-contrib Tuesday, March 17, 2009
  • Rack::Profiler Tuesday, March 17, 2009
  • Rack::MailExceptions Tuesday, March 17, 2009
  • Rack::JSONP Tuesday, March 17, 2009
  • Rack::CSSHTTPRequest Tuesday, March 17, 2009
  • Rack::Cache http://github.com/rtomayko/rack-cache Tuesday, March 17, 2009
  • Rack::NotFound Tuesday, March 17, 2009
  • 404 Tuesday, March 17, 2009
  • Middleware App HTTP Tuesday, March 17, 2009
  • use MiddlewareA use MiddlewareB use MiddlewareC run app Tuesday, March 17, 2009
  • class App def call(env) [200, {...}, [...]] end end Tuesday, March 17, 2009
  • class GoSlower def initialize(app) @app = app end def call(env) sleep(1) @app.call(env) end end Tuesday, March 17, 2009
  • class GoSlower def initialize(app) @app = app end def call(env) sleep(1) @app.call(env) end end Tuesday, March 17, 2009
  • use MiddlewareA use MiddlewareB use MiddlewareC run app Tuesday, March 17, 2009
  • Middleware App HTTP Tuesday, March 17, 2009
  • Middleware App HTTP Tuesday, March 17, 2009
  • Cooperative Middleware Tuesday, March 17, 2009
  • URI Space Tuesday, March 17, 2009
  • /* Tuesday, March 17, 2009
  • /just-what-it-needs Tuesday, March 17, 2009
  • CloudKit Tuesday, March 17, 2009
  • Open Web JSON Appliance Tuesday, March 17, 2009
  • expose :notes, :todos Tuesday, March 17, 2009
  • expose :notes, :todos Tuesday, March 17, 2009
  • contain :notes, :todos Tuesday, March 17, 2009
  • use Rack::Pool::Session use CloudKit::OAuthFilter use CloudKit::OpenIDFilter use CloudKit::Service, :collections => [:notes, :todos] (run DefaultApp) Tuesday, March 17, 2009
  • CloudKit::OAuthFilter /oauth/* Tuesday, March 17, 2009
  • CloudKit::OpenIDFilter /login /logout /openid_complete Tuesday, March 17, 2009
  • CloudKit::Service /notes/* /todos/* Tuesday, March 17, 2009
  • ? Tuesday, March 17, 2009
  • Browser OAuth OpenID Service Tuesday, March 17, 2009
  • Browser OAuth OpenID Service Tuesday, March 17, 2009
  • Browser {...} OAuth OpenID Service Tuesday, March 17, 2009
  • Browser OAuth OpenID Service Tuesday, March 17, 2009
  • Browser OAuth OpenID Service {...} Login Tuesday, March 17, 2009
  • Browser OAuth OpenID Service Tuesday, March 17, 2009
  • Browser OAuth OpenID Service Tuesday, March 17, 2009
  • Browser OAuth OpenID Service Tuesday, March 17, 2009
  • Service or Desktop App OAuth OpenID Service Tuesday, March 17, 2009
  • Service or Desktop App OAuth OpenID Service Tuesday, March 17, 2009
  • Service or Desktop App {...} OAuth OpenID Service Tuesday, March 17, 2009
  • Service or Desktop App OAuth OpenID Service Tuesday, March 17, 2009
  • Service or Desktop App OAuth OpenID Service {...} Login Tuesday, March 17, 2009
  • Service or Desktop App OAuth OpenID Service Tuesday, March 17, 2009
  • Service or Desktop App OAuth OpenID Service Tuesday, March 17, 2009
  • Service or Desktop App OAuth OpenID Service Tuesday, March 17, 2009
  • Service or Desktop App OAuth OpenID Service Tuesday, March 17, 2009
  • Announcing Middleware Presence Tuesday, March 17, 2009
  • HTTP Via Tuesday, March 17, 2009
  • Via: 1.0 ricky, 1.1 ethel, 1.1 fred Tuesday, March 17, 2009
  • Via: 1.0 ricky, 1.1 ethel, 1.1 fred Tuesday, March 17, 2009
  • Via: 1.0 ricky, 1.1 ethel, 1.1 fred Tuesday, March 17, 2009
  • Via: 1.0 ricky, 1.1 ethel, 1.1 fred Tuesday, March 17, 2009
  • env[‘cloudkit.auth’] = 1 Tuesday, March 17, 2009
  • env[‘cloudkit.via’] << ‘cloudkit.filter.oauth’ Tuesday, March 17, 2009
  • env[‘cloudkit.via’] << ‘cloudkit.filter.openid’ Tuesday, March 17, 2009
  • env[‘cloudkit.user’] = ‘http://joncrosby.me’ Tuesday, March 17, 2009
  • Alternative Stacks Tuesday, March 17, 2009
  • Rack::Map Tuesday, March 17, 2009
  • map “/” do run Blog::Public end map “/db” do run Blog::DBAdmin end Tuesday, March 17, 2009
  • Rack::Map + Sinatra Tuesday, March 17, 2009
  • require ‘sinatra/base’ module Blog class Public < Sinatra::Base get ‘/’ do erb :index end end end Tuesday, March 17, 2009
  • require ‘sinatra/base’ module Blog class Public < Sinatra::Base get ‘/’ do erb :index end end end Tuesday, March 17, 2009
  • require ‘sinatra/base’ module Blog class Public < Sinatra::Base get ‘/’ do erb :index end end end Tuesday, March 17, 2009
  • require ‘sinatra’ for “apps” /* URI space Tuesday, March 17, 2009
  • require ‘sinatra/base’ MyClass < Sinatra::Base Minimal Sinatra (routing, rendering, etc.) Tuesday, March 17, 2009
  • m/ Tuesday, March 17, 2009
  • use MySinatraApp run SomeOtherApp Tuesday, March 17, 2009
  • Rack::Cascade Tuesday, March 17, 2009
  • app1 = lambda { ... } app2 = lambda { ... } run Rack::Cascade.new([app1, app2]) Tuesday, March 17, 2009
  • Sinatra as Middleware in Rails Tuesday, March 17, 2009
  • class X < Sinatra::Base get ‘/what’ do ‘what’ end end Rails::Initializer.run do |config| config.use.middleware ‘X’ end Tuesday, March 17, 2009
  • CloudKit in Rails Tuesday, March 17, 2009
  • Rails::Initializer.run do |config| config.use.middleware ‘CloudKit::Service’, :collections => [:notes, :todos] end Tuesday, March 17, 2009
  • Middleware App HTTP Tuesday, March 17, 2009
  • Middleware App Rails HTTP Tuesday, March 17, 2009
  • Middleware App Rails Merb HTTP Tuesday, March 17, 2009
  • Middleware App Rails Merb * HTTP Tuesday, March 17, 2009
  • New Unit of Composition Tuesday, March 17, 2009
  • m/ Tuesday, March 17, 2009