SlideShare une entreprise Scribd logo
1  sur  11
mod_perlで簡単Apacheモジュール開発 Takayuki Hirayama 1 Copyright 2009  Fractalist inc. All rights reserved.
mod_perlって何者? よくある誤解 CGIの高速なやつ× Apacheに組み込んだPerlインタープリタ(例:PHP)× ApacheのAPIにPerlでアクセスできるようにし、Apacheのモジュール(プラグイン)を Perlで開発できるようにするもの 2 Copyright 2009  Fractalist inc. All rights reserved.
mod_perlの要素 mod_perlとmod_perl2がある mod_perl : Apache1.3系用 mod_perl2 : Apache2.x系用 Apacheから見たmod_perlハンドラ(mod_perl2) mod_perlハンドラ 完全にApacheモジュールとして開発する パラメータなどは全てAPIを通じて取得する 高速 cgi-scriptハンドラ プログラム側からCGI風にパラメータ取得できる %ENVパラメータにパラメータ格納 printで出力 開発環境ではCGIとして開発できるので開発しやすい ModPerl::Registry レスポンスハンドラでCGIとして書かれたプログラムを動かせる ただしグローバル変数などの挙動に制約あり 3 Copyright 2009  Fractalist inc. All rights reserved.
httpd.conf mod_perlハンドラ LoadModuleperl_module modules/mod_perl.so # MyApp::Apache2::HelloWorldモジュールにハンドラを実装する # /somewhere/perl/lib 以下に.pmファイルを置く PerlSwitches-I/somewhere/perl/lib # 事前ロード PerlModuleMyApp::Apache2::HelloWorld # 特定ロケーションにハンドラを設定 <Location /index> SetHandlermodperl PerlResponseHandlerMyApp::Apache2::HelloWorld </Location> cgi-script ハンドラ + ModPerl::Registry LoadModuleperl_modulemodules/mod_perl.so <Location “/index.cgi”>    # perl-scriptセットハンドラを指定して、    # PerlResponseHandlerにModPer::Registryを指定する SetHandlerperl-script PerlResponseHandlerModPerl::Registry </Location> 4 Copyright 2009  Fractalist inc. All rights reserved.
Apache2のHTTPリクエストライフサイクル デフォルトのハンドラを「上書きする」ハンドラをモジュールとして提供する ※ http://perl.apache.org/docs/2.0/user/handlers/http.html より引用 5 Copyright 2009  Fractalist inc. All rights reserved.
何が作れるの? レスポンスハンドラ(PerlResponseHandler) パラメータに応じたレスポンス (通常のWebアプリケーション) プロトコルハンドラ カスタム認証ハンドラ(PerlAuthzHandler) カスタムログ出力(PerlLogHandler) Input/Output Filterハンドラ 全てのリクエストに対し一定の処理をかける(PerlInputFilterHandler) 全てのレスポンスに対し事後的に一定の処理をかける(PerlOutputFilterHandler) 6 Copyright 2009  Fractalist inc. All rights reserved.
ソースはどんな感じ? #file:/somewhere/perl/lib/MyApp/Apache2/HelloWorld.pm #---------------------- package MyApp::Apache2::HelloWorld; use strict; use warnings; use Apache2::RequestRec (); use Apache2::RequestIO (); # 定数の宣言 use Apache2::Const -compile => qw(OK); # ハンドラメソッドの宣言 # これだけ! sub handler {     my $r = shift; # Apache2::RequestRecObjectが引数に入ってくる     $r->content_type(‘text/plain’); # HTTPヘッダの格納     $r->print( “Hello World!
” ); # 出力結果の格納     return Apache2::Const::OK; } 1; 7 Copyright 2009  Fractalist inc. All rights reserved. クラスメソッドとして定義することもできる 継承などが利用できるので開発効率大 開発用のオートリロードも可能
特徴1:高速+軽快! Apache起動時に実行イメージをロードする PHPでは基本的にインタプリタのみロード 必要最小限のモジュールのみ使用するようにできるので、実行イメージが小さくなる 必ずしも大きなWAFに頼る必要はない Ruby on RailsやCakePHPでは原則オールインワンで利用せざるを得ない ハンドラだけ定義できるので場合によっては限定的な影響範囲にのみ適用できる 8 Copyright 2009  Fractalist inc. All rights reserved.
特徴2:高い開発効率 C言語でなくPerlで記述できる リソースの垣根が低い 枯れた技術/モジュール等資産の再活用 多彩なCPANモジュールを利用できる CGI URI Encode Log::Log4perl HTTP::MobileAgent etc… ミドルウェアとの連携も容易 memcached DBI 9 Copyright 2009  Fractalist inc. All rights reserved.
特徴3:変数ライフサイクル Apache親プロセスと子プロセスでファイルロードタイミングなどを意識できる 10 Copyright 2009  Fractalist inc. All rights reserved. Apache 親プロセス リクエスト Apache 子プロセス fork(2) レスポンス Apache 子プロセス Apache 子プロセス Apache 子プロセス Apache 子プロセス Apacheのpreforkモデルのイメージ
まとめ 利用シチュエーション 広告配信 カスタムログ収集 その他小さいアプリケーションを短期間で開発したい場合 まとめ 11 Copyright 2009  Fractalist inc. All rights reserved. Webアプリケーションの開発要件に応じて 様々な形態から採用検討することが重要

Contenu connexe

En vedette

素敵なjavascript ~google chrome編~
素敵なjavascript ~google chrome編~素敵なjavascript ~google chrome編~
素敵なjavascript ~google chrome編~
ngi group.
 
20091119_sinatraを使ってみた
20091119_sinatraを使ってみた20091119_sinatraを使ってみた
20091119_sinatraを使ってみた
ngi group.
 
muninで簡単&自在サーバーモニタリング
muninで簡単&自在サーバーモニタリングmuninで簡単&自在サーバーモニタリング
muninで簡単&自在サーバーモニタリング
ngi group.
 
正規表現のススメ_20091217
正規表現のススメ_20091217正規表現のススメ_20091217
正規表現のススメ_20091217
ngi group.
 
The Royal Lagoon Bhubaneswar
The Royal Lagoon Bhubaneswar The Royal Lagoon Bhubaneswar
The Royal Lagoon Bhubaneswar
SJ Developers And Housing (P) Limited
 
Mixiアプリで体験する Open Social
Mixiアプリで体験する Open SocialMixiアプリで体験する Open Social
Mixiアプリで体験する Open Social
ngi group.
 
Zshって最強らしい
Zshって最強らしいZshって最強らしい
Zshって最強らしい
ngi group.
 

En vedette (17)

素敵なjavascript ~Firefox編 ~
素敵なjavascript ~Firefox編 ~素敵なjavascript ~Firefox編 ~
素敵なjavascript ~Firefox編 ~
 
素敵なjavascript ~google chrome編~
素敵なjavascript ~google chrome編~素敵なjavascript ~google chrome編~
素敵なjavascript ~google chrome編~
 
20091119_sinatraを使ってみた
20091119_sinatraを使ってみた20091119_sinatraを使ってみた
20091119_sinatraを使ってみた
 
Git紹介~入門編~
Git紹介~入門編~Git紹介~入門編~
Git紹介~入門編~
 
Html5 入門編 その2
Html5 入門編 その2Html5 入門編 その2
Html5 入門編 その2
 
Yii紹介
Yii紹介Yii紹介
Yii紹介
 
muninで簡単&自在サーバーモニタリング
muninで簡単&自在サーバーモニタリングmuninで簡単&自在サーバーモニタリング
muninで簡単&自在サーバーモニタリング
 
正規表現のススメ_20091217
正規表現のススメ_20091217正規表現のススメ_20091217
正規表現のススメ_20091217
 
The Royal Lagoon Bhubaneswar
The Royal Lagoon Bhubaneswar The Royal Lagoon Bhubaneswar
The Royal Lagoon Bhubaneswar
 
SvnからGitへの移行について
SvnからGitへの移行についてSvnからGitへの移行について
SvnからGitへの移行について
 
軽量高機能webサーバーnginx
軽量高機能webサーバーnginx軽量高機能webサーバーnginx
軽量高機能webサーバーnginx
 
RubyとPost Gis
RubyとPost GisRubyとPost Gis
RubyとPost Gis
 
Tokyo Cabinet
Tokyo CabinetTokyo Cabinet
Tokyo Cabinet
 
Mixiアプリで体験する Open Social
Mixiアプリで体験する Open SocialMixiアプリで体験する Open Social
Mixiアプリで体験する Open Social
 
Zshって最強らしい
Zshって最強らしいZshって最強らしい
Zshって最強らしい
 
しょぼいプレゼンをパワポのせいにするな! by @jessedee
しょぼいプレゼンをパワポのせいにするな! by @jessedeeしょぼいプレゼンをパワポのせいにするな! by @jessedee
しょぼいプレゼンをパワポのせいにするな! by @jessedee
 
【プレゼン】見やすいプレゼン資料の作り方【初心者用】
【プレゼン】見やすいプレゼン資料の作り方【初心者用】【プレゼン】見やすいプレゼン資料の作り方【初心者用】
【プレゼン】見やすいプレゼン資料の作り方【初心者用】
 

Similaire à フラクタリスト技術知識共有会発表資料 090903

【13-A-2】 「Delphi for PHP のエバンジェリストが、日本の PHP エバンジェリストと、 PHP と IDE の今と未来を語る」~Em...
【13-A-2】 「Delphi for PHP のエバンジェリストが、日本の PHP エバンジェリストと、 PHP と IDE の今と未来を語る」~Em...【13-A-2】 「Delphi for PHP のエバンジェリストが、日本の PHP エバンジェリストと、 PHP と IDE の今と未来を語る」~Em...
【13-A-2】 「Delphi for PHP のエバンジェリストが、日本の PHP エバンジェリストと、 PHP と IDE の今と未来を語る」~Em...
devsumi2009
 
20090313 Cakephpstudy
20090313 Cakephpstudy20090313 Cakephpstudy
20090313 Cakephpstudy
Yusuke Ando
 
【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」
【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」
【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」
devsumi2009
 
Tcl/Tk+ハッシュリスト
Tcl/Tk+ハッシュリストTcl/Tk+ハッシュリスト
Tcl/Tk+ハッシュリスト
Hiromu Shioya
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
iwata
 
技術トレンディセミナー フレームワークとしてのTrac
技術トレンディセミナー フレームワークとしてのTrac技術トレンディセミナー フレームワークとしてのTrac
技術トレンディセミナー フレームワークとしてのTrac
terada
 

Similaire à フラクタリスト技術知識共有会発表資料 090903 (20)

【13-A-2】 「Delphi for PHP のエバンジェリストが、日本の PHP エバンジェリストと、 PHP と IDE の今と未来を語る」~Em...
【13-A-2】 「Delphi for PHP のエバンジェリストが、日本の PHP エバンジェリストと、 PHP と IDE の今と未来を語る」~Em...【13-A-2】 「Delphi for PHP のエバンジェリストが、日本の PHP エバンジェリストと、 PHP と IDE の今と未来を語る」~Em...
【13-A-2】 「Delphi for PHP のエバンジェリストが、日本の PHP エバンジェリストと、 PHP と IDE の今と未来を語る」~Em...
 
PHP超入門@LL温泉
PHP超入門@LL温泉PHP超入門@LL温泉
PHP超入門@LL温泉
 
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
 
Gorm @ gopher china
Gorm @ gopher chinaGorm @ gopher china
Gorm @ gopher china
 
20090522 Candycane
20090522 Candycane20090522 Candycane
20090522 Candycane
 
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信
 
20090313 Cakephpstudy
20090313 Cakephpstudy20090313 Cakephpstudy
20090313 Cakephpstudy
 
【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」
【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」
【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」
 
Tcl/Tk+ハッシュリスト
Tcl/Tk+ハッシュリストTcl/Tk+ハッシュリスト
Tcl/Tk+ハッシュリスト
 
2007 0822 Antelope Php
2007 0822 Antelope Php2007 0822 Antelope Php
2007 0822 Antelope Php
 
Spring Framework勉強会
Spring  Framework勉強会Spring  Framework勉強会
Spring Framework勉強会
 
Web技術勉強会 第19回
Web技術勉強会 第19回Web技術勉強会 第19回
Web技術勉強会 第19回
 
LT openpear@LL温泉
LT openpear@LL温泉LT openpear@LL温泉
LT openpear@LL温泉
 
Development toolsforteamdevelopment
Development toolsforteamdevelopmentDevelopment toolsforteamdevelopment
Development toolsforteamdevelopment
 
Hoppyではじめよう!リアルタイムweb
Hoppyではじめよう!リアルタイムwebHoppyではじめよう!リアルタイムweb
Hoppyではじめよう!リアルタイムweb
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
20090418 イケテルRails勉強会 第2部Air編 解説
20090418 イケテルRails勉強会 第2部Air編 解説20090418 イケテルRails勉強会 第2部Air編 解説
20090418 イケテルRails勉強会 第2部Air編 解説
 
Revisited
RevisitedRevisited
Revisited
 
技術トレンディセミナー フレームワークとしてのTrac
技術トレンディセミナー フレームワークとしてのTrac技術トレンディセミナー フレームワークとしてのTrac
技術トレンディセミナー フレームワークとしてのTrac
 
Install Moodle
Install MoodleInstall Moodle
Install Moodle
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

フラクタリスト技術知識共有会発表資料 090903

  • 1. mod_perlで簡単Apacheモジュール開発 Takayuki Hirayama 1 Copyright 2009  Fractalist inc. All rights reserved.
  • 2. mod_perlって何者? よくある誤解 CGIの高速なやつ× Apacheに組み込んだPerlインタープリタ(例:PHP)× ApacheのAPIにPerlでアクセスできるようにし、Apacheのモジュール(プラグイン)を Perlで開発できるようにするもの 2 Copyright 2009  Fractalist inc. All rights reserved.
  • 3. mod_perlの要素 mod_perlとmod_perl2がある mod_perl : Apache1.3系用 mod_perl2 : Apache2.x系用 Apacheから見たmod_perlハンドラ(mod_perl2) mod_perlハンドラ 完全にApacheモジュールとして開発する パラメータなどは全てAPIを通じて取得する 高速 cgi-scriptハンドラ プログラム側からCGI風にパラメータ取得できる %ENVパラメータにパラメータ格納 printで出力 開発環境ではCGIとして開発できるので開発しやすい ModPerl::Registry レスポンスハンドラでCGIとして書かれたプログラムを動かせる ただしグローバル変数などの挙動に制約あり 3 Copyright 2009  Fractalist inc. All rights reserved.
  • 4. httpd.conf mod_perlハンドラ LoadModuleperl_module modules/mod_perl.so # MyApp::Apache2::HelloWorldモジュールにハンドラを実装する # /somewhere/perl/lib 以下に.pmファイルを置く PerlSwitches-I/somewhere/perl/lib # 事前ロード PerlModuleMyApp::Apache2::HelloWorld # 特定ロケーションにハンドラを設定 <Location /index> SetHandlermodperl PerlResponseHandlerMyApp::Apache2::HelloWorld </Location> cgi-script ハンドラ + ModPerl::Registry LoadModuleperl_modulemodules/mod_perl.so <Location “/index.cgi”> # perl-scriptセットハンドラを指定して、 # PerlResponseHandlerにModPer::Registryを指定する SetHandlerperl-script PerlResponseHandlerModPerl::Registry </Location> 4 Copyright 2009  Fractalist inc. All rights reserved.
  • 5. Apache2のHTTPリクエストライフサイクル デフォルトのハンドラを「上書きする」ハンドラをモジュールとして提供する ※ http://perl.apache.org/docs/2.0/user/handlers/http.html より引用 5 Copyright 2009  Fractalist inc. All rights reserved.
  • 6. 何が作れるの? レスポンスハンドラ(PerlResponseHandler) パラメータに応じたレスポンス (通常のWebアプリケーション) プロトコルハンドラ カスタム認証ハンドラ(PerlAuthzHandler) カスタムログ出力(PerlLogHandler) Input/Output Filterハンドラ 全てのリクエストに対し一定の処理をかける(PerlInputFilterHandler) 全てのレスポンスに対し事後的に一定の処理をかける(PerlOutputFilterHandler) 6 Copyright 2009  Fractalist inc. All rights reserved.
  • 7. ソースはどんな感じ? #file:/somewhere/perl/lib/MyApp/Apache2/HelloWorld.pm #---------------------- package MyApp::Apache2::HelloWorld; use strict; use warnings; use Apache2::RequestRec (); use Apache2::RequestIO (); # 定数の宣言 use Apache2::Const -compile => qw(OK); # ハンドラメソッドの宣言 # これだけ! sub handler { my $r = shift; # Apache2::RequestRecObjectが引数に入ってくる $r->content_type(‘text/plain’); # HTTPヘッダの格納 $r->print( “Hello World! ” ); # 出力結果の格納 return Apache2::Const::OK; } 1; 7 Copyright 2009  Fractalist inc. All rights reserved. クラスメソッドとして定義することもできる 継承などが利用できるので開発効率大 開発用のオートリロードも可能
  • 8. 特徴1:高速+軽快! Apache起動時に実行イメージをロードする PHPでは基本的にインタプリタのみロード 必要最小限のモジュールのみ使用するようにできるので、実行イメージが小さくなる 必ずしも大きなWAFに頼る必要はない Ruby on RailsやCakePHPでは原則オールインワンで利用せざるを得ない ハンドラだけ定義できるので場合によっては限定的な影響範囲にのみ適用できる 8 Copyright 2009  Fractalist inc. All rights reserved.
  • 9. 特徴2:高い開発効率 C言語でなくPerlで記述できる リソースの垣根が低い 枯れた技術/モジュール等資産の再活用 多彩なCPANモジュールを利用できる CGI URI Encode Log::Log4perl HTTP::MobileAgent etc… ミドルウェアとの連携も容易 memcached DBI 9 Copyright 2009  Fractalist inc. All rights reserved.
  • 10. 特徴3:変数ライフサイクル Apache親プロセスと子プロセスでファイルロードタイミングなどを意識できる 10 Copyright 2009  Fractalist inc. All rights reserved. Apache 親プロセス リクエスト Apache 子プロセス fork(2) レスポンス Apache 子プロセス Apache 子プロセス Apache 子プロセス Apache 子プロセス Apacheのpreforkモデルのイメージ
  • 11. まとめ 利用シチュエーション 広告配信 カスタムログ収集 その他小さいアプリケーションを短期間で開発したい場合 まとめ 11 Copyright 2009  Fractalist inc. All rights reserved. Webアプリケーションの開発要件に応じて 様々な形態から採用検討することが重要