use strict; use warnings; use utf8; use lib 'lib'; use Plusen; my $p = Plusen->bootstrap({ config => { meta => { title => 'HTTP::Engine', author => 'Kazuhiro Osawa - ( Yappo )', email => 'yappo shibuya pl', }, plugins => [ { module => 'ScriptLoader::Simple' }, { module => 'Device::MozRepl', }, { module => 'Device::Term', }, { module => 'Device::Growl', }, # { module => 'Device::ControlFromFile', config => { path => '/tmp/devsumi-ctl.txt' } }, ], }, }); __DATA__ === title: who are yappo list: - at the Infomarks Corp. - 'PAUSE ID: YAPPO' - CodeRepos maintainer - It gets drunk. === title: and === title: 征夷大将軍 img: seiitaishougun.jpg === title: Attention for Japanese === title: SoozyConも次のtalkで最後になって、いよいよYAPC::Asiaが開幕します === title: 前夜祭もまだまだ時間あるので === title: ゆっくりしていってね!!! img: yukkuri.png === title: でもあまりゆっくりしすぎて21時過ぎても撤収できないと === title: すごい怒られるから21時までに会場閉められるように協力してね! === title: こんな人が怒っちゃうよ! === title: id:dropdb img: dropdb.png === title: talk start === title: "What's HTTP::Engine?" === title: HTTP::Engine is list: - WSGI on Perl, Rack on Perl - Simple - Poweful - no Pluggable ;-) - use Moose; - Catalyst::Engine + Cat::Req + Cat::Res - + WSGI Power + α === title: code code: | use HTTP::Engine; my $e = HTTP::Engine->new( interface => { module => 'ServerSimple', args => { port => 824242 }, request_handler => \&handler, } ); sub handler { my $c = shift; $c->res->body(Dumper($c->req); } === title: HTTP::Engine has not list: - Plugin - Hook Point - WSGI like Middleware === title: but list: - WSGI like Middleware layer is - HTTP::Engine::Middleware namespace - Middleware is uncool naming? - give me! cool name! === title: HTTP::Engine has list: - HTTP Server Interfaces - Request Object Builder - Response Manager - "MiddleWare's Manager" - some moose roles === title: Layer code: | +-------------------------------+ | Application | +-------------------------------+ | ↑ Middleware ↓ | +-------------------------------+ | ↑ Request | Response ↓ | | ↑ Builder | Writer ↓ | +-------------------------------+ | ↑ read API | write API ↓ | | Interface | +-------------------------------+ | HTTP Server | +-------------------------------+ === title: Interface is HTTP Server Driver === title: Catalyst::Engine::FastCGI = HTTP::Engine::Interface::FCGI === title: Middleware list: - App(Middle(Middle(HTTP::Engine))) - using add_around_method_modifier === title: code code: | use HTTP::Engine middlewares => [qw( DebugScreen ModuleReload )]; my $e = HTTP::Engine->new( interface => { module => 'ServerSimple', args => { port => 824242 }, request_handler => \&handler, } ); sub handler { "snip" } === title: very simple === title: Middleware functions only by this. === title: Middleware has two hook point list: - wrap - wrap is around to request_handler - setup - setup is Middleware setup phase - for create lazy attributes === title: Middleware wrap code code: | package HTTP::Engine::Middleware::ModuleReload; use Moose; use Module::Reload; sub wrap { my ($next, $rp, $c) = @_; Module::Reload->check; $next->($rp, $c); } 1; === title: Middleware setup code 1/2 code: | package HTTP::Engine::Middleware::MobileAttribute; use Moose; use HTTP::MobileAttribute; use HTTP::Engine::Request; sub setup { my $meta = HTTP::Engine::Request->meta; $meta->make_mutable; === title: Middleware setup code 2/2 code: | # $meta->add_attribute( mobile_attribute => ( is => 'ro', isa => 'Object', lazy => 1, default => sub { my $self = shift; $self->{mobile_attribute} = HTTP::MobileAttribute ->new($self->headers); }, )); $meta->make_immutable; }1; === title: HTTP::Engine want list: - new Interfaces... - (Danga::Socket xmpp stomp smtp) - '' - more Practicable Interfaces - (POE Standalone) - '' - Practicable and Excellent Middlewares - '' - more Documentation and testing... === title: now status list: - version 0.0.x is a concept release - 0.0.6 on CPAN (but no Moose) - use Class::Component Moosenize on CPAN - '' - use Moose on trunk now - as such, spec has decided - maybe === title: HTTP::Engine on the future list: - some company use - For instance, sponsor of YAPC::Asia :-) - '' - replaced from Sledge::Engine - replaced from Catalyst::Engine - '' - and import to Jifty - it works on weekend hackathon, maybe === title: development team code: | repository on CodeRepos.org #coderepos@freenode (japanese) #http-engine@irc.perl.org (official) committers yappo, tokuhirom, Daisuke Maki, hidek dann, nyarla, marcus gave knowledge mst, jesse, hanekomu, #catalyst-dev members miyagawa, kazuho, Topia, charsbar typester, hirose31 and more mongers === title: reference code: | http://svn.coderepos.org/share/docs/yappo /20080422-catalystcon1/catalystcon.pl http://svn.coderepos.org/share/lang/perl /HTTP-Engine http://coderepos.org/share/wiki /HTTP%3A%3AEngine http://http-engine.g.hatena.ne.jp/ and tag: http-engine === title: thank you.