- High-level what is PSGI: - Interface between web app and web server. - a specification (not code) - Why care about understanding PSGI when you can just use a high-level language. - Alternatives: CGI, mod_perl, FCGI, SCGI, WSGI (Python), JSGI (JS), Rack (Ruby), ISAPI (IIS) - Describe how CGI, mod_perl, and FCGI work. PSGI is easy. RFC 3875 (CGI 1.1) is 36 pages. The PSGI spec is shorter and much more consumable. Overview of HTTP? Implementations: - Plack - Alternatives: Paste (Python), - Rack-compliant: Rack (Ruby), Clack (Common Lisp) Benefits of PSGI: - Web frameworks only need to target PSGI. - Easy to write tests because requests and responses are data, not necessarily bytestreams. - What frameworks support PSGI? - [Catalyst](http://www.catalystframework.org/) - [Mojolicious](http://mojolicious.org/) - [Dancer](http://perldancer.org/) - [CGI::Ex](https://github.com/chazmcgarvey/CGI-Ex/tree/psgi-2) - What handlers does plack support? - What types of things should be written as middleware?