Plack is a superglue for Perl web frameworks that provides a common interface called PSGI (Perl Server Gateway Interface). PSGI allows any web application that returns status, headers, and content to work with any PSGI-compliant web server without needing server-specific code. Plack provides middleware, servers, and tools to develop and run PSGI applications. It allows frameworks like Catalyst, Da
bulknews.typepad.com Tatsuhiko Miyagawa's blog to discuss mostly tech and nerdy stuff. Tatsuhiko Miyagawa / Tatsumaki-0.1000 - search.cpan.org Tatsumaki, my tiny Perl port of Tornado using Plack and AnyEvent originally started as a proof of concept to test and demonstrate PSGI's streaming interface but its chat app using a simple long-poll Comet got a lot of attentions from people: Audrey Tang use
ircで聞いたときはうまく説明できなかった&tokuhiromさん、Yappoさん、kazuhoさんに直接教えてもらったのでまとめとくなり。 Proxyサーバーを作ることになった。 こんな感じのやつ。 で、これの問題として対抗のサーバーの応答速度が遅い場合があってそこにProxyサーバーが引きずられる点がある。つまりクライアントからの毎コネクションが比較的長くなりがちなサーバーをいかに効率よく組むかという課題がある。 最初は勘違いして他のサーバーへの問い合わせの間に他のことをして全体の応答速度を速くする、つまり非同期化によるメリットを模索していたんだけど、1回の応答で他サーバーへの問い合わせがたくさんあるようなクローラーみたいなことをする場合はメリットがあるけど、基本的に1回の応答で他サーバーへの問い合わせは1回だし、コンテンツを持ってくる以外にも処理はあるけど、処理時間の多くはこの1回の
さて、前エントリでJSocketというのを作ったと書いたのですが、これは実はjavascriptで動くtwitter streamクライアントを作るならばmultipart/mixedを使うべきというのを読んで、レスポンスがpollではなくてストリーミングできるというのを知って、リクエストもやりたいよというふうに思ったのがきっかけでした。 まず、XHRでできないかを試してみたのですが、xhr.send(data)を一回読んでしまうと少なくともjavascript側ではリクエストは完了したと思ってしまって、再度xhr.send(data)しても反応はありませんでした。 そこでJSocketの登場です。JSocketを使うとhttpリクエストを断続的に送信することができます。やったですね。 で、Plack::Server::Coroを使って試しにリアルタイムチャットを作ってみました。どうぞお試
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
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く