Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Perl
CGI Plack
OGATA Tetsuji (@xtetsuji)
2017/03/04 YAPC::Kansai 2017 OSAKA
https://flic.kr/p/K9v8rD
• OGATA Tetsuji (@xtetsuji)
• http://post.tetsuji.jp/
• Gaiax R&D INFRA
https://flic.kr/p/bhrKfp
• 🔈CGI Plack Perl
• 🔈
• 🔇
• 🔇


CGI
https://flic.kr/p/aWg7jz
• 1991 HTTP HTML
• 1993 NCSA HTTPd CGI
• 1995 Windows 95
• 1999 NTT i-mode
Photo:
• 1990 CGI
•
• CGI
URL CGI
CGI
URL CGI
CGI
• CGI
• 1
• Perl CGI
• 1
•
•
CGI Perl
•
CGI
• C
• 20 21 CGI Perl
CGI Perl
• 1990 ISP(Internet Service Provider)
•
ISP
•
• Perl
CGI Perl
• ISP
Perl CGI
• CGI Perl
• IT CGI Perl
CGI Perl
2000 2008
https://flic.kr/p/5kwk72
• CGI
• CGI
• 2000 2003
https://flic.kr/p/9xG4TJ
Apache mod_perl (1997 )
• mod_perl Apache Perl
Apache
• Apache C
•
• Apache Perl CGI
Perl
Apache mod_perl (1997 )
• 2000
• mod_perl Web 

(by miyagawa -san @ 2001 YARPC 19101 LT)
• mod_perl C10K Problem 

(by tak...
FastCGI (mid-1990s )
•
• CGI FastCGI CGI
• FastCGI
FastCGI (mid-1990s )
•
• Apache mod_fcgi FastCGI
• Perl FCGI
• Apache
SpeedyCGI (1999 )
• FastCGI
Perl SpeedyCGI
• CGI Perl
Common
• CGI shebang 

#!/usr/bin/perl 

#!/usr/bin/speedy
CGI mod_perl FastCGI SpeedyCGI
Apache

Apache 

RFC


Apache API
FastCGI
Specification
Perl 

※
Perl
1991 1996 1990 1999
Perl CGI
• 2007 2008 YAPC::Asia Tokyo
mod_perl FastCGI
• Catalyst WAF (Web Application
Framework)
mod_perl FastCGI
• PSGI ...
mod_perl and FastCGI
• CGI Plack 2
• WAF FastCGI
• Perl Apache mod_perl
• FastCGI 2017
mod_perl
mod_perl and FastCGI
• FastCGI
• mod_perl
• mod_perl Apache (prefork)
• FastCGI mod_perl
mod_perl
• Apache
lighttpd Nginx
• Apache 1 2 Apache API
mod_perl
• mod_perl
Perl
• Java Servlet e.g. Tomcat
• IIS/ASP
• mod_perl e.g. mod_ruby mod_python
• PHP e.g. mod_php php-fpm(FastCGI)
• Ruby o...
https://flic.kr/p/bVwF8R
•
•
prefork

 

I/O
Perl Apache (prefork)

Starlet, Starman
Nginx

Twiggy
• Apache MPM (Multi Processing Module)
prefork
(event) (worker)
• Perl
prefork
prefork
$ ps auxwf
• fork =
•
•
• root
• prefork = fork
prefork
prefork
Parent
prefork
Parent
Child Child Child Child
Process fork
prefork
Parent
Child Child Child Child
Process fork
HTTP
event
event
Master
event
Master
Worker
event
Master
Worker
Worker
HTTP
PSGI / Plack
2009
https://flic.kr/p/726NSK
• Catalyst WAF (Web Application
Framework)
mod_perl FastCGI
• CGI mod_perl FastCGI SpeedyCGI
WAF
• WAF WAF
• Python WSGI (Web
Server Gateway Interface) Ruby Rack
•
•
•
• CGI FastCGI
PSGI Plack
• CGI WSGI
• WSGI PSGI (Perl Server
Gateway Inteface)
Plack
https://flic.kr/p/7n8y6p
https://flic.kr/p/7n8y6p
https://flic.kr/p/7n8y6p
https://flic.kr/p/7n8y6p
https://flic.kr/p/7n8y6p
https://flic.kr/p/7n8y6p
PSGI
• CGI
WAF PSGI
• Perl
Plack
• PSGI
• PSGI
PSGI
• PSGI Plack
Plack
• Plack::Handler::
• PSGI
Plack::Middleware::
PSGI / Plack
WAF
•
•
http://www.kirin.co.jp/company/news/2016/0727_05.html
🍻
http://www.kirin.co.jp/company/news/2016/0727_05.html
2017
https://flic.kr/p/mzF5vS
• Perl PSGI
WAF Plack
• WAF
Mojolicious
Amon2
• Plack::Handler::
•
•
• WAF PSGI
…
•
•
•
•
•
•
•
• mod_perl
•
https://flic.kr/p/5i9taP
https://flic.kr/p/5i9taP
Perl ウェブ開発の中世〜CGI と Plack の間〜
Upcoming SlideShare
Loading in …5
×

Perl ウェブ開発の中世〜CGI と Plack の間〜

4,833 views

Published on

2017/3/4に行われた YAPC::Kansai 2017 OSAKA で発表したトークのスライドです。

Published in: Technology
  • Be the first to comment

Perl ウェブ開発の中世〜CGI と Plack の間〜

  1. 1. Perl CGI Plack OGATA Tetsuji (@xtetsuji) 2017/03/04 YAPC::Kansai 2017 OSAKA https://flic.kr/p/K9v8rD
  2. 2. • OGATA Tetsuji (@xtetsuji) • http://post.tetsuji.jp/ • Gaiax R&D INFRA
  3. 3. https://flic.kr/p/bhrKfp
  4. 4. • 🔈CGI Plack Perl • 🔈 • 🔇 • 🔇
  5. 5. 
 CGI https://flic.kr/p/aWg7jz
  6. 6. • 1991 HTTP HTML • 1993 NCSA HTTPd CGI • 1995 Windows 95 • 1999 NTT i-mode Photo:
  7. 7. • 1990 CGI • • CGI
  8. 8. URL CGI CGI
  9. 9. URL CGI CGI
  10. 10. • CGI • 1 • Perl CGI
  11. 11. • 1 • •
  12. 12. CGI Perl • CGI • C • 20 21 CGI Perl
  13. 13. CGI Perl • 1990 ISP(Internet Service Provider) • ISP • • Perl
  14. 14. CGI Perl • ISP Perl CGI • CGI Perl • IT CGI Perl
  15. 15. CGI Perl 2000 2008 https://flic.kr/p/5kwk72
  16. 16. • CGI • CGI • 2000 2003 https://flic.kr/p/9xG4TJ
  17. 17. Apache mod_perl (1997 ) • mod_perl Apache Perl Apache • Apache C • • Apache Perl CGI Perl
  18. 18. Apache mod_perl (1997 ) • 2000 • mod_perl Web 
 (by miyagawa -san @ 2001 YARPC 19101 LT) • mod_perl C10K Problem 
 (by takesako -san @ 2004 Linux )
  19. 19. FastCGI (mid-1990s ) • • CGI FastCGI CGI • FastCGI
  20. 20. FastCGI (mid-1990s ) • • Apache mod_fcgi FastCGI • Perl FCGI • Apache
  21. 21. SpeedyCGI (1999 ) • FastCGI Perl SpeedyCGI • CGI Perl Common • CGI shebang 
 #!/usr/bin/perl 
 #!/usr/bin/speedy
  22. 22. CGI mod_perl FastCGI SpeedyCGI Apache Apache RFC Apache API FastCGI Specification Perl ※ Perl 1991 1996 1990 1999
  23. 23. Perl CGI • 2007 2008 YAPC::Asia Tokyo mod_perl FastCGI • Catalyst WAF (Web Application Framework) mod_perl FastCGI • PSGI / Plack (2009)
  24. 24. mod_perl and FastCGI • CGI Plack 2 • WAF FastCGI • Perl Apache mod_perl • FastCGI 2017 mod_perl
  25. 25. mod_perl and FastCGI • FastCGI • mod_perl • mod_perl Apache (prefork) • FastCGI mod_perl
  26. 26. mod_perl • Apache lighttpd Nginx • Apache 1 2 Apache API mod_perl • mod_perl
  27. 27. Perl • Java Servlet e.g. Tomcat • IIS/ASP • mod_perl e.g. mod_ruby mod_python • PHP e.g. mod_php php-fpm(FastCGI) • Ruby on Rails Passenger Unicorn…
  28. 28. https://flic.kr/p/bVwF8R
  29. 29. • •
  30. 30. prefork I/O Perl Apache (prefork) Starlet, Starman Nginx Twiggy
  31. 31. • Apache MPM (Multi Processing Module) prefork (event) (worker) • Perl prefork
  32. 32. prefork $ ps auxwf
  33. 33. • fork = • • • root • prefork = fork
  34. 34. prefork
  35. 35. prefork Parent
  36. 36. prefork Parent Child Child Child Child Process fork
  37. 37. prefork Parent Child Child Child Child Process fork HTTP
  38. 38. event
  39. 39. event Master
  40. 40. event Master Worker
  41. 41. event Master Worker Worker HTTP
  42. 42. PSGI / Plack 2009 https://flic.kr/p/726NSK
  43. 43. • Catalyst WAF (Web Application Framework) mod_perl FastCGI
  44. 44. • CGI mod_perl FastCGI SpeedyCGI WAF • WAF WAF • Python WSGI (Web Server Gateway Interface) Ruby Rack
  45. 45. • • • • CGI FastCGI
  46. 46. PSGI Plack • CGI WSGI • WSGI PSGI (Perl Server Gateway Inteface) Plack
  47. 47. https://flic.kr/p/7n8y6p
  48. 48. https://flic.kr/p/7n8y6p
  49. 49. https://flic.kr/p/7n8y6p
  50. 50. https://flic.kr/p/7n8y6p
  51. 51. https://flic.kr/p/7n8y6p
  52. 52. https://flic.kr/p/7n8y6p
  53. 53. PSGI • CGI WAF PSGI • Perl
  54. 54. Plack • PSGI • PSGI PSGI • PSGI Plack
  55. 55. Plack • Plack::Handler:: • PSGI Plack::Middleware::
  56. 56. PSGI / Plack WAF • •
  57. 57. http://www.kirin.co.jp/company/news/2016/0727_05.html
  58. 58. 🍻 http://www.kirin.co.jp/company/news/2016/0727_05.html
  59. 59. 2017 https://flic.kr/p/mzF5vS
  60. 60. • Perl PSGI WAF Plack • WAF Mojolicious Amon2
  61. 61. • Plack::Handler:: •
  62. 62. • • WAF PSGI … •
  63. 63. • • •
  64. 64. • • • • mod_perl • https://flic.kr/p/5i9taP
  65. 65. https://flic.kr/p/5i9taP

×