Yes that's true, httpd will be also POE (e.g. POE::Component::Server::HTTP )
I saw that POE::Wheel::Run uses stdin/stdout for communication.
My workers is a perl code so I would pass subroutine reference to Wheel::Run 'Program' argument.
Unfortunately that code may print some debug stuff.
I was thinking about worker code as something similar to:
sub worker{
my $self = shift;
while( my $task = $some_queue->dequeue ) {
# do_something() can print debug output to STDOUT
my $result = $self->do_something();
my $status = { result => $result, time => time(), worker_id =>
+ $self->id};
$self->update_status( $status);
}
}
And parent code something like:
sub parent {
my $self = shift;
$some_queue->enqueue( $new_task);
}
sub update_status_event{
my $status = shift;
# do something with status
#...
}
So I think POE::Wheel::Run for inter-process communication is not enough.
Any advice here?
Thanks,
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.