タグ

Plackに関するtwodollarzのブックマーク (8)

  • ゆーすけべー日記

    サキとは彼女の自宅近く、湘南台駅前のスーパーマーケットで待ち合わせをした。彼女は自転車で後から追いつくと言い、僕は大きなコインパーキングへ車を停めた。煙草を一吸ってからスーパーマーケットへ向かうと、ひっきりなしに主婦的な女性かおばあちゃんが入り口を出たり入ったりしていた。時刻は午後5時になる。時計から目を上げると、待たせちゃったわねと大して悪びれてない様子でサキが手ぶらでやってきた。 お礼に料理を作るとはいえ、サキの家には材が十分足りていないらしく、こうしてスーパーマーケットに寄ることになった。サキは野菜コーナーから精肉コーナーまで、まるで優秀なカーナビに導かれるように無駄なく点検していった。欲しい材があると、2秒間程度それらを凝視し、一度手に取ったじゃがいもやら豚肉やらを迷うことなく僕が持っているカゴに放り込んだ。最後にアルコール飲料が冷やされている棚の前へ行くと、私が飲むからとチ

    ゆーすけべー日記
  • PSGI/Plack - Perl Superglue for Web Frameworks and Web Servers

    Superglue interface between perl web application frameworks and web servers, just like Perl is the duct tape of the internet. PSGI is an interface between Perl web applications and web servers, and Plack is a Perl module and toolkit that contains PSGI middleware, helpers and adapters to web servers. PSGI and Plack are inspired by Python's WSGI and Ruby's Rack. Documentation PSGI specification Freq

  • PSGI/Plack勉強会 - Kentaro Kuribayashi's blog

    PSGI/Plack勉強会を開きました(ひとりで)。資料はGitHubにあげてあります。いろいろまとめ書き足りてないのですが、自分的には納得したので満足してしまいました。 http://github.com/kentaro/psgi-study 以下にもコピペ。 PSGI/Plackとは? PSGI = Perl Web Server Gateway Interface Specification WebサーバとWebアプリケーションとの間のインタフェイス仕様 Plack = PSGIのリファレンス実装 PSGI実装のひとつ(とはいえ、やたら気合いの入った感じになってるけど) PSGI != Yet Another WAF PSGI != Plack PSGI策定の背景 各Webアプリケーションフレームワークがバラバラに実装していた、WebサーバとWebアプリケーションとのインタフェイスを

    PSGI/Plack勉強会 - Kentaro Kuribayashi's blog
  • Day 18: Load middleware conditionally

    I've introduced a couple of middleware components. Some of them are useful and could be enabled globally, while others might be better enabled on certain conditions. Today we'll talk about a solution to this. Load middleware conditionally Conditional middleware is a super (or meta) middleware that takes one middleware and enable that middleware based on a runtime condition. Let's take some example

  • Day 13: use Plack::Test to test your application

    Testing There are many ways to test web applications, either with a live server or using a mock request technique. Some web application frameworks allow you to write an unit test using one of those methods, but the way you write tests differ per framework of your choice. Plack::Test gives you an unified interface to test any web applications and frameworks that is compatible to PSGI using both moc

  • Day 12: Maps multiple apps with mount and URLMap

    Hello World! but anyone else? Throughout the advent calendar we most of the time use the simplest web application using the "Hello World" example, like my $app = sub { return [ 200, [], [ "Hello World" ] ]; }; what about more complex examples, like you have multiple applications, each of which inherit from one of the web application frameworks, and use one of apache magic like mod_alias etc. Plack

  • PSGI/Plackで非同期 Web Server - blog.nomadscafe.jp

    PSGI/Plackにおいて、非同期にレスポンスが返せるstreamingという仕様/機能が追加されました。 PSGI/Plack streaming is now complete これを使うと、streamingをサポートしたサーバから非同期/nonblockingにhttpやGearmanを利用して外部へ問い合わせを行い、その結果をレスポンスしたりできます。 また、これがPlackで既に実装済みなので、非常に短いコードでサーバの実装ができちゃいます。 すばらしいですね。 すでにmiyagawaさんが、この機能を利用した非同期Web Framework「Tatsumaki」を書かれています。 イベントを扱う部分が隠蔽されているので、これを使うとさらに簡単に実装できます。 すばらしすぐる。 ここでは、簡単に外部へAnyEvent::HTTPを用いて、HTTPリクエストを行うサンプルを書い

  • 「Plackで一発ネタは俺に任せろ!」バリバリ「やめて!」 : As Sloth As Possible

    タイトルからして既に残念な感じが漂ってるけど、前回の記事で言った通りPlackでアプリを作ってみようと試行錯誤中。ちなみにこないだサーバをApacheからnginxに変えたついでにHTTP::EngineのアプリもFastCGIで動かすようにしたので、PlackのアプリもFastCGIで動かしてみた。設定はこんな感じ。 # app.psgi use NetaKit::TweetProxy::App; use Plack::Builder; builder { #mount '/baritter' => builder { NetaKit::TweetProxy::App->new->to_app; #}; }; #!/usr/bin/env perl # bin/fcgi.pl use strict; use warnings; use File::Spec; use FindBin qw

    「Plackで一発ネタは俺に任せろ!」バリバリ「やめて!」 : As Sloth As Possible
  • 1