The Web That Was - The Promise and Decline of mod_perl
I talk about the strengths of the Apache C API and how mod_perl integrated with it. Unfortunately, I find perl is in decline, and I asked ChicagoRuby for advice on switching to Ruby.
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 11 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 12 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 13 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 14 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 15 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 16 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 17 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 18 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 19 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 20 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 21 Monday, January 21, 13
URI Translation - honor aliases • Map To Storage - where’s the file? • Header Parsing - e.g.: block certain browsers • Access Control - block by IP address, time of day • Authentication - who are you? • Authorization - what are you allowed to see • Mime-type - set response MIME type • Fixups - last-minute tweaks to env, etc. • RESPONSE - most of the work is done here • Logging - always happens • Cleanup - after client goes away - don’t keep it waiting 22 Monday, January 21, 13
$password) = $r->get_basic_auth_pw; return OK if authenticated($r, $dbh, $r->user, $password); return HTTP_UNAUTHORIZED; } sub authenticated { my ($r, $dbh, $login, $p) = @_; my $result = &Database::getRow($r, $dbh, "select p=crypt(?, pass) as ok from slUser where email=?", $p, $login); if ($result && $result->{ok}) { return 1; } return 0; } 30 Monday, January 21, 13