IRC HTTP Stream in YAPC::Asia 2009

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    IRC HTTP Stream in YAPC::Asia 2009 - Presentation Transcript

    1. IRC HTTP Stream yusukebe YAPC::Asia 2009
    2. Want to see talks of the IRC! • But… • IRC port is not available here >< • Port forwarding ? • (既存の) Web proxy ? • Polling ?
    3. No.
    4. We are miyagawanized!
    5. それPla ( SOREPLA )
    6. use Plack with AnyEvent! Plack Async AnyEvent:: IRC IRC::Client HTTP
    7. use Plack::Loader; use AnyEvent; use AnyEvent::IRC::Client; my $impl = Plack::Loader->load( 'AnyEvent', port => 8080 ); my $cv = AnyEvent->condvar; my $pc = AnyEvent::IRC::Client->new;
    8. # Set and Start IRC Client! $cv->begin; $pc->reg_cb( irc_privmsg => sub { my ( $name, $msg ) = @_; $writer->write( $msg->{params}->[1] ); } ); $pc->send_srv( "JOIN", 'yapc.asia-ja' ); $pc->connect( "irc.freenode.net", 6667, { nick => 'nick', user => 'nick', real => 'nick' } ); $cv->end;
    9. # Run plack server $impl->run( sub { my ( $env, $start_response ) = @_; $writer = $start_response->( 200, [ 'Content-Type' => 'text/plain' ] ); $writer->write("IRC HTTP Stream!n"); return []; } ); $impl->run_loop;
    10. DEMO
    11. Test server is available(?) $ curl http://yapc-stream.pulpsite.net
    12. What does ‘それPla’ mean?
    13. If you wan to… • Make original Web Application Framework. • Make Async Web Server. • etc.
    14. Ask miyagawa-san “Do you know a good module?”
    15. Maybe, miyagawa-san says… Plack Author
    16. “Yes. Plack can.”
    17. 「それPlackで  できるよ」
    18. それPla ( SOREPLA )
    19. それPlack でできるよ Plack HACKS
    20. Special thanks to Tatsuhiko Miyagawa –san.

    + yusukebeyusukebe, 2 months ago

    custom

    897 views, 1 favs, 2 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 897
      • 556 on SlideShare
      • 341 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 3
    Most viewed embeds
    • 339 views on http://yusukebe.com
    • 2 views on http://hiroki.jp

    more

    All embeds
    • 339 views on http://yusukebe.com
    • 2 views on http://hiroki.jp

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?