Perl入学式 全6回のPerl入門講座。東京、大阪、沖縄、札幌で開催。(東京は4月と10月スタート、それ以外は5月スタート) YAPC::Japan Perlを軸としたITに関わる全ての人のためのカンファレンス。 東京 吉祥寺.pm 五反田.pm 大阪 なにわPerl 沖縄 沖縄.pm
Tatsumakiを触ってみたいなあと思ったらなんかPSGI/Plackの迷路に入ってしまい、つぶやいてたらid:miyagawaさんが色々教えて下さったので、せっかくなのでまとめておきます。 教えてもらってない自分で調べたことも書いてるので、間違ってたらごめんなさい! PSGIとは WEBアプリとWEBサーバ間の仕様です。仕様はここ。WSGIやRackのPerl版です。レガシーな分け方で言えば、CGI(or mod_perl or FastCGI)の仕様の層になります。 Plackとは PSGIの仕様に関するリファレンス実装群です。 Plack(特にPlack::Server) PSGIサーバのリファレンス実装。レガシーな分け方で言えば、これはApache等の層。 Plack::Request(と、Plack::Response) PSGIアプリケーション用のユーティリティ。レガシーな分
plackを使ってみたの巻 PSGIだPlackだって某IRCチャンネルでお祭りをやっている最中金策に走っていたので、まださわっていなかったのですが、とりあえず練習でさわってみました。 http://github.com/lestrrat/GitPlack 結論からまず言います:WAFを作りたいんじゃなければとりあえずCatalystとか使っておけ。 私の見解は以下の通り: PSGI/Plackは統一された、しかも非同期エンジンを念頭に置いて考えられた仕様・実装なのでその点は素晴らしい。だけど、Plackはフレームワークではないし、とりあえずアプリを作る分には我々凡人は普通にフレームワークを使っておけばいい。・・・という感じ。 結果的には2時間くらいでWAFもどきとgitの情報を表示するアプリを作れたし、こういう仕様があるのは素晴らしい事です。 細かいところだけど難点はリスタートサーバーが
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. In the last couple of (or even more :) days Yuval and I have been endlessly discussing what the asynchronous response API would look like in PSGI applications. And that was also becoming one of the most frequently asked questions on my side, since many people from AnyEvent, POE and perlbal (Danga::Socket) land a
spiritlooseさんがPSGIなapacheモジュールを書いてくれたのでWindowsにポーティングしてみた。 mod_psgi を実装してみた - spiritlooseのはてなダイアリー PSGI を実装したApache2モジュール。 http://d.hatena.ne.jp/spiritloose/20091002/1254467284 ちょっと気持ち悪いpatchになるけど、一応動いている。 巷にあるライブラリなどではWindowsポーティングされた時にUN*Xライクな型を自前で定義している事があるんだけど、Apacheモジュールのapr.hなんかや、Perlなんかでuid_t/gid_t/pid_tなんかが定義されている事が多い。 apr.h typedef int uid_t; perl.h typedef long uid_t; もちろんこのヘッダを同時に読み込むとエ
PSGI is a Perl port of Python's WSGI and Ruby's Rack that defines a common interface between web servers and frameworks. Plack provides reference implementations of PSGI servers as well as middleware and utilities. This allows frameworks to run on many servers like standalone, FastCGI, and Apache using a common PSGI application interface. Plack is fast, supports many frameworks through adapters, a
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. Tatsuhiko Miyagawa / Plack-0.9000 - search.cpan.org Some yak have been shaved and the last minute bikeshed of renaming things in Plack::Builder was done, and now Plack and PSGI are uploaded to CPAN! Some server backends like AnyEvent, FCGI::EV, Coro, Danga::Socket, ReverseHTTP and ServerSimple are removed from t
【注意】2009年10月16日現在の情報です。 【追記】 初出時にあった configure.ac, Makefile の問題は修正されたため、記事内容も修正しました。 mod_psgi を試してみたのでメモしておきます。 Ubuntu 9.04 x86_64 Apache/2.2.11 (Ubuntu) Perl v5.10.0 built for x86_64-linux-gnu-thread-multi $ git clone git://github.com/spiritloose/mod_psgi.git $ cd mod_psgi $ autoconfconfigure が出来たので実行して make && make install. $ ./configure $ make # make installhttpd.conf に設定して LoadModule psgi_modu
サキとは彼女の自宅近く、湘南台駅前のスーパーマーケットで待ち合わせをした。彼女は自転車で後から追いつくと言い、僕は大きなコインパーキングへ車を停めた。煙草を一本吸ってからスーパーマーケットへ向かうと、ひっきりなしに主婦的な女性かおばあちゃんが入り口を出たり入ったりしていた。時刻は午後5時になる。時計から目を上げると、待たせちゃったわねと大して悪びれてない様子でサキが手ぶらでやってきた。 お礼に料理を作るとはいえ、サキの家には食材が十分足りていないらしく、こうしてスーパーマーケットに寄ることになった。サキは野菜コーナーから精肉コーナーまで、まるで優秀なカーナビに導かれるように無駄なく点検していった。欲しい食材があると、2秒間程度それらを凝視し、一度手に取ったじゃがいもやら豚肉やらを迷うことなく僕が持っているカゴに放り込んだ。最後にアルコール飲料が冷やされている棚の前へ行くと、私が飲むからとチ
http://github.com/spiritloose/mod_psgi PSGI を実装したApache2モジュール。 % make && make installでインストールできて、 LoadModule psgi_module modules/mod_psgi.so <Location /psgi> SetHandler psgi PSGIApp /path/to/app.psgi </Location> で動く。 がーっと書いたのでまだまだの部分が多いとはおもうけど、一通り実装できたと思う。 Plack::Test::Suite を使ったテストも書いた。 http://github.com/spiritloose/mod_psgi/blob/master/t/suite.t mod_perlのようにApacheの機能を提供する必要はなく、アプリケーションへはenvを渡せば い
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
Perl Web Server Gateway Interface 仕様に馴染んでみようと、CGI スクリプトから PSGI でコード・リファレンスを呼び出す CGI::Joint を試しに作ってみました。 run クラスメソッドにコード・リファレンスを渡します。run メソッドは標準入力、標準エラー出力、環境変数から PSGI 互換のハッシュ・リファレンスを作って、コード・リファレンスを呼び出します。コード・リファレンスが返す配列リファレンスをチェックして、ヘッダとボディを標準出力に書き出します。エラーを検出したとき、デフォルトではスタータス 500 でブランク同然の html をブラウザに返します。$CGI::Joint::FatalsToBrowser が真のときは、$EVAL_ERROR をブラウザに返します。 下のスクリプトを Apache の ExecCGI 属性がオンになって
Posted by nene2001 at 18:56 / Tag(Edit): perl PSGI / 0 Comments: Post / View / 0 TrackBack / Google Maps YAPCで覚えたPSGIを勉強してみた。 CPANからCatalyst、githubからPlack、Catalyst::Engine::PSGIをインストールして、 # catalyst.pl PSGITest # cd PSGITest # perl script/psgitest_create.pl PSGI # perl -Ilib ../Plack/scripts/plackup \ > --app script/psgitest.psgi --port 80 面白い。 でもこれって、サーバやWAFを問わない、InputFilterやOutputFilterにも
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. start_response = out Yesterday I asked if we should support optional start_response like Python's WSGI, and Yuval came in on this blog comment as well as #http-engine (irc.perl.org) to say No. Rather than just discussing what to do instead, we challenged him to implement the echo streaming server (that prints th
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 new spec draft is out: prefork getting faster and now we got decent Coro engine I've merged all the feedbacks and things we noticed during the Plack implementations back to the main PSGI spec draft and updated it. It has lots of answers to the common questions and gotchas when writing a new server implementation. It also has a big list of contributors! I updated Plack::Impl::Coro to now use t
んー、と思って、書いた。GitHub - kazuho/p5-http-parser-xs: a fast http parser BLURB は、 PSGI のリクエストオブジェクトを返す 高速 同期 httpd, 非同期 httpd のどちらを実装する際にも使用可能 POST コンテンツのハンドリングはご自分で いったんファイルに入れたり、いろいろ要件があるし、パース作業は発生しないので Perl でもあまり遅くならないため てな感じです。以下ベンチマーク。 $ ./http-parser-vs-xs-benchmark.pl Rate HTTP::Parser HTTP::Parser::XS HTTP::Parser 2978/s -- -95% HTTP::Parser::XS 54348/s 1725% --ベンチマークに使ったコードは、以下のとおり。 #! /usr/bin/
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. Lots of commits: Yappo made a native PSGI engine for nginx: this is amazing CGI.pm is now patched to support PSGI. the API is a little wacky: forces you to do local *ENV (because that's the easiest without touching a lot of code in CGI.pm) and $cgi->header return value would change in PSGI mode. Let's see how ma
今は時間取れないのでポインタだけ。 Blog PSGI - Perl WSGI - bulknews.typepad.com http://d.hatena.ne.jp/tokuhirom/20090904/1252091316 PSGIまとめ - Angelos in Action - angelosグループ Googleグループ: psgi-plack Googleグループ FAQ/SPEC GitHub - miyagawa/psgi-specs: Moved to https://github.com/plack/psgi-specs FAQ PSGI protocol specification リファレンス実装 PSGIRef Plack WAFアダプター Catalyst::Engine::PSGI CGI::Application::PSGI(建設予定地)
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く