Rack (web server interface)
Encyclopedia
Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware
) into a single method call.
Rack is available as a Ruby Gem
.
Rack has already inspired a JavaScript framework (jackjs) and a Perl one (Plack
), and resulted in the Ruby developer quasi-standard of "rack-compliant".
syntax:
There is a Rack IRC channel #rack at Freenode.
Middleware
Middleware is computer software that connects software components or people and their applications. The software consists of a set of services that allows multiple processes running on one or more machines to interact...
) into a single method call.
Rack is available as a Ruby Gem
RubyGems
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries , a tool designed to easily manage the installation of gems, and a server for distributing them. It is analogous to EasyInstall for the Python programming...
.
Rack has already inspired a JavaScript framework (jackjs) and a Perl one (Plack
Plack (software)
Plack is a set of tools for running Perl-based Web applications and frameworks compatible with the PSGI specification.Plack was inspired by Rack for Ruby and Paste for Python.Plackup is a command-line tool for running the PSGI applications,...
), and resulted in the Ruby developer quasi-standard of "rack-compliant".
Example Application
A Rack-compatible "Hello World" application in RubyRuby (programming language)
Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...
syntax:
See also
- Python WSGIWSGIThe Web Server Gateway Interface defines a simple and universal interface between web servers and web applications or frameworks for the Python programming language.-Idea:...
- Perl Web Server Gateway InterfacePSGIPSGI or Perl Web Server Gateway Interface is an interface between Web servers and Perl-based Web applications and frameworks that allows writing portable applications that can be run as standalone servers or using CGI, FastCGI, mod_perl, et al...
- Python PastePython PastePython Paste, often simply called paste, is a set of utilities for web development in Python. Paste has been described as "a framework for web frameworks".-Python Paste:...
- Smalltalk Seaside
- FastCGIFastCGIFastCGI is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier Common Gateway Interface ; FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page...
- Java ServletJava ServletA servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by Web servers...
- Server-side JavaScriptServer-side JavaScriptServer-side JavaScript refers to JavaScript that runs on the server-side. This term was coined because the language is predominantly used on the client-side, i.e. client-side JavaScript ....
- Apache JServ ProtocolApache JServ ProtocolThe Apache JServ Protocol is a binary protocol that can proxy inbound requests from a web server through to an application server that sits behind the web server. It also supports some monitoring in that the web server can ping the application server...
- zeroc ICEInternet Communications EngineThe Internet Communications Engine, or Ice, is an object-oriented middleware that provides object-oriented Remote Procedure Call, grid computing and Publish/subscribe functionality developed by ZeroC and dual-licensed under the GNU GPL and a proprietary license...
- Cisco EtchEtch (protocol)Etch is an open source, cross-platform framework for building network services, first announced in May 2008 by Cisco Systems. Etch encompasses a service description language, a compiler, and a number of language bindings...
- ISAPIISAPIThe Internet Server Application Programming Interface is an N-tier API of Internet Information Services , Microsoft's collection of Windows-based web server services...
Internet Server Application Programming Interface (Microsoft)
External links
- RubyForge: Rack Project Summary
- Rack wiki
- Rack documentation
- Rack at Google Groups
- Rack-compliant applications
- Thin Ruby web server
- The introductory blog post
- Yehuda Katz on Rack
- Rack coding contest
- jackjs, a JavaScript clone of Rack
There is a Rack IRC channel #rack at Freenode.