Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Brooklyn - Small web tool

Brooklyn - Small web tool

Brooklyn is a small (~300 LOC) rack-based application builder. Was made as proof of concept that fast and small code can still work.

Presented as RubyConf Argentina Lighting talk.

Luis Lavena

December 02, 2013
Tweet

More Decks by Luis Lavena

Other Decks in Programming

Transcript

  1. Drama Need for speed (fewer allocs/req) Less Ruby magic No

    backward compatibility Small codebase No code is faster than no code
  2. Reference: Rack class HelloWorld def call(env) [ 200, {"Content-Type" =>

    "text/html"}, ["Hello World!"] ] end end run HelloWorld.new
  3. Performance Rack: 7637 req/sec (1.0x) Sinatra: 2712 req/sec (0.35x) Brooklyn:

    5827 req/sec (0.76x) github.com/luislavena/bench-micro
  4. Again Rack-powered (use middlewares) No code is faster than no

    code Less ruby magic Code you can understand (in 10 minutes)