SlideShare a Scribd company logo
1 of 81
Perl
YAPC::Asia 2009 Tokyo
     2009/9/10
•       id:hiboma

•
    •

•
•        CTO

    •

    •4    25
•       id:MIZZY

•
•
    /



•             /
                   .... etc
•   gihyo.jp       Puppet, Func

    •   http://gihyo.jp/admin/serial/01/puppet

    •   http://gihyo.jp/admin/serial/01/func

    •                           MASHUP++
        Plagger

    •   http://www.amazon.co.jp/dp/4861671655/
•

•   paperboy&co.
CTO
CTO
CTO
“




    ”
•   paperboy&co.

•
•
•
•          PHP

•                Perl



•
    Perl
Perl
30days Album
30days Album
• http://30d.jp/
•
• 30
  • 30
  •         10

 • 40
30days Album

•
    •
    •
30days Album + Perl
• Perlbal
• MogileFS
•            API on Catalyst

• Gearman
• TheSchwartz
Perlbal

• Perl
•
•
Perlbal


                    Perlbal



http://30d.jp/img             http://30d.jp/img




              Web
Perlbal
• Perl

 •3
• MogileFS
 • X-Reproxy-URL
MogileFS

• Perl
•
•
MogileFS
                                client




mogilefsd           mogilefsd            mogstored   mogstored




            MySQL
MogileFS

•               OSS

• Perlbal
  • X-Reproxy-URL
API

• MogileFS
• API          GET/PUT



• Perl + Catalyst
API
                         client



       HTTP GET/PUT

                          API




mogilefsd    mogilefsd            mogstored   mogstored
API
•
    •

•
    •   MogileFS::Client   MKCOL   API
API
•
    •   MogileFS   Content-Type Content-Length
                         API

•
    •   MogileFS                                 API
Perlbal
                                                   Perlbal


                 X-Reproxy-URL:
http://storage_node/dev1/0/000/...
           Content-Type                                      GET



                                                 GET

                                                                   mogstored   mogstored
                        API



          mogilefsd                  mogilefsd
•
    •

    • Gearman/TheSchwartz
    •               API
Web
                    (Rails)


                          XML-RPC
                          API
                   (Catalyst)
German::Client                  TheSchwartz::Job


        gearmand                  MySQL




        gearman                 TheSchwartz
         worker                   worker
API

•                      Web
              gearman / TheSchwartz



• Catalyst + Catalyst::Plugin::XMLRPC   API
Gearman
 •           (                 )

 • Web
   •
   •
• Proc::Background
                 daemontools
TheSchwartz
    •              (               )

        •
               ~               )

        •              (zip)

•   Proc::Background
                   daemontools
•

•
•              Image::Imlib2

•                   =>

• yusukebe
  • http://yusukebe.com/tech/archives/
    20070526/011710.html
                                         GD::Image

                                         Image::Magick

                                         Imager
heteml
(            )
- flash media server
- coldfusion
-               SSL
- SSH
4/1
•
•
•
CGI
•   Apache2.0(Worker) + SuEXEC + mod_cgid
    •   PHP, Perl, Ruby, Python
•   CGI               =>

•
    •
    •   CPU
hetepro
•
•
    • Class::Component
    • + Daemon::Generic
    • + Sys::Statistics::Linux (   )

• 2007                  ( Moose        )
hetepro
•


•       :      CPU   N
    kill -9

    •
hetepro

filter:
 - catch:
     uid: gt: 1000
     runtime: gt: 300
   action:
     - KillProcess:
     - Log::TextTable:
Sys::Statistics::Linux

• /proc     (       ,
      )                 ...

• Linux         !

• hetepro
Sys::Statistics::Linux
• CpuStats    • NetStats
• DiskStats   • PgSwStats
• DiskUsage   • ProcStats
• FileStats   • Processes
• LoadAVG
    • SockStats
• MemStats    • SysInfo
Sys::Statistics::Linux
•
    • ex. CPU          N          /N

    • ex.

•
    Sys::Statistics::Linux::Processes
•
•

•
Archer
• id:tokuhirom        Perl



• Ruby   Capistrano

•
Archer
tasks:
   process:
     - module: Exec::Remote
       name: update kernel
       config:
         command: sudo yum -y update kernel
projects:
  users:
   - example0.heteml.jp
   - example1.heteml.jp
   - ...
•   !

•

•
• API
• Web
•
                     API   API             API
                                 k



•   JSON-RPC   Web
                           OK
                                     API
                                           API
API

• HTTP::Engine
• Any::Moose
• Data::ObjectDriver
• Kwalify
• Func(Python)
API
              WEB



                    JSON-RPC

MySQL         API



                             Func


WWW     WWW           MAIL          MAIL
API
•

•
                procmail
    mailfilter
API
•




•   …
API

•


•
•   MySQL

•   Data::ObjectDriver

    •   Web

    •   Web

    •   Mail

    •
2
•
    •                       Apache
        VirtualHost PHP php.ini
              etc ...

•                                    API
                   Func
Func
•   Python

•
                          ( XMLRPC over HTTPS)

    •   http://gihyo.jp/admin/serial/01/func/0001

•   /usr/bin/func-transmit              YAML
                                 Perl
qpsmtpd

• Perl            SMTP

•
• Apache
•            mod_perl

  • http://smtpd.develooper.com/
qpsmtpd
• Perl !        !

•
•           +



  • qmail           ...
(   )
•   hook_connect

•   hook_helo

•   hook_rcpt

•   hook_queue
•   .... etc

•   SMTP
•   check_badsubject

    •   Subject

•   check_relay_rcpt

    •   RCPT                       MySQL
                  (    memcached           )
•   check_size
    •
    •   ESMTP SIZE
                 qpsmtpd


    •                      qpsmtpd


•   max_rcpt_to
    •   RCPT
Qpsmtpd

•                                       /



•

    •   http://wiki.qpsmtpd.org/api:plugin_hooks
•   JugemKey       API

•   JUGEM

•
•              MySQL



•
Yapc Asia 2009 ペパボでのPerlの使い方
Yapc Asia 2009 ペパボでのPerlの使い方

More Related Content

What's hot

Java script.trend(spec)
Java script.trend(spec)Java script.trend(spec)
Java script.trend(spec)dynamis
 
이승재, 강성훈, 내가 만든 언어의 개발환경을 Visual Studio Code로 빠르고 쉽게 구축하기 #2, NDC2017
이승재, 강성훈, 내가 만든 언어의 개발환경을 Visual Studio Code로 빠르고 쉽게 구축하기 #2, NDC2017이승재, 강성훈, 내가 만든 언어의 개발환경을 Visual Studio Code로 빠르고 쉽게 구축하기 #2, NDC2017
이승재, 강성훈, 내가 만든 언어의 개발환경을 Visual Studio Code로 빠르고 쉽게 구축하기 #2, NDC2017devCAT Studio, NEXON
 
Affär - inte teknik
Affär - inte teknikAffär - inte teknik
Affär - inte teknikPer Åström
 
Where to start refactoring?
Where to start refactoring?Where to start refactoring?
Where to start refactoring?thiagoalessio
 
ノンエンジニアがウェブサーバーを構築するまで
ノンエンジニアがウェブサーバーを構築するまでノンエンジニアがウェブサーバーを構築するまで
ノンエンジニアがウェブサーバーを構築するまでKazuya Ueoka
 
강성훈, 마비노기 듀얼 서버, 동적 타입 언어에서 반 정적 타입 언어로의 변신, NDC2016
강성훈, 마비노기 듀얼 서버, 동적 타입 언어에서 반 정적 타입 언어로의 변신, NDC2016강성훈, 마비노기 듀얼 서버, 동적 타입 언어에서 반 정적 타입 언어로의 변신, NDC2016
강성훈, 마비노기 듀얼 서버, 동적 타입 언어에서 반 정적 타입 언어로의 변신, NDC2016devCAT Studio, NEXON
 
C/C++とWebAssemblyを利用したライブラリ開発
C/C++とWebAssemblyを利用したライブラリ開発C/C++とWebAssemblyを利用したライブラリ開発
C/C++とWebAssemblyを利用したライブラリ開発祐司 伊藤
 
Collection pipeline par Mathieu Godart
Collection pipeline par  Mathieu GodartCollection pipeline par  Mathieu Godart
Collection pipeline par Mathieu GodartCocoaHeads France
 
みんなのウェディングのデータ分析基盤の作り方。
みんなのウェディングのデータ分析基盤の作り方。 みんなのウェディングのデータ分析基盤の作り方。
みんなのウェディングのデータ分析基盤の作り方。 Sunao Komuro
 
Modern Mobile Web Apps
Modern Mobile Web AppsModern Mobile Web Apps
Modern Mobile Web Appsdynamis
 

What's hot (17)

Rubyslava2102
Rubyslava2102Rubyslava2102
Rubyslava2102
 
詳説WebAssembly
詳説WebAssembly詳説WebAssembly
詳説WebAssembly
 
Wordpress 24/7
Wordpress 24/7Wordpress 24/7
Wordpress 24/7
 
Java script.trend(spec)
Java script.trend(spec)Java script.trend(spec)
Java script.trend(spec)
 
이승재, 강성훈, 내가 만든 언어의 개발환경을 Visual Studio Code로 빠르고 쉽게 구축하기 #2, NDC2017
이승재, 강성훈, 내가 만든 언어의 개발환경을 Visual Studio Code로 빠르고 쉽게 구축하기 #2, NDC2017이승재, 강성훈, 내가 만든 언어의 개발환경을 Visual Studio Code로 빠르고 쉽게 구축하기 #2, NDC2017
이승재, 강성훈, 내가 만든 언어의 개발환경을 Visual Studio Code로 빠르고 쉽게 구축하기 #2, NDC2017
 
Port knocking
Port knockingPort knocking
Port knocking
 
Affär - inte teknik
Affär - inte teknikAffär - inte teknik
Affär - inte teknik
 
Where to start refactoring?
Where to start refactoring?Where to start refactoring?
Where to start refactoring?
 
ノンエンジニアがウェブサーバーを構築するまで
ノンエンジニアがウェブサーバーを構築するまでノンエンジニアがウェブサーバーを構築するまで
ノンエンジニアがウェブサーバーを構築するまで
 
강성훈, 마비노기 듀얼 서버, 동적 타입 언어에서 반 정적 타입 언어로의 변신, NDC2016
강성훈, 마비노기 듀얼 서버, 동적 타입 언어에서 반 정적 타입 언어로의 변신, NDC2016강성훈, 마비노기 듀얼 서버, 동적 타입 언어에서 반 정적 타입 언어로의 변신, NDC2016
강성훈, 마비노기 듀얼 서버, 동적 타입 언어에서 반 정적 타입 언어로의 변신, NDC2016
 
C/C++とWebAssemblyを利用したライブラリ開発
C/C++とWebAssemblyを利用したライブラリ開発C/C++とWebAssemblyを利用したライブラリ開発
C/C++とWebAssemblyを利用したライブラリ開発
 
MateriApps LIVE! の設定
MateriApps LIVE! の設定MateriApps LIVE! の設定
MateriApps LIVE! の設定
 
MateriApps LIVE! の設定
MateriApps LIVE! の設定MateriApps LIVE! の設定
MateriApps LIVE! の設定
 
Collection pipeline par Mathieu Godart
Collection pipeline par  Mathieu GodartCollection pipeline par  Mathieu Godart
Collection pipeline par Mathieu Godart
 
Git Submodules
Git SubmodulesGit Submodules
Git Submodules
 
みんなのウェディングのデータ分析基盤の作り方。
みんなのウェディングのデータ分析基盤の作り方。 みんなのウェディングのデータ分析基盤の作り方。
みんなのウェディングのデータ分析基盤の作り方。
 
Modern Mobile Web Apps
Modern Mobile Web AppsModern Mobile Web Apps
Modern Mobile Web Apps
 

Viewers also liked

[Deep Dive]Infra寄りのDevがお送りするRDS for Aurora徹底検証
[Deep Dive]Infra寄りのDevがお送りするRDS for Aurora徹底検証[Deep Dive]Infra寄りのDevがお送りするRDS for Aurora徹底検証
[Deep Dive]Infra寄りのDevがお送りするRDS for Aurora徹底検証Terui Masashi
 
Human toxicity, environmental impact and legal implications of water fluorida...
Human toxicity, environmental impact and legal implications of water fluorida...Human toxicity, environmental impact and legal implications of water fluorida...
Human toxicity, environmental impact and legal implications of water fluorida...Declan Waugh
 
These words I share, written from despair, read them, speak them, but do so w...
These words I share, written from despair, read them, speak them, but do so w...These words I share, written from despair, read them, speak them, but do so w...
These words I share, written from despair, read them, speak them, but do so w...Blair Stuart
 
正規言語について
正規言語について正規言語について
正規言語についてJumpei Ogawa
 
Isu isu trenda terkini dalam teknologi pendidikan
Isu isu trenda terkini dalam teknologi pendidikanIsu isu trenda terkini dalam teknologi pendidikan
Isu isu trenda terkini dalam teknologi pendidikanRenee Evelyn
 
Hazop gijutsushikai chubu koukuukai
Hazop gijutsushikai chubu koukuukai Hazop gijutsushikai chubu koukuukai
Hazop gijutsushikai chubu koukuukai Kiyoshi Ogawa
 
Ruby HTTP clients comparison
Ruby HTTP clients comparisonRuby HTTP clients comparison
Ruby HTTP clients comparisonHiroshi Nakamura
 
The New Framework for Information Literacy for Higher Education
The New Framework for Information Literacy for Higher EducationThe New Framework for Information Literacy for Higher Education
The New Framework for Information Literacy for Higher EducationTrudi Jacobson
 
GBM Group Based Marketing: Marketing to Groups
GBM Group Based Marketing: Marketing to GroupsGBM Group Based Marketing: Marketing to Groups
GBM Group Based Marketing: Marketing to GroupsScott Levine
 
好みや多数決で決めない、デザインとの正しい付き合い方
好みや多数決で決めない、デザインとの正しい付き合い方好みや多数決で決めない、デザインとの正しい付き合い方
好みや多数決で決めない、デザインとの正しい付き合い方Yasuhisa Hasegawa
 
Corso storytelling a Gemona
Corso storytelling a GemonaCorso storytelling a Gemona
Corso storytelling a GemonaGemona Turismo
 
Bundesliga Report - 10 years of academies - Talent pools of top-level German ...
Bundesliga Report - 10 years of academies - Talent pools of top-level German ...Bundesliga Report - 10 years of academies - Talent pools of top-level German ...
Bundesliga Report - 10 years of academies - Talent pools of top-level German ...Ítalo de Oliveira Mendonça
 
Escaneado 09 03-2017 10.02
Escaneado 09 03-2017 10.02Escaneado 09 03-2017 10.02
Escaneado 09 03-2017 10.02Juan Carreón
 
ブレンダーをDisってみる
ブレンダーをDisってみるブレンダーをDisってみる
ブレンダーをDisってみるTetsuo Mitsuda
 
4 questions to help you secure ePHI today
4 questions to help you secure ePHI today4 questions to help you secure ePHI today
4 questions to help you secure ePHI todaySarabeth Marcello
 
Trend & Challenge Digital Marketing di Indonesia 2017
Trend & Challenge Digital Marketing di Indonesia 2017 Trend & Challenge Digital Marketing di Indonesia 2017
Trend & Challenge Digital Marketing di Indonesia 2017 Nicko Krisna
 

Viewers also liked (20)

[Deep Dive]Infra寄りのDevがお送りするRDS for Aurora徹底検証
[Deep Dive]Infra寄りのDevがお送りするRDS for Aurora徹底検証[Deep Dive]Infra寄りのDevがお送りするRDS for Aurora徹底検証
[Deep Dive]Infra寄りのDevがお送りするRDS for Aurora徹底検証
 
Human toxicity, environmental impact and legal implications of water fluorida...
Human toxicity, environmental impact and legal implications of water fluorida...Human toxicity, environmental impact and legal implications of water fluorida...
Human toxicity, environmental impact and legal implications of water fluorida...
 
These words I share, written from despair, read them, speak them, but do so w...
These words I share, written from despair, read them, speak them, but do so w...These words I share, written from despair, read them, speak them, but do so w...
These words I share, written from despair, read them, speak them, but do so w...
 
正規言語について
正規言語について正規言語について
正規言語について
 
Isu isu trenda terkini dalam teknologi pendidikan
Isu isu trenda terkini dalam teknologi pendidikanIsu isu trenda terkini dalam teknologi pendidikan
Isu isu trenda terkini dalam teknologi pendidikan
 
C# & AWS Lambda
C# & AWS LambdaC# & AWS Lambda
C# & AWS Lambda
 
Hazop gijutsushikai chubu koukuukai
Hazop gijutsushikai chubu koukuukai Hazop gijutsushikai chubu koukuukai
Hazop gijutsushikai chubu koukuukai
 
Ruby HTTP clients comparison
Ruby HTTP clients comparisonRuby HTTP clients comparison
Ruby HTTP clients comparison
 
The New Framework for Information Literacy for Higher Education
The New Framework for Information Literacy for Higher EducationThe New Framework for Information Literacy for Higher Education
The New Framework for Information Literacy for Higher Education
 
GBM Group Based Marketing: Marketing to Groups
GBM Group Based Marketing: Marketing to GroupsGBM Group Based Marketing: Marketing to Groups
GBM Group Based Marketing: Marketing to Groups
 
How to Kill a Word
How to Kill a WordHow to Kill a Word
How to Kill a Word
 
好みや多数決で決めない、デザインとの正しい付き合い方
好みや多数決で決めない、デザインとの正しい付き合い方好みや多数決で決めない、デザインとの正しい付き合い方
好みや多数決で決めない、デザインとの正しい付き合い方
 
Ui qa tools
Ui qa toolsUi qa tools
Ui qa tools
 
Corso storytelling a Gemona
Corso storytelling a GemonaCorso storytelling a Gemona
Corso storytelling a Gemona
 
Bundesliga Report - 10 years of academies - Talent pools of top-level German ...
Bundesliga Report - 10 years of academies - Talent pools of top-level German ...Bundesliga Report - 10 years of academies - Talent pools of top-level German ...
Bundesliga Report - 10 years of academies - Talent pools of top-level German ...
 
Escaneado 09 03-2017 10.02
Escaneado 09 03-2017 10.02Escaneado 09 03-2017 10.02
Escaneado 09 03-2017 10.02
 
ブレンダーをDisってみる
ブレンダーをDisってみるブレンダーをDisってみる
ブレンダーをDisってみる
 
KnetMiner - EBI Workshop 2017
KnetMiner - EBI Workshop 2017KnetMiner - EBI Workshop 2017
KnetMiner - EBI Workshop 2017
 
4 questions to help you secure ePHI today
4 questions to help you secure ePHI today4 questions to help you secure ePHI today
4 questions to help you secure ePHI today
 
Trend & Challenge Digital Marketing di Indonesia 2017
Trend & Challenge Digital Marketing di Indonesia 2017 Trend & Challenge Digital Marketing di Indonesia 2017
Trend & Challenge Digital Marketing di Indonesia 2017
 

Yapc Asia 2009 ペパボでのPerlの使い方