Rack: a Ruby Webserver Interface

5 hypes hype it

Rack provides an minimal interface between webservers supporting Ruby and Ruby frameworks.

Introduction

Dabbling in my own web framework experiments, I noticed that there is a lot of code duplication among frameworks since they essentially all do the same things. And still, every Ruby web framework developer is writing his own handlers for every webserver he wants to use. Hopefully, the framework users are satisfied with that choice.

However, in essence, dealing with HTTP is rather easy. In the end, you get a request and return a response. Let’s do the easiest thing possible: The canonical format of a HTTP request probably is a hash of a CGI-like environment (that’s what most frameworks I’ve looked at deal with, internally), and a response consists of three parts: a status, a set of headers, and a body.

Supported Handlers

* Rack::Handler::Mongrel (also with Swiftcore's evented_mongrel, just require it before Rack.)
* Rack::Handler::WEBrick
* Rack::Handler::FastCGI
* Rack::Handler::CGI
* Fuzed

Supported Adapters

* Rack::Adapter::Camping
* Ramaze
* Sinatra
* Coset
* Racktools::SimpleApplication

Blurb

Personifi uses Rack cause we like it's elegant design, speed and fast turn around time. With Rack we serve billions of requests per month. It makes our life good!
—Armin Roehrl, Lead Engineer of Personifi

comments Kommentare   addto Link hinzufügen  report als Spam markieren

T3N, das Magazin für Open Source und Webentwicklung.
Jahresabo inkl. Open-Source-Tasche nur 35 Euro.
Jetzt bestellen!

- Anzeige-