Hi,

On Sat, May 2, 2009 at 4:04 PM, Rocco Caputo <[email protected]> wrote:
> You seem to be seeking examples where POE isn't necessarily appropriate.  I
> recommend looking for CPU-bound problems, since that's where POE doesn't
> directly help.  Even in the CPU-bound case, a subthread or child process can
> externalize and parallelize the work.  POE can continue doing non-blocking
> work in the meantime, and it can be notified when the side thread or process
> is done.
>


Thanks for your lengthly reply.
I think I better explain my usage in more detail (sorry for not begin
done before).

Case:

1. I need to write a script to download files from 50 FTP servers every hour.

2. For each FTP server, I need to download 100-300 files.

3. I can accept connection to each FTP server is being single threaded
(since the max. time for operations on a single FTP server is quite
short, i.e. <  5 minutes)

4. So I tried to investigate POE, as FTP component is avaliable.

5. Currently written using simple single threaded POE program, and In
the `authenticated` method in POE::Component::Client::FTP, I need to
write the log into an external MSSQL (not MySQL, wrongly typed b4), so
this process should be blocking as I think.


Questions:

a. Is POE suitable for my jobs?
b. Do I need to use thread + POE in order to run 50 works together?
c. Within each worker/process, I have some blocking operation in the
callback which prevent it from switching event more quickly, whar are
the normal way to handle?


Thanks.

Reply via email to