05 Apr 2008 20:11:37 UTC
- Distribution: Catalyst-Engine-HTTP-POE
- Module version: 0.08
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (229 / 632 / 0)
- KwaliteeBus factor: 10
- % Coverage
- License: perl_5
- Activity24 month
- Download (59.55KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionAGRUNDMA Andy Grundman
- RESTART SUPPORT
- EXPERIMENTAL STATUS
Catalyst::Engine::HTTP::POE - Single-threaded multi-tasking Catalyst engine (deprecated in favor of HTTP::Prefork)
CATALYST_ENGINE='HTTP::POE' script/yourapp_server.pl # Prefork 5 children CATALYST_POE_MAX_PROC=6 CATALYST_ENGINE='HTTP::POE' script/yourapp_server.pl
This engine has been deprecated. Please consider using Catalyst::Engine::HTTP::Prefork instead.
This engine allows Catalyst to process multiple requests in parallel within a single process. Much of the internal Catalyst flow now uses POE yield calls. Application code will still block of course, but all I/O, header processing, and POST body processing is handled asynchronously.
A good example of the engine's power is the Catalyst::Plugin::UploadProgress demo application, which can process a file upload as well as an Ajax polling request at the same time in the same process.
This engine requires at least Catalyst 5.67.
As of version 0.05, the -r flag is supported and the server will restart itself when any application files are modified.
As of version 0.05, the engine is able to prefork a set number of child processes to distribute requests. Set the CATALYST_POE_MAX_PROC environment variable to the total number of processes you would like to run, including the parent process. So, to prefork 5 children, set this value to 6. This value may also be set by modifying yourapp_server.pl and adding max_proc to the options hash passed to YourApp->run().
To enable trace-level debugging, set the environment variable CATALYST_POE_DEBUG.
At any time you can get a dump of the internal state of the engine by sending a USR1 signal to the running process.
This engine should still be considered experimental and likely has bugs, however as it's only intended for development, please use it and report bugs.
The engine has been tested with the UploadProgress demo, the Streaming example, and one of my own moderately large applications. It also fully passes the Catalyst test suite.
Andy Grundman, <email@example.com>
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Catalyst::Engine::HTTP::POE, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Catalyst::Engine::HTTP::POE
For more information on module installation, please visit the detailed CPAN module installation guide.