FCGI::ProcManager

FCGI::ProcManager is a Perl module with functions for managing FastCGI applications.
Download

FCGI::ProcManager Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • FundsXpress Financial Network, Inc.
  • Publisher web site:
  • http://search.cpan.org/~jurach/FCGI-ProcManager-0.17/ProcManager.pm

FCGI::ProcManager Tags


FCGI::ProcManager Description

FCGI::ProcManager is a Perl module with functions for managing FastCGI applications. FCGI::ProcManager is a Perl module with functions for managing FastCGI applications.SYNOPSIS{ # In Object-oriented style. use CGI::Fast; use FCGI::ProcManager; my $proc_manager = FCGI::ProcManager->new({ n_processes => 10 }); $proc_manager->pm_manage(); while (my $cgi = CGI::Fast->new()) { $proc_manager->pm_pre_dispatch(); # ... handle the request here ... $proc_manager->pm_post_dispatch(); } # This style is also supported: use CGI::Fast; use FCGI::ProcManager qw(pm_manage pm_pre_dispatch pm_post_dispatch); pm_manage( n_processes => 10 ); while (my $cgi = CGI::Fast->new()) { pm_pre_dispatch(); #... pm_post_dispatch(); }FCGI::ProcManager is used to serve as a FastCGI process manager. By re-implementing it in perl, developers can more finely tune performance in their web applications, and can take advantage of copy-on-write semantics prevalent in UNIX kernel process management. The process manager should be invoked before the caller''s request loopThe primary routine, pm_manage, enters a loop in which it maintains a number of FastCGI servers (via fork(2)), and which reaps those servers when they die (via wait(2)).pm_manage provides too hooks: C< managing_init > - called just before the manager enters the manager loop. C< handling_init > - called just before a server is returns from C< pm_manage >It is necessary for the caller, when implementing its request loop, to insert a call to pm_pre_dispatch at the top of the loop, and then 7pm_post_dispatch at the end of the loop. Requirements: · Perl


FCGI::ProcManager Related Software