Re: Grandwheels or wheel-wheels question
I would like to employ POE also - does anybody have experience with wheel processes (children) creating one or more wheels again? You probably want to start a new poe kernel in each sub-process, and pass messages if necessary to the parent process (eg, via STDOUT). -- Sam Vilain, [EMAIL PROTECTED] Real knowledge is to know the extent of ones ignorance. CONFUCIUS
Re: Grandwheels or wheel-wheels question
Markus, Take a look at POE::Wheel::Run. Run can be initiated as spawning a separate program or subroutine. Use a ReadWrite wheel to connect the subprocess back to the Run Wheel. In the subroutine or separate script, run a kernel inside of that to handle the IO, multiwhatevers, etc. Dougie! In a message dated 8/19/03 5:10:39 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: Hi, I have a program where I need to execute some longish tasks in parallel. So far I have understood that POE is some first class choice, and that the way to go is to have some POE::Filter::Reference wheels spawned off. However, these wheels have to deal with collecting the longish data itself. Recently, I learned that this may be some n GBytes each, so backquotes or even file redirection could turn out improper. I would like to employ POE also - does anybody have experience with wheel processes (children) creating one or more wheels again? Of course I could fold the output handling into one hierarchy, but this would make a line oriented processing problematic, and a load oriented job spawning quite hard. Any help is appreciated. Best regards, Markus -- Markus Jansen Senior IS/IT Support Engineer, EED/IT Ericsson Eurolab Deutschland GmbH Email : [EMAIL PROTECTED] Ericsson Allee 1 Phone : +49 2407 575 5157 52134 Herzogenrath Fax : +49 2407 575 7289 GermanyMobile: +49 172 274 2003
Re: Grandwheels or wheel-wheels question
On Wed, Aug 20, 2003 at 11:24:18AM +0100, Sam Vilain wrote: I would like to employ POE also - does anybody have experience with wheel processes (children) creating one or more wheels again? You probably want to start a new poe kernel in each sub-process, and pass messages if necessary to the parent process (eg, via STDOUT). I have seen people call POE::Kernel-run() at the end of their child process, using Program = \function. sub function { POE::Session-new(...); POE::Kernel-run(); } Some points to remember: 1. The child process exits once function() returns. 2. Function won't return until POE::Kernel-run() does. 3. POE::Kernel-run() won't return until all sessions have stopped. 4. Sessions active in the parent process will be copied on fork. They may then be running in the parent and child processes. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/
RE: Grandwheels or wheel-wheels question
Markus, also check out POE::Component::Child which makes setup easier. - e -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 6:23 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Grandwheels or wheel-wheels question Markus, Take a look at POE::Wheel::Run. Run can be initiated as spawning a separate program or subroutine. Use a ReadWrite wheel to connect the subprocess back to the Run Wheel. In the subroutine or separate script, run a kernel inside of that to handle the IO, multiwhatevers, etc. Dougie! In a message dated 8/19/03 5:10:39 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: Hi, I have a program where I need to execute some longish tasks in parallel. So far I have understood that POE is some first class choice, and that the way to go is to have some POE::Filter::Reference wheels spawned off. However, these wheels have to deal with collecting the longish data itself. Recently, I learned that this may be some n GBytes each, so backquotes or even file redirection could turn out improper. I would like to employ POE also - does anybody have experience with wheel processes (children) creating one or more wheels again? Of course I could fold the output handling into one hierarchy, but this would make a line oriented processing problematic, and a load oriented job spawning quite hard. Any help is appreciated. Best regards, Markus -- Markus Jansen Senior IS/IT Support Engineer, EED/IT Ericsson Eurolab Deutschland GmbH Email : [EMAIL PROTECTED] Ericsson Allee 1 Phone : +49 2407 575 5157 52134 Herzogenrath Fax : +49 2407 575 7289 GermanyMobile: +49 172 274 2003