Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
205 lines (157 sloc) 16.7 KB
<meta equiv="Cotent-Type" content="text/html;charset=utf-8"/>
<link rel="alternate" type="application/atom+xml" title="Atom" href="" />
<title>PSGI/Plack - Perl Superglue for Web Frameworks and Web Servers</title>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-52226-5");
} catch(err) {}</script>
<link rel="stylesheet" href=""/>
body { font-size: 1.0em; background: #fff }
a, a:hover { color: #000 }
h1 { font-size: 3em; margin-bottom: 0 }
p.tagline { color: #888; padding-bottom: 2em; font-size: 0.9em }
p.quote { padding-bottom: 0 }
p.quoted { text-align: right; padding: 0; font-style: italic; padding-bottom: 1em; font-size: 0.8em }
pre.code { background: #222; color: #ddd; font-size: 1.2em; padding: 1em }
<div class="container">
<p class="tagline">Superglue interface between perl web application frameworks and web servers, just like Perl is the duct tape of the internet.</p>
<p>PSGI is an <strong>interface</strong> between Perl web applications and web servers, and Plack is a Perl module and <strong>toolkit</strong> that contains PSGI middleware, helpers and adapters to web servers.</p>
<p>PSGI and Plack are inspired by Python's <a href="">WSGI</a> and Ruby's <a href="">Rack</a>.</p>
<h2 id="documentation">Documentation</h2>
<li><a href="">PSGI specification</a></li>
<li><a href="">Frequently Asked Questions</a></li>
<li><a href="">Plack documentation</a></li>
<h2 id="installation">Get Started</h2>
<p class="inline">Install <a href="">cpanminus</a> and then run the following command to install Plack and uility modules.</p>
<pre class="code">$ cpanm Task::Plack</pre>
<h2 id="testimonials">What People Say</h2>
<p class="quote">&quot;I love this... I think it's exactly the right answer to what I was looking for, for a really simple webapp.&quot;</p><p class="quoted">-Benjamin Trott, CTO and Co-founder of Six Apart</p>
<p class="quote">&quot;Wow, this is nothing short of awesome. A big ++ to the entire PSGI/Plack team!&quot</p><p class="quoted">-Stevan Little, Infinity Interactive, Moose author</p>
<p class="quote">&quot;This is something we've needed for a long time: a clean and simple way to respond to HTTP requests without the cruft of CGI&quot;</p><p class="quoted">-Yuval Kogman, Infinity Interactive, KiokuDB developer</p>
<p class="quote">&quot;PSGI (is) an absurdly simple, manifestly beautiful specification for an interface between Perl web apps and web servers.&quot; </p><p class="quoted">-Patrick Donelan, WebGUI developer</p>
<p class="quote">&quot;Thanks for including us! We're very excited about a future where we don't have to worry about web server support&quot;</p><p class="quoted">-Jonathan Swartz, Mason author</p>
<p class="quote">&quot;I \N{HEAVY BLACK HEART} PSGI.&quot;</p><p class="quoted">-Simon Cozens, the author of Advanced Perl Programming</p>
<p class="quote">&quot;miyagawa++ # fucking awesome&quot;</p><p class="quoted">-Matt S Trout, Shadowcat Systems, Catalyst and DBIx::Class developer</p>
<h2 id="repositories">Repositories</h2>
<li><a href="">PSGI specifications</a></li>
<li><a href="">Plack core</a></li>
<h2 id="servers">Servers</h2>
<dt><a href="">Plack</a> (web server adapters)</dt>
<dd>Plack core includes a CGI runner (for running any PSGI application as a CGI script), a FastCGI daemon and mod_perl handlers for Apache1 and 2.</dd>
<dt><a href="">HTTP::Server::PSGI</a></dt>
<dd>HTTP::Server::PSGI is a reference PSGI standalone web server implementation and is included in the Plack core distribution.</dd>
<dt><a href="">HTTP::Server::Simple::PSGI</a></dt>
<dd>HTTP::Server::Simple::PSGI is based on HTTP::Server::Simple and has zero dependency other than HTTP::Server::Simple, which itself doesn't have any dependencies. This is best for embedding to build a standalone web server or dependency free frameworks.</dd>
<dt><a href="">Starman</a></dt>
<dd>Starman is a high-performance, preforking and PSGI compatible HTTP server that has unique features such as HTTP/1.1 support, multiple interfaces support including UNIX domain sockets, graceful restarts and dynamic worker pool configuration via signals.</dd>
<dt><a href="">Twiggy</a></dt>
<dd>Twiggy is an AnyEvent based non-blocking (asynchronous) and lightweight PSGI web server. Best to run AnyEvent based web applications to implement long-poll, server push or WebSockets etc., such as the one built on top of the <a href="">Tatsumaki</a> framework.</dd>
<dt><a href="">Corona</a></dt>
<dd>Corona is a Coro based PSGI web server that supports coroutines (cooperative threads) for each socket and clients. Best to use with AnyEvent or Coro friendly non-blocking web applications such as Continuity or Tatsumaki framework</dd>
<dt><a href="">Feersum</a></dt>
<dd>Feersum is an HTTP server built on <a href="">EV</a>/<a href="">libev</a>. Feersum uses a single-threaded, event-based programming architecture to scale and can handle many concurrent connections efficiently in both CPU and RAM.</dd>
<dt><a href="">Starlet</a></dt>
<dd>Kazuho Oku's Starlet is based on the reference HTTP::Server::PSGI web server but adds a support for preforking, graceful restarts, shutdown and hot deploy via Server::Starter. This software was formerly called PSSPSS.</dd>
<dt>Misc. HTTP server adapters</dt>
<dd>There are many Perl web servers and adapters on CPAN and Plack handlers for them, to run PSGI applications on <a href="">FCGI::EV</a>, <a href="">Danga::Socket</a>, <a href="">AnyEvent::HTTPD</a>, <a href="">SCGI</a>, <a href="">AnyEvent::SCGI</a> and <a href="">POE</a>. They are available as separate distributions.</dd>
<dt><a href="">ReverseHTTP</a></dt>
<dd>ReverseHTTP server allows you to run a PSGI application on your desktop or inside the firewall but allows external access via <a href=""></a> gateway.</dd>
<dt><a href="">uWSGI</a></dt>
<dd>uWSGI is a C based developer friendly WSGI server. From the 0.9.5 release it include a plugin technology to add support for other languages, which includes an embedded PSGI handler.</dd>
<dt><a href="">mod_psgi</a></dt>
<dd>mod_psgi is an Apache2 module that runs PSGI applications using an embedded Perl interpreter. Developed by Jiro Nishiguchi</dd>
<dt><a href="">evpsgi</a></dt>
<dd>evpsgi is an <a href="">evhttp</a> based http server that runs PSGI applications with the embedded Perl interpreter. Developed by Masayoshi Sekimura</dd>
<dt><a href="">Perlbal</a></dt>
<dd><a href="">Perlbal::Plugin::PSGI</a> allows you to run PSGI applications on Perlbal. Note that because Perlbal runs in a non-blocking event loop (Danga::Socket), your application is also <strong>not supposed to block</strong>. If your application blocks (with database acesss or network I/O), do not use this plugin and instead run your PSGI application with the prefork Plack server and reverse proxy to the backend as usual.</dd>
<dt><a href="">nginx embedded perl</a></dt>
<dd><a href="">Kazuhiro Osawa's nginx patches</a> allows you to run PSGI applications on a Perl interpreter embedded <strong>inside</strong> nginx. This patch is considered <strong>highly experimental and not recommended</strong> for the production use. You're recommended to run your (possibly blocking) PSGI application with prefork/fastcgi servers and put nginx in front, and in that case you don't need this patch.</dd>
<!-- dt><a href="">HTTP::Server::Fast</a></dt>
<dd>HTTP::Server::Fast is a complete XS-based HTTP daemon to run PSGI applications, written by Tokuhiro Matsuno.</dd -->
<h2 id="frameworks">Frameworks</h2>
<dt><a href="">Catalyst</a></dt>
<dd>Catalyst is one of the most popular web application frameworks in Perl and has a support for PSGI through <a href="">Catalyst::Engine::PSGI</a>. There's also <a href="">psgi branch</a> on Catalyst core to use PSGI by default.</dd>
<dt><a href="">Jifty</a></dt>
<dd>Jifty is a full-stack Perl web application framework that comes with continuations, form-based dispatch, ORM and A Pony. Jifty has replaced much of its internals with Plack modules.</dd>
<dt><a href="">CGI::Application</a></dt>
<dd>CGI::Application is a lightweight web framework. Any CGI::Application based applications can run as a PSGI application using <a href="">CGI::PSGI</a> and <a href="">CGI::Application::PSGI</a>.</dd>
<dt><a href="">HTTP::Engine</a></dt>
<dd>HTTP::Engine is a micro web application framework and is a &quot;father of PSGI/Plack&quot; since we owe lots of code and ideas. HTTP::Engine itself now has PSGI Interface support as an adapter since 0.03 on CPAN.</dd>
<dt><a href="">Dancer</a></dt>
<dd>Dancer is a Sinatra-like micro web application framework and has supported PSGI since version 0.9904.</dd>
<dt><a href="">Mason</a></dt>
<dd>Mason allows you to embed code in HTML templates and can now run on any PSGI supported web server using <a href="">HTML::Mason::PSGIHandler</a></dd>
<dt><a href="">Squatting</a></dt>
<dd>Squatting is a Camping-inspired Web Microframework and has a support for PSGI through <a href="">Squatting::On::PSGI</a>.</dd>
<dt><a href="">Continuity</a></dt>
<dd>Continuity is a Coro based web application libary that supports Continuations to build statefull applications and support PSGI via Coro server since version 1.1.1 on CPAN.</dd>
<dt><a href="">Maypole</a></dt>
<dd>Maypole is a Struts-inspired MVC web application frameworks built on top of Class::DBI ORM. Maypole applications can run as PSGI applications using <a href="">Maypole::PSGI</a>.</dd>
<dt><a href="">Tatsumaki</a></dt>
<dd>Tatsumaki is a web application framework built on top of Plack and AnyEvent: natively supports non-blocking I/O through psgi.streaming and psgi.nonblocking, non-blocking HTTP clients, long-poll Comet services and server push.</dd>
<dt><a href="">Mojolicious</a></dt>
<dd>Mojolicious is Merb and Sinatra inspired web framework and has zero dependencies to non-core Perl modules. It has a native PSGI adapter since 0.999920 on CPAN.</dd>
<dt>Other frameworks</dt>
<dd>There are lots of other individual frameworks that supports PSGI and Plack. Some of them are not available on CPAN but are developed on github: <a href="">Web::Simple</a>, <a href="">Angelos</a>, <a href="">Ark</a>, <a href="">Schenker</a>, <a href="">Noe</a>, <a href="">Kamui</a> and <a href="">WebNano</a>.</dd>
<h2 id="applications">Applications</h2>
<dt><a href="">WebGUI</a></dt>
<dd><a href="">Patrick Donelan</a> is working on <a href="">Plack support for WebGUI</a> on <a href="">his github repo</a>.</dd>
<h2 id="middlewares">Middleware and Utilities</h2>
<dt><a href="">CGI::PSGI</a></dt>
<dd> subclass to handle PSGI env hash to provide a interface. Very useful to migrate web application frameworks to the PSGI interface.</dd>
<dt><a href="">Plack::Request</a></dt>
<dd>Plack::Request and Plack::Response is a simple wrapper around PSGI environment hash and response array to access those values using an Object oriented API.</dd>
<dt><a href="">IO::Handle::Util</a></dt>
<dd>Utility module to create an IO::Handle-like object instantly with a simple interface.</dd>
<dt><a href="">HTTP::Parser::XS</a></dt>
<dd>Super fast XS-based PSGI compatible HTTP header parser, used in many Plack server implementations.</dd>
<dt><a href="">CGI::Emulate::PSGI</a></dt>
<dd>Run any CGI scripts (whether it uses or not) as a PSGI application by emulating a CGI environment. It does the opposite of CGI runner PSGI server impementation (Plack::Server::CGI). Also take a look at <a href="">CGI::Compile</a> which compiles an existing CGI scripts into a callable subroutine reference, best to be used with CGI::Emulate::PSGI.</dd>
<h2 id="slides">Slides and Blog Posts</h2>
<p class="inline">Note that some materials and technical details might be outdated.</p>
<dt><a href="">Plack Blog</a></dt>
<dd>Reblogging blog posts about PSGI and Plack</dd>
<dt><a href="">Plack Advent Calendar</a></dt>
<dd>24 days of Tips and tricks for PSGI and Plack</dd>
<dt><a href="">Plack: Superglue for Perl web frameworks and servers</a><dt>
<dd>Tatsuhiko Miyagawa at O'Reilly OSCON, July 2010</dd>
<dt><a href="">PlebGUI: WebGUI meets Plack</a></dt>
<dd>Patrick Donelan writes a good introduction for PSGI and Plack from the web application developers point of view.</dd>
<dt><a href="">I finally get PSGI and Plack!</a></dt>
<dd>Simon Cozens writes a great post about what PSGI is, by comparing it with HTTP::Engine.</dd>
<dt><a href="">Tatsumaki, Plack based non-blocking framework</a></dt>
<dd>Tatsuhiko Miyagawa explains psgi.streaming interface to enable asynchronous requests in web frameworks. Screencast in Japanese is also <a href="">available</a>.</dd>
<dt><a href="">PSGI/Plack</a></dt>
<dd>Tokuhiro Matsuno and Tatsuhiko Miyagawa at YAPC::Asia 2009 (Japanese).</dd>
<h2 id="community">Community</h2>
<p>Tatsuhiko Miyagawa's <a href="">blog</a> and delicious bookmarks (<a href="">PSGI</a> and <a href="">Plack</a>) have a lot of updated information and links to PSGI/Plack related entries. We're chatting on <a href="irc://">#plack on</a> and have a low-traffic <a href="">mailing list</a>.
<div id="footer">
The PSGI spec and Plack are written by <a href="">Tatsuhiko Miyagawa</a> and many contributors.<br/>Source code for this site is available on <a href="">github</a>.